Overall procedure
If you want to create a new lattice file, the following procedures are needed.
- Copy one of lattice files such as Kagome.cpp (Probably the most similar one) and rename it.
- Modify lattice model file
- Add the function in the header file, StdFace_ModelUtil.hpp.
- Add entry at
char *fname
)
{
struct StdIntList *StdI;
:
if (strcmp(StdI->lattice, "chain") == 0
|| strcmp(StdI->lattice,
"chainlattice") == 0)
StdFace_Chain(StdI);
else if (strcmp(StdI->lattice, "face-centeredorthorhombic") == 0
|| strcmp(StdI->lattice, "fcorthorhombic") == 0
else if (strcmp(StdI->lattice, "honeycomb") == 0
else if (strcmp(StdI->lattice, "kagome") == 0
else if (strcmp(StdI->lattice, "ladder") == 0
else if (strcmp(StdI->lattice, "orthorhombic") == 0
else if (strcmp(StdI->lattice, "tetragonal") == 0
|| strcmp(StdI->lattice, "tetragonallattice") == 0
|| strcmp(StdI->lattice, "square") == 0
else if (strcmp(StdI->lattice, "triangular") == 0
Modify lattice model file
To create a new lattice file, please modify the following part (Kagome.cpp as an example):
Define function as
struct StdIntList *StdI
)
{
Lattice parameters are used only in geometry.dat and lattice.gp
These are unit lattice vectors.
Just call this function to initialize all lattice related parameters
where "2" indicates 2D.
StdI->tau[0][0] = 0.0; StdI->tau[0][1] = 0.0; StdI->tau[0][2] = 0.0;
StdI->tau[1][0] = 0.5; StdI->tau[1][1] = 0.0; StdI->tau[1][2] = 0.0;
StdI->tau[2][0] = 0.0; StdI->tau[2][1] = 0.5; StdI->tau[2][2] = 0.0;
These are the fractional coordinates of internal sites. Then set parameters of Hamiltonian
if (strcmp(StdI->model, "hubbard") == 0 ) {
}
else {
}
}
to determine the default values of them and unused parameters. For more details, please see the description of each function. Then compute the upper limit of the number of Transfer & Interaction and malloc them.
if (strcmp(StdI->model, "spin") == 0 ) {
ntransMax = StdI->nsite * (StdI->S2 + 1 + 2 * StdI->S2);
nintrMax = StdI->NCell * (StdI->NsiteUC + 6 + 6)
* (3 * StdI->S2 + 1) * (3 * StdI->S2 + 1);
}
else {
ntransMax = StdI->NCell * 2 * (2 * StdI->NsiteUC + 12 + 12);
nintrMax = StdI->NCell * (StdI->NsiteUC + 4 * (6 + 6));
if (strcmp(StdI->model, "kondo") == 0) {
ntransMax += StdI->nsite / 2 * (StdI->S2 + 1 + 2 * StdI->S2);
nintrMax += StdI->nsite / 2 * (3 * StdI->S2 + 1) * (3 * StdI->S2 + 1);
}
}
Please estimate the number of bonds per site.
for (kCell = 0; kCell < StdI->NCell; kCell++) {
In this loop, the parameters of Hamiltonian are computed & stored. The local term is computed as follows:
isite = StdI->NsiteUC * kCell;
if (strcmp(StdI->model, "kondo") == 0 ) isite += StdI->nsite / 2;
if (strcmp(StdI->model, "spin") == 0 ) {
for (isiteUC = 0; isiteUC < StdI->NsiteUC; isiteUC++) {
StdFace_GeneralJ(StdI, StdI->D, StdI->S2, StdI->S2, isite + isiteUC, isite + isiteUC);
}
}
else {
for (isiteUC = 0; isiteUC < StdI->NsiteUC; isiteUC++)
if (strcmp(StdI->model, "kondo") == 0 ) {
jsite = StdI->NsiteUC * kCell;
for (isiteUC = 0; isiteUC < StdI->NsiteUC; isiteUC++) {
}
}
}
Probably, it is not necessary to modify this part. The non-local term is as follows:
StdFace_SetLabel(StdI, fp, iW, iL, 0, 0, 0, 1, &isite, &jsite, 1, &Cphase, dR);
if (strcmp(StdI->model, "spin") == 0 ) {
}
else {
}
For more details, please see each function.