22 #include "StdFace_ModelUtil.h" 37 int isite, jsite, isiteUC, kCell, ntransMax, nintrMax;
40 double complex Cphase;
46 fp = fopen(
"lattice.gp",
"w");
50 fprintf(stdout,
" @ Lattice Size & Shape\n\n");
64 StdI->
tau[0][0] = 0.0; StdI->
tau[0][1] = 0.0; StdI->
tau[0][2] = 0.0;
65 StdI->
tau[1][0] = 0.5; StdI->
tau[1][1] = 0.0; StdI->
tau[1][2] = 0.0;
66 StdI->
tau[2][0] = 0.0; StdI->
tau[2][1] = 0.5; StdI->
tau[2][2] = 0.0;
70 fprintf(stdout,
"\n @ Hamiltonian \n\n");
82 if (strcmp(StdI->
model,
"spin") == 0 ) {
121 if (strcmp(StdI->
model,
"hubbard") == 0 ) {
131 fprintf(stdout,
"\n @ Numerical conditions\n\n");
137 if (strcmp(StdI->
model,
"kondo") == 0 ) StdI->
nsite *= 2;
140 if (strcmp(StdI->
model,
"spin") == 0 )
142 else if (strcmp(StdI->
model,
"hubbard") == 0 )
145 for (iL = 0; iL < StdI->
nsite / 2; iL++) {
152 if (strcmp(StdI->
model,
"spin") == 0 ) {
153 ntransMax = StdI->
nsite * (StdI->
S2 + 1 + 2 * StdI->
S2);
155 * (3 * StdI->
S2 + 1) * (3 * StdI->
S2 + 1);
158 ntransMax = StdI->
NCell * 2 * (2 * StdI->
NsiteUC + 12 + 12);
161 if (strcmp(StdI->
model,
"kondo") == 0) {
162 ntransMax += StdI->
nsite / 2 * (StdI->
S2 + 1 + 2 * StdI->
S2);
163 nintrMax += StdI->
nsite / 2 * (3 * StdI->
S2 + 1) * (3 * StdI->
S2 + 1);
171 for (kCell = 0; kCell < StdI->
NCell; kCell++) {
173 iW = StdI->
Cell[kCell][0];
174 iL = StdI->
Cell[kCell][1];
179 if (strcmp(StdI->
model,
"kondo") == 0 ) isite += StdI->
nsite / 2;
181 if (strcmp(StdI->
model,
"spin") == 0 ) {
182 for (isiteUC = 0; isiteUC < StdI->
NsiteUC; isiteUC++) {
188 for (isiteUC = 0; isiteUC < StdI->
NsiteUC; isiteUC++)
191 if (strcmp(StdI->
model,
"kondo") == 0 ) {
193 for (isiteUC = 0; isiteUC < StdI->
NsiteUC; isiteUC++) {
202 StdFace_SetLabel(StdI, fp, iW, iL, 0, 0, 0, 1, &isite, &jsite, 1, &Cphase, dR);
204 if (strcmp(StdI->
model,
"spin") == 0 ) {
214 StdFace_SetLabel(StdI, fp, iW, iL, 0, 0, 0, 2, &isite, &jsite, 1, &Cphase, dR);
216 if (strcmp(StdI->
model,
"spin") == 0 ) {
226 StdFace_SetLabel(StdI, fp, iW, iL, 0, 0, 1, 2, &isite, &jsite, 1, &Cphase, dR);
228 if (strcmp(StdI->
model,
"spin") == 0 ) {
238 StdFace_SetLabel(StdI, fp, iW, iL, 1, 0, 1, 0, &isite, &jsite, 1, &Cphase, dR);
240 if (strcmp(StdI->
model,
"spin") == 0 ) {
250 StdFace_SetLabel(StdI, fp, iW, iL, 0, 1, 2, 0, &isite, &jsite, 1, &Cphase, dR);
252 if (strcmp(StdI->
model,
"spin") == 0 ) {
262 StdFace_SetLabel(StdI, fp, iW, iL, 1, - 1, 1, 2, &isite, &jsite, 1, &Cphase, dR);
264 if (strcmp(StdI->
model,
"spin") == 0 ) {
274 StdFace_SetLabel(StdI, fp, iW, iL, 1, 0, 2, 0, &isite, &jsite, 2, &Cphase, dR);
276 if (strcmp(StdI->
model,
"spin") == 0 ) {
286 StdFace_SetLabel(StdI, fp, iW, iL, 1, 0, 1, 2, &isite, &jsite, 2, &Cphase, dR);
288 if (strcmp(StdI->
model,
"spin") == 0 ) {
298 StdFace_SetLabel(StdI, fp, iW, iL, 0, 1, 1, 0, &isite, &jsite, 2, &Cphase, dR);
300 if (strcmp(StdI->
model,
"spin") == 0 ) {
310 StdFace_SetLabel(StdI, fp, iW, iL, 0, 1, 2, 1, &isite, &jsite, 2, &Cphase, dR);
312 if (strcmp(StdI->
model,
"spin") == 0 ) {
322 StdFace_SetLabel(StdI, fp, iW, iL, 1, - 1, 0, 2, &isite, &jsite, 2, &Cphase, dR);
324 if (strcmp(StdI->
model,
"spin") == 0 ) {
334 StdFace_SetLabel(StdI, fp, iW, iL, - 1, 1, 0, 1, &isite, &jsite, 2, &Cphase, dR);
336 if (strcmp(StdI->
model,
"spin") == 0 ) {
345 fprintf(fp,
"plot \'-\' w d lc 7\n0.0 0.0\nend\npause -1\n");
359 int isite, ipivot, i1, i2;
363 if (StdI->
box[0][1] != 0 || StdI->
box[1][0] != 0) {
364 fprintf(stdout,
"\nERROR ! (a0W, a0L, a1W, a1L) can not be used with SpinGCBoost.\n\n");
367 for (i1 = 0; i1 < 3; i1++) {
368 for (i2 = 0; i2 < 3; i2++) {
369 if (fabs(StdI->
Jp[i1][i2]) > 1.0e-8) {
370 fprintf(stdout,
"\nERROR ! J' can not be used with SpinGCBoost.\n\n");
378 fp = fopen(
"boost.def",
"w");
379 fprintf(fp,
"# Magnetic field\n");
380 fprintf(fp,
"%25.15e %25.15e %25.15e\n",
381 -0.5 * StdI->
Gamma, 0.0, -0.5 * StdI->
h);
385 fprintf(fp,
"%d # Number of type of J\n", 3);
386 fprintf(fp,
"# J 0\n");
387 fprintf(fp,
"%25.15e %25.15e %25.15e\n",
388 0.25 * StdI->
J0[0][0], 0.25 * StdI->
J0[0][1], 0.25 * StdI->
J0[0][2]);
389 fprintf(fp,
"%25.15e %25.15e %25.15e\n",
390 0.25 * StdI->
J0[0][1], 0.25 * StdI->
J0[1][1], 0.25 * StdI->
J0[1][2]);
391 fprintf(fp,
"%25.15e %25.15e %25.15e\n",
392 0.25 * StdI->
J0[0][2], 0.25 * StdI->
J0[1][2], 0.25 * StdI->
J0[2][2]);
393 fprintf(fp,
"# J 1\n");
394 fprintf(fp,
"%25.15e %25.15e %25.15e\n",
395 0.25 * StdI->
J1[0][0], 0.25 * StdI->
J1[0][1], 0.25 * StdI->
J1[0][2]);
396 fprintf(fp,
"%25.15e %25.15e %25.15e\n",
397 0.25 * StdI->
J1[0][1], 0.25 * StdI->
J1[1][1], 0.25 * StdI->
J1[1][2]);
398 fprintf(fp,
"%25.15e %25.15e %25.15e\n",
399 0.25 * StdI->
J1[0][2], 0.25 * StdI->
J1[1][2], 0.25 * StdI->
J1[2][2]);
400 fprintf(fp,
"# J 2\n");
401 fprintf(fp,
"%25.15e %25.15e %25.15e\n",
402 0.25 * StdI->
J2[0][0], 0.25 * StdI->
J2[0][1], 0.25 * StdI->
J2[0][2]);
403 fprintf(fp,
"%25.15e %25.15e %25.15e\n",
404 0.25 * StdI->
J2[0][1], 0.25 * StdI->
J2[1][1], 0.25 * StdI->
J2[1][2]);
405 fprintf(fp,
"%25.15e %25.15e %25.15e\n",
406 0.25 * StdI->
J2[0][2], 0.25 * StdI->
J2[1][2], 0.25 * StdI->
J2[2][2]);
410 fprintf(stdout,
"\n ERROR! S2 must be 1 in Boost. \n\n");
415 fprintf(stdout,
"\n ERROR! L < 2 \n\n");
419 fprintf(stdout,
"\n ERROR! W %% %d != 0 \n\n", StdI->
ishift_nspin);
424 fprintf(stdout,
"DEBUG: W != 3\n");
428 fprintf(fp,
"# W0 R0 StdI->num_pivot StdI->ishift_nspin\n");
432 for (ipivot = 0; ipivot < StdI->
num_pivot; ipivot++) {
468 fprintf(fp,
"# StdI->list_6spin_star\n");
469 for (ipivot = 0; ipivot < StdI->
num_pivot; ipivot++) {
470 fprintf(fp,
"# pivot %d\n", ipivot);
471 for (isite = 0; isite < 7; isite++) {
478 for (ipivot = 0; ipivot < StdI->
num_pivot; ipivot++) {
480 for (isite = 0; isite < 7; isite++) {
615 fprintf(fp,
"# StdI->list_6spin_pair\n");
616 for (ipivot = 0; ipivot < StdI->
num_pivot; ipivot++) {
617 fprintf(fp,
"# pivot %d\n", ipivot);
619 for (isite = 0; isite < 7; isite++) {
627 for (ipivot = 0; ipivot < StdI->
num_pivot; ipivot++) {
632 for (ipivot = 0; ipivot < StdI->
num_pivot; ipivot++) {
633 for (isite = 0; isite < 7; isite++) {
void StdFace_PrintVal_i(char *valname, int *val, int val0)
Print a valiable (integer) read from the input file if it is not specified in the input file (=214748...
double V2
Anisotropic Coulomb potential (1st), input parameter.
double Jp[3][3]
Isotropic, diagonal/off-diagonal spin coupling (2nd Near.), input parameter J'x, J'y, J'z, J'xy, etc.
int box[3][3]
The shape of the super-cell. Input parameter a0W, a0L, a0H, etc. or defined from StdIntList::W, etc. in StdFace_InitSite().
double complex t2p
Anisotropic hopping (2nd), input parameter.
double J[3][3]
Isotropic, diagonal/off-diagonal spin coupling (1st Near.), input parameter Jx, Jy, Jz, Jxy, etc.
void StdFace_GeneralJ(struct StdIntList *StdI, double J[3][3], int Si2, int Sj2, int isite, int jsite)
Treat J as a 3*3 matrix [(6S + 1)*(6S' + 1) interactions].
int L
Number of sites along the 2nd axis, input parameter.
void StdFace_HubbardLocal(struct StdIntList *StdI, double mu0, double h0, double Gamma0, double U0, int isite)
Add intra-Coulomb, magnetic field, chemical potential for the itenerant electron. ...
double D[3][3]
Coefficient for input parameter D. Only D[2][2] is used.
double J1p[3][3]
Isotropic, diagonal/off-diagonal spin coupling (2nd Near.), input parameter J1'x, J1'y...
void StdFace_PrintGeometry(struct StdIntList *StdI)
Print geometry of sites for the pos-process of correlation function.
double JpAll
Isotropic, diagonal spin coupling (2nd Near), input parameter Jp.
double J1[3][3]
Isotropic, diagonal/off-diagonal spin coupling (1st Near.), input parameter J1x, J1y, J1z, J1xy, etc. or set in StdFace_InputSpinNN().
double J2p[3][3]
Isotropic, diagonal/off-diagonal spin coupling (2nd Near.), input parameter J2'x, J2'y...
void StdFace_Hopping(struct StdIntList *StdI, double complex trans0, int isite, int jsite, double *dR)
Add Hopping for the both spin.
double complex t
Nearest-neighbor hopping, input parameter.
void StdFace_MallocInteractions(struct StdIntList *StdI, int ntransMax, int nintrMax)
Malloc Arrays for interactions.
double JAll
Isotropic, diagonal spin coupling (1st Near.), input parameter J.
int S2
Total spin |S| of a local spin, input from file.
int NsiteUC
Number of sites in the unit cell. Defined in the beginning of each lattice function.
double J1All
Anisotropic, diagonal spin coupling (1nd Near), input parameter J1.
void StdFace_InputCoulombV(struct StdIntList *StdI, double *V0, char *V0name)
Input off-site Coulomb interaction from the input file, if it is not specified, use the default value...
void StdFace_InputHopp(struct StdIntList *StdI, double complex *t0, char *t0name)
Input hopping integral from the input file, if it is not specified, use the default value(0 or the is...
void StdFace_InitSite(struct StdIntList *StdI, FILE *fp, int dim)
Initialize the super-cell where simulation is performed.
int W
Number of sites along the 1st axis, input parameter.
double V2p
Anisotropic Coulomb potential (2nd), input parameter.
char model[256]
Name of model, input parameter.
void StdFace_NotUsed_J(char *valname, double JAll, double J[3][3])
Stop HPhi if variables (real) not used is specified in the input file (!=NaN).
double Gamma
Transvars magnetic field, input parameter.
double V1
Anisotropic Coulomb potential (1st), input parameter.
double J0All
Anisotropic, diagonal spin coupling (1nd Near), input parameter J0.
double J0[3][3]
Isotropic, diagonal/off-diagonal spin coupling (1st Near.), input parameter J0x, J0y, J0z, J0xy, etc. or set in StdFace_InputSpinNN().
double U
On-site Coulomb potential, input parameter.
int ** Cell
[StdIntList][3] The cell position in the fractional coordinate. Malloc and Set in StdFace_InitSite()...
double phase[3]
Boundary phase, input parameter phase0, etc.
double length[3]
Anisotropic lattice constant, input parameter wlength, llength, hlength.
int * locspinflag
[StdIntList::nsite] LocSpin in Expert mode, malloc and set in each lattice file.
double complex tp
2nd-nearest hopping, input parameter
double complex t1
Anisotropic hopping (1st), input parameter.
double V
Off-site Coulomb potential (1st), input parameter.
double complex t0
Anisotropic hopping (1st), input parameter.
double direct[3][3]
The unit direct lattice vector. Set in StdFace_InitSite().
void StdFace_MagField(struct StdIntList *StdI, int S2, double h, double Gamma, int isite)
Add longitudinal and transvars magnetic field to the list.
void StdFace_NotUsed_d(char *valname, double val)
Stop HPhi if a variable (real) not used is specified in the input file (!=NaN).
double V0
Anisotropic Coulomb potential (1st), input parameter.
void StdFace_Coulomb(struct StdIntList *StdI, double V, int isite, int jsite)
Add onsite/offsite Coulomb term to the list StdIntList::Cinter and StdIntList::CinterIndx, and increase the number of them (StdIntList::NCinter).
void StdFace_InputSpin(struct StdIntList *StdI, double Jp[3][3], double JpAll, char *Jpname)
Input spin-spin interaction other than nearest-neighbor.
void StdFace_Kagome_Boost(struct StdIntList *StdI)
void StdFace_SetLabel(struct StdIntList *StdI, FILE *fp, int iW, int iL, int diW, int diL, int isiteUC, int jsiteUC, int *isite, int *jsite, int connect, double complex *Cphase, double *dR)
Set Label in the gnuplot display (Only used in 2D system)
double complex t1p
Anisotropic hopping (2nd), input parameter.
void StdFace_Kagome(struct StdIntList *StdI)
Setup a Hamiltonian for the Kagome lattice.
double complex t2
Anisotropic hopping (1st), input parameter.
double mu
Chemical potential, input parameter.
void StdFace_PrintVal_d(char *valname, double *val, double val0)
Print a valiable (real) read from the input file if it is not specified in the input file (=NaN)...
void StdFace_InputSpinNN(struct StdIntList *StdI, double J0[3][3], double J0All, char *J0name)
Input nearest-neighbor spin-spin interaction.
int NCell
The number of the unit cell in the super-cell (determinant of StdIntList::box). Set in StdFace_InitSi...
double Vp
Off-site Coulomb potential (2nd), input parameter.
double J1pAll
Anisotropic, diagonal spin coupling (2nd Near), input parameter J1'.
void StdFace_NotUsed_c(char *valname, double complex val)
Stop HPhi if a variable (complex) not used is specified in the input file (!=NaN).
void StdFace_PrintVal_c(char *valname, double complex *val, double complex val0)
Print a valiable (complex) read from the input file if it is not specified in the input file (=NaN)...
int nsite
Number of sites, set in the each lattice file.
double J2All
Anisotropic, diagonal spin coupling (1nd Near), input parameter J2.
Variables used in the Standard mode. These variables are passed as a pointer of the structure(StdIntL...
void StdFace_NotUsed_i(char *valname, int val)
Stop HPhi if a variable (integer) not used is specified in the input file (!=2147483647, the upper limt of Int).
double h
Longitudinal magnetic field, input parameter.
double a
The lattice constant. Input parameter.
double J2[3][3]
Isotropic, diagonal/off-diagonal spin coupling (1st Near.), input parameter J2x, J2y, J2z, J2xy, etc. or set in StdFace_InputSpinNN().
double J2pAll
Anisotropic, diagonal spin coupling (2nd Near), input parameter J2'.
double ** tau
Cell-internal site position in the fractional coordinate. Defined in the beginning of each lattice fu...
void StdFace_exit(int errorcode)
MPI Abortation wrapper.
double V1p
Anisotropic Coulomb potential (2nd), input parameter.
double K
4-spin term. Not used.