Examples¶
This section provides complete working examples for different use cases.
Hubbard Model (Default)¶
This example demonstrates a basic Hubbard model on a 2x2 square lattice using the standard lattice definition. This is the recommended starting point.
Source: samples/hubbard/default_model/
Input File¶
Create stan.in:
model = "Hubbard"
lattice = square
W = 2
L = 2
method = "CG"
2Sz = 0
nelec = 4
exct = 1
t = 1
U = 1
Parameter Explanation¶
Parameter |
Value |
Description |
|---|---|---|
|
Hubbard |
Hubbard model with hopping and on-site interaction |
|
square |
2D square lattice |
|
2 |
Width: 2 sites in the W direction |
|
2 |
Length: 2 sites in the L direction |
|
CG |
Conjugate gradient method (solver-specific) |
|
0 |
Total spin projection (2 * Sz = 0) |
|
4 |
Number of electrons (half-filling for 4 sites) |
|
1 |
Number of excited states (solver-specific) |
|
1 |
Nearest-neighbor hopping amplitude |
|
1 |
On-site Coulomb interaction strength |
Running the Example¶
cd samples/hubbard/default_model
../../../build/hphi_dry.out stan.in
Replace hphi_dry.out with the appropriate executable for your target solver.
Expected Behavior¶
StdFace reads the input file, constructs a 2x2 square lattice Hubbard model, and generates solver input files in the current directory. The specific output files depend on the solver mode used.
Hubbard Model (Wannier90-based)¶
This advanced example demonstrates importing a tight-binding model from Wannier90 format files. This approach is useful when you have an existing Wannier90 tight-binding Hamiltonian.
Source: samples/hubbard/wannier/
Required Files¶
This example requires multiple input files:
stan.in- Main StdFace input filezvo_geom.dat- Geometry data (lattice vectors and atomic positions)zvo_hr.dat- Hopping parameters in Wannier90 formatzvo_ur.dat- On-site interaction parameters in Wannier90 format
Main Input File (stan.in)¶
model = "Hubbard"
lattice = "wannier90"
W = 2
L = 2
method = "CG"
2Sz = 0
nelec = 4
exct = 1
Key difference from the default example: lattice = "wannier90" instructs
StdFace to read lattice and hopping information from Wannier90 format files
instead of using built-in lattice constructors.
Geometry File (zvo_geom.dat)¶
This file defines the lattice vectors and atomic positions:
1.0000000000 0.0000000000 0.0000000000
0.0000000000 1.0000000000 0.0000000000
0.0000000000 0.0000000000 1.0000000000
1
0.5000000000 0.5000000000 0.5000000000
Format:
Lines 1-3: Lattice vectors (3x3 matrix, one vector per line)
Line 4: Number of atoms in the unit cell
Line 5+: Fractional coordinates of each atom
Hopping File (zvo_hr.dat)¶
This file defines the hopping (transfer) integrals in Wannier90 format:
wannier90 format for vmcdry.out or HPhi -sdry
1
9
1 1 1 1 1 1 1 1 1
-1 -1 0 1 1 0.0 0.0
-1 0 0 1 1 -1.0 0.0
...
Format:
Line 1: Header comment
Line 2: Number of Wannier functions
Line 3: Number of R vectors
Line 4: Degeneracy weights for each R vector
Lines 5+: Hopping data (R_x, R_y, R_z, orbital_i, orbital_j, Re(t), Im(t))
Interaction File (zvo_ur.dat)¶
This file defines the on-site interaction in the same format as the hopping file:
wannier90 format for vmcdry.out or HPhi -sdry
1
9
1 1 1 1 1 1 1 1 1
-1 -1 0 1 1 0.0 0.0
...
0 0 0 1 1 1.0 0.0
...
The entry at R = (0, 0, 0) with value 1.0 represents the on-site Hubbard U.
File Relationships¶
stan.in
|
+-- lattice = "wannier90"
|
+-- zvo_geom.dat (geometry)
+-- zvo_hr.dat (hopping t)
+-- zvo_ur.dat (interaction U)
When lattice = "wannier90" is specified, StdFace automatically looks for
these Wannier90 format files in the same directory as the input file.
Running the Example¶
cd samples/hubbard/wannier
../../../build/hphi_dry.out stan.in
Ensure all four files (stan.in, zvo_geom.dat, zvo_hr.dat,
zvo_ur.dat) are present in the working directory.
When to Use Wannier90 Format¶
Use Wannier90-based input when:
You have an existing tight-binding model from DFT+Wannier90 calculations
You need custom hopping patterns not supported by built-in lattices
You want to import realistic band structures from first-principles calculations
For simple models with standard lattice geometries, the default approach (built-in lattice constructors) is recommended.
Lattice Types Reference¶
StdFace supports the following built-in lattice types:
Lattice |
Dimensions |
Description |
|---|---|---|
|
1D |
Linear chain |
|
1D |
Two-leg or multi-leg ladder |
|
2D |
Square lattice |
|
2D |
Triangular lattice |
|
2D |
Honeycomb (hexagonal) lattice |
|
2D |
Kagome lattice |
|
3D |
Tetragonal lattice |
|
3D |
Orthorhombic/cubic lattice |
|
3D |
Face-centered orthorhombic lattice |
|
3D |
Pyrochlore lattice |
|
Any |
Import from Wannier90 format files |
See the developer documentation for implementation details of each lattice constructor.