LatticeGeom

简体中文

LatticeGeom is a typed periodic-geometry layer for condensed-matter models. It turns a small declarative UnitCell into a finite, immutable Lattice while preserving the integer relations needed by exact diagonalization, Monte Carlo, tensor-network, Luttinger--Tisza, and Bloch-space workflows.

What it owns

  • Cartesian site positions and primitive basis vectors;
  • directed, typed bonds with exact integer cell shifts;
  • typed, oriented plaquette and loop templates;
  • finite extents and mixed open/periodic boundary conditions;
  • compressed periodic-image indices and Cartesian translations;
  • primitive and finite-supercell reciprocal geometry;
  • optional visualization and authoring-time neighbor discovery.

What it does not own

LatticeGeom does not store hopping amplitudes, exchange constants, onsite energies, Peierls phases, flux values, operators, states, or Hamiltonian matrices. A type label classifies geometry; downstream code maps that label to model parameters.

This boundary makes the same lattice reusable across spin, fermion, boson, and classical models without introducing a preferred Hamiltonian convention.

Documentation map

  1. Installation and quick start
  2. Core concepts
  3. Geometry guide
  4. Reciprocal space
  5. Visualization
  6. One-shot neighbor discovery
  7. API reference
  8. Architecture and design boundaries

Minimal example

from latticegeom import triangular

lat = triangular((4, 4), pbc=True)
rows = lat.find_bonds(type="a1", crossing=True)
areas = lat.plaquette_signed_areas()

print(lat)
print(rows)
print(areas[:4])

LatticeGeom is currently alpha software and requires Python 3.10 or newer.