Bond API
LatticeCore.Bond — Type
Bond{D, T}A bond (edge) connecting two sites of a lattice.
Fields
i::Int— source site indexj::Int— target site indexvector::SVector{D, T}— displacementposition(j) - position(i), wrapped by the lattice's boundary condition if applicabletype::Symbol— bond type tag (e.g.:nearest,:next_nearest,:dimer_strong). Used as a dispatch key by anisotropic models (see the 07 MC layer design note).
LatticeCore.bonds — Function
bonds(lat::AbstractLattice)Iterator of all bonds in the lattice. The default implementation builds Bond objects on the fly from neighbors(lat, i) using the :nearest tag. Concrete lattices may override this for efficiency or to attach non-default bond types (e.g. dimer-strong vs dimer-weak).
LatticeCore.neighbor_bonds — Function
neighbor_bonds(lat::AbstractLattice, i::Int)Iterator of bonds incident to site i. The default implementation builds Bond objects from neighbors(lat, i) using the :nearest tag. This is the canonical entry point the 07 MC layer uses to walk interactions involving a given site.
LatticeCore.bond_center — Function
bond_center(lat::AbstractLattice, bond::Bond) → SVector{D, T}Geometric center (midpoint) of the bond in real space. Useful for bond-centered observables and for position-dependent bond modifiers such as sine-square deformation.