Skip to content

intrcmap_square

Generate an interaction map for a 2D square lattice.

Call build_geometry(geo_cfg) to construct a Geometry, then pass it here. The TOML keys below are the fields that belong in the [geometry] section.

intrcmap_square

intrcmap_square(geo: Geometry) -> List[Interaction2Site]

Generate an interaction map for a 2D square lattice.

Produces nearest-neighbor (NN) and optionally next-nearest-neighbor (NNN) interactions for a 2D square lattice. Coupling constants are not set here; the returned interactions have cpl == 0.0 (the default). Labels encode bond topology so that the model builder can assign the correct coupling per bond type.

Parameters:

Name Type Description Default
geo Geometry

Fully-resolved geometry struct for the square lattice. Relevant config keys (read from geo.cfg):

  • bcx — boundary condition along x ('OBC' or 'PBC').
  • bcy — boundary condition along y ('OBC' or 'PBC').
  • n2x — include NN bonds along x (default True).
  • n2y — include NN bonds along y (default True).
  • n3d — include NNN diagonal bonds (default False).
  • n3o — include NNN off-diagonal bonds (default False).
required

Returns:

Type Description
List[Interaction2Site]

Interaction objects sorted by leading_site. Tensor fields are None; cpl is 0.0.

TOML Keys

Key Type Default Description
lx int required Number of columns
ly int required Number of rows
bcx str "OBC" Boundary condition along x
bcy str "OBC" Boundary condition along y
n2x bool true Include NN bonds along x
n2y bool true Include NN bonds along y
n3d bool false Include NNN diagonal bonds
n3o bool false Include NNN off-diagonal bonds

Traversal Order (traverse)

Value Ordering
"sequential" column-major, top→bottom every column (default)
"serpentine" column-major, alternating direction

See Also