41 #include "StdFace_ModelUtil.h" 54 for (ktrans = 0; ktrans < StdI->
ntrans; ktrans++) {
55 LargeValue0 += cabs(StdI->
trans[ktrans]);
57 for (kintr = 0; kintr < StdI->
nintr; kintr++) {
58 LargeValue0 += cabs(StdI->
intr[kintr]);
60 for (kintr = 0; kintr < StdI->
NCintra; kintr++) {
61 LargeValue0 += fabs(StdI->
Cintra[kintr]);
63 for (kintr = 0; kintr < StdI->
NCinter; kintr++) {
64 LargeValue0 += fabs(StdI->
Cinter[kintr]);
66 for (kintr = 0; kintr < StdI->
NEx; kintr++) {
67 LargeValue0 += 2.0 * fabs(StdI->
Ex[kintr]);
69 for (kintr = 0; kintr < StdI->
NPairLift; kintr++) {
70 LargeValue0 += 2.0 * fabs(StdI->
PairLift[kintr]);
72 for (kintr = 0; kintr < StdI->
NHund; kintr++) {
73 LargeValue0 += 2.0 * fabs(StdI->
Hund[kintr]);
75 LargeValue0 /= (double)StdI->
nsite;
85 int iCalcType, iCalcModel, iRestart, iCalcSpec,
86 iCalcEigenvec, iInitialVecTpye, InputEigenVec, OutputEigenVec,
87 iInputHam, iOutputHam, iOutputExVec;
91 fprintf(stdout,
"\n @ CalcMod\n\n");
96 if (strcmp(StdI->
method,
"****") == 0){
97 fprintf(stdout,
"ERROR ! Method is NOT specified !\n");
100 else if (strcmp(StdI->
method,
"lanczos") == 0) iCalcType = 0;
101 else if (strcmp(StdI->
method,
"lanczosenergy") == 0) {
105 else if (strcmp(StdI->
method,
"tpq") == 0) iCalcType = 1;
106 else if (strcmp(StdI->
method,
"fulldiag") == 0 ) iCalcType = 2;
107 else if (strcmp(StdI->
method,
"cg") == 0) iCalcType = 3;
108 else if (strcmp(StdI->
method,
"timeevolution") == 0) iCalcType = 4;
110 fprintf(stdout,
"\n ERROR ! Unsupported Solver : %s\n", StdI->
method);
113 if (iCalcType != 4) StdI->
PumpBody = 0;
117 if (strcmp(StdI->
model,
"hubbard") == 0) {
118 if (StdI->
lGC == 0)iCalcModel = 0;
121 else if (strcmp(StdI->
model,
"spin") == 0) {
122 if (StdI->
lGC == 0)iCalcModel = 1;
125 else if (strcmp(StdI->
model,
"kondo") == 0) {
126 if (StdI->
lGC == 0)iCalcModel = 2;
132 if (strcmp(StdI->
Restart,
"****") == 0) {
133 strcpy(StdI->
Restart,
"none\0");
134 fprintf(stdout,
" Restart = none ###### DEFAULT VALUE IS USED ######\n");
138 fprintf(stdout,
" Restart = %s\n", StdI->
Restart);
139 if (strcmp(StdI->
Restart,
"none") == 0) iRestart = 0;
140 else if (strcmp(StdI->
Restart,
"restart_out") == 0 ||
141 strcmp(StdI->
Restart,
"save") == 0) iRestart = 1;
142 else if (strcmp(StdI->
Restart,
"restartsave") == 0 ||
143 strcmp(StdI->
Restart,
"restart") == 0) iRestart = 2;
144 else if (strcmp(StdI->
Restart,
"restart_in") == 0) iRestart = 3;
146 fprintf(stdout,
"\n ERROR ! Restart Mode : %s\n", StdI->
Restart);
155 fprintf(stdout,
" InitialVecType = c ###### DEFAULT VALUE IS USED ######\n");
161 else if (strcmp(StdI->
InitialVecType,
"r") == 0) iInitialVecTpye = 1;
163 fprintf(stdout,
"\n ERROR ! Restart Mode : %s\n", StdI->
Restart);
174 fprintf(stdout,
" EigenVecIO = none ###### DEFAULT VALUE IS USED ######\n");
177 fprintf(stdout,
" EigenVecIO = %s\n", StdI->
EigenVecIO);
178 if (strcmp(StdI->
EigenVecIO,
"none") == 0) InputEigenVec = 0;
179 else if (strcmp(StdI->
EigenVecIO,
"in") == 0) InputEigenVec = 1;
180 else if (strcmp(StdI->
EigenVecIO,
"out") == 0) OutputEigenVec = 1;
181 else if (strcmp(StdI->
EigenVecIO,
"inout") == 0) {
186 fprintf(stdout,
"\n ERROR ! EigenVecIO Mode : %s\n", StdI->
Restart);
190 if (strcmp(StdI->
method,
"timeevolution") == 0) InputEigenVec = 1;
196 if (strcmp(StdI->
HamIO,
"****") == 0) {
197 strcpy(StdI->
HamIO,
"none\0");
198 fprintf(stdout,
" HamIO = none ###### DEFAULT VALUE IS USED ######\n");
201 fprintf(stdout,
" HamIO = %s\n", StdI->
HamIO);
202 if (strcmp(StdI->
HamIO,
"none") == 0){ iOutputHam = 0; iInputHam=0;}
203 else if (strcmp(StdI->
HamIO,
"out") == 0) iOutputHam = 1;
204 else if (strcmp(StdI->
HamIO,
"in") == 0) iInputHam = 1;
206 fprintf(stdout,
"\n ERROR ! HamIO mode : %s\n", StdI->
HamIO);
213 if (strcmp(StdI->
CalcSpec,
"****") == 0) {
215 fprintf(stdout,
" CalcSpec = none ###### DEFAULT VALUE IS USED ######\n");
219 fprintf(stdout,
" CalcSpec = %s\n", StdI->
CalcSpec);
220 if (strcmp(StdI->
CalcSpec,
"none") == 0) iCalcSpec = 0;
221 else if (strcmp(StdI->
CalcSpec,
"normal") == 0) iCalcSpec = 1;
222 else if (strcmp(StdI->
CalcSpec,
"noiteration") == 0) iCalcSpec = 2;
223 else if (strcmp(StdI->
CalcSpec,
"restart_out") == 0) iCalcSpec = 3;
224 else if (strcmp(StdI->
CalcSpec,
"restart_in") == 0) iCalcSpec = 4;
225 else if (strcmp(StdI->
CalcSpec,
"restartsave") == 0 ||
226 strcmp(StdI->
CalcSpec,
"restart") == 0) iCalcSpec = 5;
228 fprintf(stdout,
"\n ERROR ! CalcSpec : %s\n", StdI->
CalcSpec);
238 fprintf(stdout,
" OutputExcitedVec = none ###### DEFAULT VALUE IS USED ######\n");
241 fprintf(stdout,
" OutputExcitedVec = %s\n", StdI->
OutputExVec);
242 if (strcmp(StdI->
OutputExVec,
"none") == 0) iOutputExVec = 0;
243 else if (strcmp(StdI->
OutputExVec,
"out") == 0) iOutputExVec = 1;
245 fprintf(stdout,
"\n ERROR ! OutputExcitedVec : %s\n", StdI->
OutputExVec);
250 fp = fopen(
"calcmod.def",
"w");
251 fprintf(fp,
"#CalcType = 0:Lanczos, 1:TPQCalc, 2:FullDiag, 3:CG, 4:Time-evolution\n");
252 fprintf(fp,
"#CalcModel = 0:Hubbard, 1:Spin, 2:Kondo, 3:HubbardGC, 4:SpinGC, 5:KondoGC\n");
253 fprintf(fp,
"#Restart = 0:None, 1:Save, 2:Restart&Save, 3:Restart\n");
254 fprintf(fp,
"#CalcSpec = 0:None, 1:Normal, 2:No H*Phi, 3:Save, 4:Restart, 5:Restart&Save\n");
255 fprintf(fp,
"CalcType %3d\n", iCalcType);
256 fprintf(fp,
"CalcModel %3d\n", iCalcModel);
257 fprintf(fp,
"ReStart %3d\n", iRestart);
258 fprintf(fp,
"CalcSpec %3d\n", iCalcSpec);
259 fprintf(fp,
"CalcEigenVec %3d\n", iCalcEigenvec);
260 fprintf(fp,
"InitialVecType %3d\n", iInitialVecTpye);
261 fprintf(fp,
"InputEigenVec %3d\n", InputEigenVec);
262 fprintf(fp,
"OutputEigenVec %3d\n", OutputEigenVec);
263 fprintf(fp,
"InputHam %3d\n", iInputHam);
264 fprintf(fp,
"OutputHam %3d\n", iOutputHam);
265 fprintf(fp,
"OutputExVec %3d\n", iOutputExVec);
268 fprintf(stdout,
" calcmod.def is written.\n\n");
276 int NumOp, **spin, isite, ispin, icell, itau;
277 double *coef, pi, Cphase, S, Sz;
278 double *fourier_r, *fourier_i;
280 if (strcmp(StdI->
model,
"spin") == 0 && StdI->
S2 > 1) {
281 coef = (
double *)malloc(
sizeof(
double) * (StdI->
S2 + 1));
282 spin = (
int **)malloc(
sizeof(
int*) * (StdI->
S2 + 1));
283 for (ispin = 0; ispin < StdI->
S2 + 1; ispin++) spin[ispin] = (
int *)malloc(
sizeof(
int) * 2);
286 coef = (
double *)malloc(
sizeof(
double) * 2);
287 spin = (
int **)malloc(
sizeof(
int*) * 2);
288 for (ispin = 0; ispin < 2; ispin++) spin[ispin] = (
int *)malloc(
sizeof(
int) * 2);
291 fourier_r = (
double *)malloc(
sizeof(
double) * StdI->
nsite);
292 fourier_i = (
double *)malloc(
sizeof(
double) * StdI->
nsite);
294 fprintf(stdout,
"\n @ Spectrum\n\n");
302 fprintf(stdout,
" SpectrumType = szsz ###### DEFAULT VALUE IS USED ######\n");
303 if (strcmp(StdI->
model,
"spin") == 0) {
304 NumOp = StdI->
S2 + 1;
305 for (ispin = 0; ispin <= StdI->
S2; ispin++) {
306 Sz = (double)ispin - (
double)StdI->
S2 * 0.5;
308 spin[ispin][0] = ispin;
309 spin[ispin][1] = ispin;
324 fprintf(stdout,
" SpectrumType = %s\n", StdI->
SpectrumType);
326 if (strcmp(StdI->
model,
"spin") == 0) {
327 NumOp = StdI->
S2 + 1;
328 for (ispin = 0; ispin <= StdI->
S2; ispin++) {
329 Sz = (double)ispin - (
double)StdI->
S2 * 0.5;
331 spin[ispin][0] = ispin;
332 spin[ispin][1] = ispin;
347 if (strcmp(StdI->
model,
"spin") == 0 && StdI->
S2 > 1) {
349 S = (double)StdI->
S2 * 0.5;
350 for (ispin = 0; ispin < StdI->
S2; ispin++) {
351 Sz = (double)ispin - (
double)StdI->
S2 * 0.5;
352 coef[ispin] = sqrt(S*(S + 1.0) - Sz*(Sz + 1.0));
353 spin[ispin][0] = ispin;
354 spin[ispin][1] = ispin + 1;
388 fprintf(stdout,
"\n ERROR ! SpectrumType : %s\n", StdI->
SpectrumType);
394 for (icell = 0; icell < StdI->
NCell; icell++) {
395 for (itau = 0; itau < StdI->
NsiteUC; itau++) {
399 fourier_r[isite] = cos(2.0*StdI->
pi*Cphase);
400 fourier_i[isite] = sin(2.0*StdI->
pi*Cphase);
404 if (strcmp(StdI->
model,
"kondo") == 0) {
405 for (isite = 0; isite < StdI->
nsite / 2; isite++) {
406 fourier_r[isite + StdI->
nsite / 2] = fourier_r[isite];
407 fourier_i[isite + StdI->
nsite / 2] = fourier_i[isite];
412 fp = fopen(
"single.def",
"w");
413 fprintf(fp,
"=============================================\n");
414 if (strcmp(StdI->
model,
"kondo") == 0) {
415 fprintf(fp,
"NSingle %d\n", StdI->
nsite / 2 * NumOp);
418 fprintf(fp,
"NSingle %d\n", StdI->
nsite * NumOp);
420 fprintf(fp,
"=============================================\n");
421 fprintf(fp,
"============== Single Excitation ============\n");
422 fprintf(fp,
"=============================================\n");
423 if (strcmp(StdI->
model,
"kondo") == 0) {
424 for (isite = StdI->
nsite / 2; isite < StdI->nsite; isite++) {
425 fprintf(fp,
"%d %d 0 %25.15f %25.15f\n", isite, spin[0][0],
426 fourier_r[isite] * coef[0], fourier_i[isite] * coef[0]);
430 for (isite = 0; isite < StdI->
nsite; isite++) {
431 fprintf(fp,
"%d %d 0 %25.15f %25.15f\n", isite, spin[0][0],
432 fourier_r[isite] * coef[0], fourier_i[isite] * coef[0]);
435 fprintf(stdout,
" single.def is written.\n\n");
438 fp = fopen(
"pair.def",
"w");
439 fprintf(fp,
"=============================================\n");
440 fprintf(fp,
"NPair %d\n", StdI->
nsite * NumOp);
441 fprintf(fp,
"=============================================\n");
442 fprintf(fp,
"=============== Pair Excitation =============\n");
443 fprintf(fp,
"=============================================\n");
444 for (isite = 0; isite < StdI->
nsite; isite++) {
445 for (ispin = 0; ispin < NumOp; ispin++) {
446 fprintf(fp,
"%d %d %d %d 1 %25.15f %25.15f\n",
447 isite, spin[ispin][0], isite, spin[ispin][1],
448 fourier_r[isite] * coef[ispin], fourier_i[isite] * coef[ispin]);
451 fprintf(stdout,
" pair.def is written.\n\n");
458 if (strcmp(StdI->
model,
"spin") == 0)
459 for (ispin = 0; ispin < StdI->
S2 + 1; ispin++) free(spin[ispin]);
461 for (ispin = 0; ispin < 2; ispin++) free(spin[ispin]);
471 int it, ii, isite, icell, itau, itrans, jsite, jcell, jtau, ntrans0;
472 double Cphase, time, dR[3];
476 fprintf(stdout,
"\n @ Time-evolution\n\n");
488 StdI->
At = (
double **)malloc(
sizeof(
double*) * StdI->
Lanczos_max);
489 Et = (
double **)malloc(
sizeof(
double*) * StdI->
Lanczos_max);
491 StdI->
At[it] = (
double *)malloc(
sizeof(
double) * 3);
492 Et[it] = (
double *)malloc(
sizeof(
double) * 3);
495 if (strcmp(StdI->
PumpType,
"****") == 0) {
497 fprintf(stdout,
" PumpType = quench ###### DEFAULT VALUE IS USED ######\n");
501 fprintf(stdout,
" PumpType = %s\n", StdI->
PumpType);
502 if (strcmp(StdI->
PumpType,
"quench") == 0) {
505 else if (strcmp(StdI->
PumpType,
"pulselaser") == 0) {
507 time = StdI->
dt*(double)it;
508 for (ii = 0; ii < 3; ii++) {
511 Et[it][ii] = -StdI->
VecPot[ii]
521 else if (strcmp(StdI->
PumpType,
"aclaser") == 0) {
523 time = StdI->
dt*(double)it;
524 for (ii = 0; ii < 3; ii++) {
531 else if (strcmp(StdI->
PumpType,
"dclaser") == 0) {
533 time = StdI->
dt*(double)it;
534 for (ii = 0; ii < 3; ii++) {
535 StdI->
At[it][ii] = StdI->
VecPot[ii] * time;
536 Et[it][ii] = -StdI->
VecPot[ii];
542 fprintf(stdout,
"\n ERROR ! PumpType : %s\n", StdI->
PumpType);
548 fp = fopen(
"potential.dat",
"w");
549 fprintf(fp,
"# Time A_W A_L A_H E_W E_L E_H\n");
551 time = StdI->
dt*(double)it;
552 fprintf(fp,
"%f %f %f %f %f %f %f\n",
553 time, StdI->
At[it][0], StdI->
At[it][1], StdI->
At[it][2], Et[it][0], Et[it][1], Et[it][2]);
559 for (it = 0; it < StdI->
Lanczos_max; it++) free(Et[it]);
568 int it, ii, isite, ipump, jpump, npump0;
572 fp = fopen(
"teone.def",
"w");
573 fprintf(fp,
"=============================================\n");
574 fprintf(fp,
"AllTimeStep %d\n", StdI->
Lanczos_max);
575 fprintf(fp,
"=============================================\n");
576 fprintf(fp,
"========= OneBody Time Evolution ==========\n");
577 fprintf(fp,
"=============================================\n");
582 for (ipump = 0; ipump < StdI->
npump[it]; ipump++) {
583 for (jpump = ipump + 1; jpump < StdI->
npump[it]; jpump++) {
588 StdI->
pump[it][ipump] = StdI->
pump[it][ipump] + StdI->
pump[it][jpump];
589 StdI->
pump[it][jpump] = 0.0;
597 for (ipump = 0; ipump < StdI->
npump[it]; ipump++)
598 if (cabs(StdI->
pump[it][ipump]) > 0.000001) npump0 += 1;
600 fprintf(fp,
"%f %d\n", StdI->
dt*(
double)it, npump0);
601 for (ipump = 0; ipump < StdI->
npump[it]; ipump++) {
603 if (cabs(StdI->
pump[it][ipump]) <= 0.000001)
continue;
605 fprintf(fp,
"%5d %5d %5d %5d %25.15f %25.15f\n",
608 creal(StdI->
pump[it][ipump]), cimag(StdI->
pump[it][ipump]));
611 fprintf(stdout,
" teone.def is written.\n\n");
614 fp = fopen(
"tetwo.def",
"w");
615 fprintf(fp,
"=============================================\n");
616 fprintf(fp,
"AllTimeStep %d\n", StdI->
Lanczos_max);
617 fprintf(fp,
"=============================================\n");
618 fprintf(fp,
"========== TwoBody Time Evolution ===========\n");
619 fprintf(fp,
"=============================================\n");
621 fprintf(fp,
"%f %d\n", StdI->
dt*(
double)it, StdI->
nsite);
622 for (isite = 0; isite < StdI->
nsite; isite++) {
623 fprintf(fp,
"%5d %5d %5d %5d %5d %5d %5d %5d %25.15f %25.15f\n",
624 isite, 0, isite, 0, isite, 1, isite, 1, StdI->
Uquench, 0.0);
627 fprintf(stdout,
" tetwo.def is written.\n\n");
637 static void PrintOrb(
struct StdIntList *StdI) {
639 int isite, jsite, iOrb;
641 fp = fopen(
"orbitalidx.def",
"w");
642 fprintf(fp,
"=============================================\n");
643 fprintf(fp,
"NOrbitalIdx %10d\n", StdI->NOrb);
644 fprintf(fp,
"ComplexType %10d\n", StdI->ComplexType);
645 fprintf(fp,
"=============================================\n");
646 fprintf(fp,
"=============================================\n");
648 for (isite = 0; isite < StdI->
nsite; isite++) {
649 for (jsite = 0; jsite < StdI->
nsite; jsite++) {
651 fprintf(fp,
"%5d %5d %5d %5d\n", isite, jsite, StdI->Orb[isite][jsite], StdI->AntiOrb[isite][jsite]);
654 fprintf(fp,
"%5d %5d %5d\n", isite, jsite, StdI->Orb[isite][jsite]);
659 for (iOrb = 0; iOrb < StdI->NOrb; iOrb++)
660 fprintf(fp,
"%5d %5d\n", iOrb, 1);
664 fprintf(stdout,
" orbitalidx.def is written.\n");
666 for (isite = 0; isite < StdI->
nsite; isite++) free(StdI->Orb[isite]);
673 static void PrintOrbPara(
struct StdIntList *StdI) {
675 int isite, jsite, NOrbGC, iOrbGC, isite1, jsite1, iorb;
676 int **OrbGC, **AntiOrbGC;
680 OrbGC = (
int **)malloc(
sizeof(
int*) * StdI->
nsite);
681 AntiOrbGC = (
int **)malloc(
sizeof(
int*) * StdI->
nsite);
682 for (isite = 0; isite < StdI->
nsite; isite++) {
683 OrbGC[isite] = (
int *)malloc(
sizeof(
int) * StdI->
nsite);
684 AntiOrbGC[isite] = (
int *)malloc(
sizeof(
int) * StdI->
nsite);
685 for (jsite = 0; jsite < StdI->
nsite; jsite++) {
686 OrbGC[isite][jsite] = StdI->Orb[isite][jsite];
687 AntiOrbGC[isite][jsite] = StdI->AntiOrb[isite][jsite];
693 for (iorb = 0; iorb < StdI->NOrb; iorb++) {
694 for (isite = 0; isite < StdI->
nsite; isite++) {
695 for (jsite = 0; jsite < StdI->
nsite; jsite++) {
696 if (OrbGC[isite][jsite] == iorb) {
697 OrbGC[jsite][isite] = OrbGC[isite][jsite];
704 for (isite = 0; isite < StdI->
nsite; isite++) {
705 for (jsite = 0; jsite < isite; jsite++) {
706 if (OrbGC[isite][jsite] >= 0) {
707 iOrbGC = OrbGC[isite][jsite];
709 for (isite1 = 0; isite1 < StdI->
nsite; isite1++) {
710 for (jsite1 = 0; jsite1 < StdI->
nsite; jsite1++) {
711 if (OrbGC[isite1][jsite1] == iOrbGC)
712 OrbGC[isite1][jsite1] = NOrbGC;
720 for (isite = 0; isite < StdI->
nsite; isite++) {
721 for (jsite = 0; jsite < StdI->
nsite; jsite++) {
722 OrbGC[isite][jsite] = -1 - OrbGC[isite][jsite];
726 fp = fopen(
"orbitalidxpara.def",
"w");
727 fprintf(fp,
"=============================================\n");
728 fprintf(fp,
"NOrbitalIdx %10d\n", NOrbGC);
729 fprintf(fp,
"ComplexType %10d\n", StdI->ComplexType);
730 fprintf(fp,
"=============================================\n");
731 fprintf(fp,
"=============================================\n");
733 for (isite = 0; isite < StdI->
nsite; isite++) {
734 for (jsite = 0; jsite < StdI->
nsite; jsite++) {
735 if (isite >= jsite)
continue;
737 fprintf(fp,
"%5d %5d %5d %5d\n", isite, jsite, OrbGC[isite][jsite], AntiOrbGC[isite][jsite]);
739 fprintf(fp,
"%5d %5d %5d\n", isite, jsite, OrbGC[isite][jsite]);
743 for (iOrbGC = 0; iOrbGC < NOrbGC; iOrbGC++)
744 fprintf(fp,
"%5d %5d\n", iOrbGC, 1);
748 fprintf(stdout,
" orbitalidxpara.def is written.\n");
750 for (isite = 0; isite < StdI->
nsite; isite++) {
752 free(AntiOrbGC[isite]);
760 static void PrintGutzwiller(
struct StdIntList *StdI)
763 int iCell, isite, jsite, NGutzwiller, iGutz;
766 Gutz = (
int *)malloc(
sizeof(
int) * StdI->
nsite);
768 if (abs(StdI->NMPTrans) == 1 || StdI->NMPTrans == StdI->
NaN_i) {
769 if (strcmp(StdI->
model,
"hubbard") == 0) NGutzwiller = 0;
770 else NGutzwiller = -1;
772 for (isite = 0; isite < StdI->
nsite; isite++) Gutz[isite] = StdI->Orb[isite][isite];
774 for (isite = 0; isite < StdI->
nsite; isite++) {
783 if (Gutz[isite] >= 0) {
786 for (jsite = 0; jsite < StdI->
nsite; jsite++) {
787 if (Gutz[jsite] == iGutz)
788 Gutz[jsite] = NGutzwiller;
793 NGutzwiller = -NGutzwiller;
794 for (isite = 0; isite < StdI->
nsite; isite++) {
795 Gutz[isite] = -1 - Gutz[isite];
799 if (strcmp(StdI->
model,
"hubbard") == 0) NGutzwiller = StdI->
NsiteUC;
800 else if (strcmp(StdI->
model,
"spin") == 0) NGutzwiller = 1;
801 else NGutzwiller = StdI->
NsiteUC + 1;
803 for (iCell = 0; iCell < StdI->
NCell; iCell++) {
804 for (isite = 0; isite < StdI->
NsiteUC; isite++) {
805 if (strcmp(StdI->
model,
"hubbard") == 0)
806 Gutz[isite + StdI->
NsiteUC*iCell] = isite;
807 else if (strcmp(StdI->
model,
"spin") == 0)
808 Gutz[isite + StdI->
NsiteUC*iCell] = 0;
810 Gutz[isite + StdI->
NsiteUC*iCell] = 0;
811 Gutz[isite + StdI->
NsiteUC*(iCell + StdI->
NCell)] = isite + 1;
817 fp = fopen(
"gutzwilleridx.def",
"w");
818 fprintf(fp,
"=============================================\n");
819 fprintf(fp,
"NGutzwillerIdx %10d\n", NGutzwiller);
820 fprintf(fp,
"ComplexType %10d\n", 0);
821 fprintf(fp,
"=============================================\n");
822 fprintf(fp,
"=============================================\n");
824 for (isite = 0; isite < StdI->
nsite; isite++)
825 fprintf(fp,
"%5d %5d\n", isite, Gutz[isite]);
827 for (iGutz = 0; iGutz < NGutzwiller; iGutz++) {
828 if (strcmp(StdI->
model,
"hubbard") == 0 || iGutz > 0)
829 fprintf(fp,
"%5d %5d\n", iGutz, 1);
831 fprintf(fp,
"%5d %5d\n", iGutz, 0);
835 fprintf(stdout,
" gutzwilleridx.def is written.\n");
852 StdI->
NaN_i = 2147483647;
853 StdI->
pi = acos(-1.0);
856 for (i = 0; i < 3; i++) StdI->
length[i] = NaN_d;
857 for (i = 0; i < 3; i++)
858 for (j = 0; j < 3; j++)
876 for (i = 0; i < 3; i++) {
877 for (j = 0; j < 3; j++) {
878 StdI->
J[i][j] = NaN_d;
879 StdI->
Jp[i][j] = NaN_d;
880 StdI->
Jpp[i][j] = NaN_d;
881 StdI->
J0[i][j] = NaN_d;
882 StdI->
J0p[i][j] = NaN_d;
883 StdI->
J0pp[i][j] = NaN_d;
884 StdI->
J1[i][j] = NaN_d;
885 StdI->
J1p[i][j] = NaN_d;
886 StdI->
J1pp[i][j] = NaN_d;
887 StdI->
J2[i][j] = NaN_d;
888 StdI->
J2p[i][j] = NaN_d;
889 StdI->
J2pp[i][j] = NaN_d;
893 StdI->
D[2][2] = NaN_d;
896 for (i = 0; i < 3; i++)
897 for (j = 0; j < 3; j++)
898 StdI->
direct[i][j] = NaN_d;
927 for (i = 0; i < 3; i++)StdI->
phase[i] = NaN_d;
928 StdI->
pi180 = StdI->
pi / 180.0;
932 strcpy(StdI->
model,
"****\0");
933 strcpy(StdI->
lattice,
"****\0");
951 for (i = 0; i < 3; i++)StdI->
SpectrumQ[i] = NaN_d;
952 strcpy(StdI->
method,
"****\0");
953 strcpy(StdI->
Restart,
"****\0");
956 strcpy(StdI->
HamIO,
"****\0");
974 for (i = 0; i < 3; i++)StdI->
VecPot[i] = NaN_d;;
978 strcpy(StdI->CParaFileHead,
"****\0");
979 StdI->NVMCCalMode = StdI->
NaN_i;
980 StdI->NLanczosMode = StdI->
NaN_i;
981 StdI->NDataIdxStart = StdI->
NaN_i;
982 StdI->NDataQtySmp = StdI->
NaN_i;
983 StdI->NSPGaussLeg = StdI->
NaN_i;
984 StdI->NSPStot = StdI->
NaN_i;
985 StdI->NMPTrans = StdI->
NaN_i;
986 StdI->NSROptItrStep = StdI->
NaN_i;
987 StdI->NSROptItrSmp = StdI->
NaN_i;
988 StdI->DSROptRedCut = NaN_d;
989 StdI->DSROptStaDel = NaN_d;
990 StdI->DSROptStepDt = NaN_d;
991 StdI->NVMCWarmUp = StdI->
NaN_i;
992 StdI->NVMCInterval = StdI->
NaN_i;
993 StdI->NVMCSample = StdI->
NaN_i;
994 StdI->NExUpdatePath = StdI->
NaN_i;
995 StdI->RndSeed = StdI->
NaN_i;
996 StdI->NSplitSize = StdI->
NaN_i;
997 StdI->NStore = StdI->
NaN_i;
998 StdI->NSRCG = StdI->
NaN_i;
999 StdI->ComplexType = StdI->
NaN_i;
1000 for (i = 0; i < 3; i++)
1001 for (j = 0; j < 3; j++)
1002 StdI->boxsub[i][j] = StdI->
NaN_i;
1003 StdI->Hsub = StdI->
NaN_i;
1004 StdI->Lsub = StdI->
NaN_i;
1005 StdI->Wsub = StdI->
NaN_i;
1017 valuelen = strlen(value);
1018 for (ii = 0; ii < valuelen; ii++) {
1019 value2 = tolower(value[ii]);
1030 int valuelen, valuelen2, ii;
1032 valuelen = strlen(value);
1034 for (ii = 0; ii < valuelen; ii++){
1035 if (value[ii] !=
' ' &&
1038 value[ii] !=
'\"' &&
1039 value[ii] !=
'\b' &&
1040 value[ii] !=
'\\' &&
1041 value[ii] !=
'\v' &&
1042 value[ii] !=
'\n' &&
1044 value2[valuelen2] = value[ii];
1049 strncpy(value, value2, valuelen2);
1050 value[valuelen2] =
'\0';
1064 if (strcmp(value,
"****") != 0){
1065 fprintf(stdout,
"ERROR ! Keyword %s is duplicated ! \n", keyword);
1069 strcpy(value, valuestring);
1083 if (strcmp(value,
"****") != 0) {
1084 fprintf(stdout,
"ERROR ! Keyword %s is duplicated ! \n", keyword);
1088 strcpy(value, valuestring);
1103 int NaN_i = 2147483647;
1105 if (*value != NaN_i){
1106 fprintf(stdout,
"ERROR ! Keyword %s is duplicated ! \n", keyword);
1110 sscanf(valuestring,
"%d", value);
1124 if (isnan(*value) == 0){
1125 fprintf(stdout,
"ERROR ! Keyword %s is duplicated ! \n", keyword);
1129 sscanf(valuestring,
"%lf", value);
1140 double complex *value
1144 char *valuestring_r, *valuestring_i;
1145 double value_r, value_i;
1147 if (isnan(creal(*value)) == 0) {
1148 fprintf(stdout,
"ERROR ! Keyword %s is duplicated ! \n", keyword);
1153 if (valuestring[0] ==
',') {
1154 valuestring_r = NULL;
1155 valuestring_i = strtok(valuestring,
",");
1158 valuestring_r = strtok(valuestring,
",");
1159 valuestring_i = strtok(NULL,
",");
1162 if (valuestring_r == NULL) {
1166 num = sscanf(valuestring_r,
"%lf", &value_r);
1167 if (num == 1) *value = value_r;
1171 if (valuestring_i == NULL) {
1175 num = sscanf(valuestring_i,
"%lf", &value_i);
1176 if (num == 1) *value += I * value_i;
1177 else *value += I * 0.0;
1187 int isite, nlocspin;
1190 for (isite = 0; isite < StdI->
nsite; isite++)
1191 if (StdI->
locspinflag[isite] != 0) nlocspin = nlocspin + 1;
1193 fp = fopen(
"locspn.def",
"w");
1194 fprintf(fp,
"================================ \n");
1195 fprintf(fp,
"NlocalSpin %5d \n", nlocspin);
1196 fprintf(fp,
"================================ \n");
1197 fprintf(fp,
"========i_0LocSpn_1IteElc ====== \n");
1198 fprintf(fp,
"================================ \n");
1200 for (isite = 0; isite < StdI->
nsite; isite++)
1201 fprintf(fp,
"%5d %5d\n", isite, StdI->
locspinflag[isite]);
1205 fprintf(stdout,
" locspn.def is written.\n");
1213 int jtrans, ktrans, ntrans0;
1215 for (jtrans = 0; jtrans < StdI->
ntrans; jtrans++){
1216 for (ktrans = jtrans + 1; ktrans < StdI->
ntrans; ktrans++){
1222 StdI->
trans[ktrans] = 0.0;
1228 for (ktrans = 0; ktrans < StdI->
ntrans; ktrans++){
1229 if (cabs(StdI->
trans[ktrans]) > 0.000001) ntrans0 = ntrans0 + 1;
1232 fp = fopen(
"trans.def",
"w");
1233 fprintf(fp,
"======================== \n");
1234 fprintf(fp,
"NTransfer %7d \n", ntrans0);
1235 fprintf(fp,
"======================== \n");
1236 fprintf(fp,
"========i_j_s_tijs====== \n");
1237 fprintf(fp,
"======================== \n");
1240 for (ktrans = 0; ktrans < StdI->
ntrans; ktrans++) {
1241 if (cabs(StdI->
trans[ktrans]) > 0.000001)
1242 fprintf(fp,
"%5d %5d %5d %5d %25.15f %25.15f\n",
1245 creal(StdI->
trans[ktrans]), cimag(StdI->
trans[ktrans]));
1250 fprintf(stdout,
" trans.def is written.\n");
1259 fp = fopen(
"namelist.def",
"w");
1260 fprintf( fp,
" ModPara modpara.def\n");
1261 fprintf( fp,
" LocSpin locspn.def\n");
1262 fprintf( fp,
" Trans trans.def\n");
1263 if (StdI->
LCintra == 1) fprintf( fp,
" CoulombIntra coulombintra.def\n");
1264 if (StdI->
LCinter == 1) fprintf( fp,
" CoulombInter coulombinter.def\n");
1265 if (StdI->
LHund == 1)fprintf( fp,
" Hund hund.def\n");
1266 if (StdI->
LEx == 1)fprintf( fp,
" Exchange exchange.def\n");
1267 if (StdI->
LPairLift == 1)fprintf(fp,
" PairLift pairlift.def\n");
1268 if (StdI->
LPairHopp == 1)fprintf(fp,
" PairHop pairhopp.def\n");
1269 if (StdI->
Lintr == 1)fprintf( fp,
" InterAll interall.def\n");
1271 fprintf( fp,
" OneBodyG greenone.def\n");
1272 fprintf( fp,
" TwoBodyG greentwo.def\n");
1275 fprintf( fp,
" CalcMod calcmod.def\n");
1277 fprintf( fp,
"SingleExcitation single.def\n");
1278 else fprintf( fp,
" PairExcitation pair.def\n");
1279 if (strcmp(StdI->
method,
"timeevolution") == 0) {
1281 fprintf(fp,
" TEOneBody teone.def\n");
1283 fprintf(fp,
" TETwoBody tetwo.def\n");
1285 fprintf( fp,
" SpectrumVec %s_eigenvec_0\n",
1287 if (StdI->
lBoost == 1) fprintf( fp,
" Boost boost.def\n");
1288 #elif defined(_mVMC) 1289 fprintf( fp,
" Gutzwiller gutzwilleridx.def\n");
1290 fprintf( fp,
" Jastrow jastrowidx.def\n");
1291 fprintf( fp,
" Orbital orbitalidx.def\n");
1292 if (StdI->
lGC == 1 || (StdI->
Sz2 != 0 && StdI->
Sz2 != StdI->
NaN_i))
1293 fprintf(fp,
" OrbitalParallel orbitalidxpara.def\n");
1294 fprintf( fp,
" TransSym qptransidx.def\n");
1299 fprintf(stdout,
" namelist.def is written.\n");
1309 fp = fopen(
"modpara.def",
"w");
1310 fprintf(fp,
"--------------------\n");
1311 fprintf(fp,
"Model_Parameters 0\n");
1312 fprintf(fp,
"--------------------\n");
1314 fprintf(fp,
"HPhi_Cal_Parameters\n");
1315 fprintf(fp,
"--------------------\n");
1317 fprintf(fp,
"CParaFileHead zqp\n");
1318 fprintf(fp,
"--------------------\n");
1319 fprintf(fp,
"Nsite %-5d\n", StdI->
nsite);
1320 if (StdI->
Sz2 != StdI->
NaN_i) fprintf(fp,
"2Sz %-5d\n", StdI->
Sz2);
1321 if (StdI->
nelec != StdI->
NaN_i) fprintf(fp,
"Ncond %-5d\n", StdI->
nelec);
1322 fprintf(fp,
"Lanczos_max %-5d\n", StdI->
Lanczos_max);
1323 fprintf(fp,
"initial_iv %-5d\n", StdI->
initial_iv);
1324 if(StdI->
nvec != StdI->
NaN_i) fprintf(fp,
"nvec %-5d\n", StdI->
nvec);
1325 fprintf(fp,
"exct %-5d\n", StdI->
exct);
1326 fprintf(fp,
"LanczosEps %-5d\n", StdI->
LanczosEps);
1328 fprintf(fp,
"LargeValue %-25.15e\n", StdI->
LargeValue);
1329 fprintf(fp,
"NumAve %-5d\n", StdI->
NumAve);
1331 fprintf(fp,
"NOmega %-5d\n", StdI->
Nomega);
1332 fprintf(fp,
"OmegaMax %-25.15e %-25.15e\n", StdI->
OmegaMax, StdI->
OmegaIm);
1333 fprintf(fp,
"OmegaMin %-25.15e %-25.15e\n", StdI->
OmegaMin, StdI->
OmegaIm);
1334 fprintf(fp,
"OmegaOrg 0.0 0.0\n");
1335 if (strcmp(StdI->
method,
"timeevolution") == 0)
1336 fprintf(fp,
"ExpandCoef %-5d\n", StdI->
ExpandCoef);
1337 #elif defined(_mVMC) 1338 fprintf(fp,
"VMC_Cal_Parameters\n");
1339 fprintf(fp,
"--------------------\n");
1341 fprintf(fp,
"CParaFileHead %s\n", StdI->CParaFileHead);
1342 fprintf(fp,
"--------------------\n");
1343 fprintf(fp,
"NVMCCalMode %d\n", StdI->NVMCCalMode);
1345 fprintf(fp,
"--------------------\n");
1346 fprintf(fp,
"NDataIdxStart %d\n", StdI->NDataIdxStart);
1347 fprintf(fp,
"NDataQtySmp %d\n", StdI->NDataQtySmp);
1348 fprintf(fp,
"--------------------\n");
1349 fprintf(fp,
"Nsite %d\n", StdI->
nsite);
1350 fprintf(fp,
"Ncond %-5d\n", StdI->
nelec);
1352 fprintf(fp,
"2Sz %d\n", StdI->
Sz2);
1353 if (StdI->NSPGaussLeg != StdI->
NaN_i)
1354 fprintf(fp,
"NSPGaussLeg %d\n", StdI->NSPGaussLeg);
1355 if (StdI->NSPStot != StdI->
NaN_i)
1356 fprintf(fp,
"NSPStot %d\n", StdI->NSPStot);
1357 fprintf(fp,
"NMPTrans %d\n", StdI->NMPTrans);
1358 fprintf(fp,
"NSROptItrStep %d\n", StdI->NSROptItrStep);
1359 fprintf(fp,
"NSROptItrSmp %d\n", StdI->NSROptItrSmp);
1360 fprintf(fp,
"DSROptRedCut %.10f\n", StdI->DSROptRedCut);
1361 fprintf(fp,
"DSROptStaDel %.10f\n", StdI->DSROptStaDel);
1362 fprintf(fp,
"DSROptStepDt %.10f\n", StdI->DSROptStepDt);
1363 fprintf(fp,
"NVMCWarmUp %d\n", StdI->NVMCWarmUp);
1364 fprintf(fp,
"NVMCInterval %d\n", StdI->NVMCInterval);
1365 fprintf(fp,
"NVMCSample %d\n", StdI->NVMCSample);
1366 fprintf(fp,
"NExUpdatePath %d\n", StdI->NExUpdatePath);
1367 fprintf(fp,
"RndSeed %d\n", StdI->RndSeed);
1368 fprintf(fp,
"NSplitSize %d\n", StdI->NSplitSize);
1369 fprintf(fp,
"NStore %d\n", StdI->NStore);
1370 fprintf(fp,
"NSRCG %d\n", StdI->NSRCG);
1375 fprintf(stdout,
" modpara.def is written.\n");
1384 int ngreen, igreen, store, xkondo;
1385 int isite, jsite, ispin, jspin, SiMax, SjMax;
1392 for (store = 0; store < 2; store++) {
1395 greenindx = (
int **)malloc(
sizeof(
int*) * (ngreen + 1));
1396 for (igreen = 0; igreen < ngreen; igreen++) {
1397 greenindx[igreen] = (
int *)malloc(
sizeof(
int) * 4);
1402 if (strcmp(StdI->
model,
"kondo") == 0) xkondo = 2;
1406 for (isite = 0; isite < StdI->
NsiteUC*xkondo; isite++) {
1413 for (ispin = 0; ispin <= SiMax; ispin++) {
1414 for (jsite = 0; jsite < StdI->
nsite; jsite++) {
1419 for (jspin = 0; jspin <= SjMax; jspin++) {
1421 if (isite != jsite &&
1424 if (ispin == jspin){
1426 greenindx[ngreen][0] = isite;
1427 greenindx[ngreen][1] = ispin;
1428 greenindx[ngreen][2] = jsite;
1429 greenindx[ngreen][3] = jspin;
1440 for (isite = 0; isite < StdI->
nsite; isite++) {
1445 for (ispin = 0; ispin <= SiMax; ispin++) {
1446 for (jsite = 0; jsite < StdI->
nsite; jsite++) {
1451 for (jspin = 0; jspin <= SjMax; jspin++) {
1453 if (isite != jsite &&
1457 greenindx[ngreen][0] = isite;
1458 greenindx[ngreen][1] = ispin;
1459 greenindx[ngreen][2] = jsite;
1460 greenindx[ngreen][3] = jspin;
1471 fp = fopen(
"greenone.def",
"w");
1472 fprintf(fp,
"===============================\n");
1473 fprintf(fp,
"NCisAjs %10d\n", ngreen);
1474 fprintf(fp,
"===============================\n");
1475 fprintf(fp,
"======== Green functions ======\n");
1476 fprintf(fp,
"===============================\n");
1477 for (igreen = 0; igreen < ngreen; igreen++) {
1478 fprintf(fp,
"%5d %5d %5d %5d\n",
1479 greenindx[igreen][0], greenindx[igreen][1], greenindx[igreen][2], greenindx[igreen][3]);
1484 fprintf(stdout,
" greenone.def is written.\n");
1486 for (igreen = 0; igreen < ngreen; igreen++) {
1487 free(greenindx[igreen]);
1499 int ngreen, store, igreen, xkondo;
1500 int site1, site2, site3, site4;
1501 int spin1, spin2, spin3, spin4;
1502 int S1Max, S2Max, S3Max, S4Max;
1509 for (store = 0; store < 2; store++) {
1512 greenindx = (
int **)malloc(
sizeof(
int*) * (ngreen + 1));
1513 for (igreen = 0; igreen < ngreen; igreen++)
1514 greenindx[igreen] = (
int *)malloc(
sizeof(
int) * 8);
1518 if (strcmp(StdI->
model,
"kondo") == 0) xkondo = 2;
1521 for (site1 = 0; site1 < StdI->
NsiteUC*xkondo; site1++) {
1527 for (spin1 = 0; spin1 <= S1Max; spin1++) {
1528 for (spin2 = 0; spin2 <= S1Max; spin2++) {
1530 for (site3 = 0; site3 < StdI->
nsite; site3++) {
1534 for (spin3 = 0; spin3 <= S3Max; spin3++) {
1535 for (spin4 = 0; spin4 <= S3Max; spin4++) {
1537 if (spin1 - spin2 + spin3 - spin4 == 0) {
1540 if (spin1 != spin2 || spin3 != spin4)
1542 greenindx[ngreen][0] = site1;
1543 greenindx[ngreen][1] = spin1;
1544 greenindx[ngreen][2] = site3;
1545 greenindx[ngreen][3] = spin4;
1546 greenindx[ngreen][4] = site3;
1547 greenindx[ngreen][5] = spin3;
1548 greenindx[ngreen][6] = site1;
1549 greenindx[ngreen][7] = spin2;
1554 greenindx[ngreen][0] = site1;
1555 greenindx[ngreen][1] = spin1;
1556 greenindx[ngreen][2] = site1;
1557 greenindx[ngreen][3] = spin2;
1558 greenindx[ngreen][4] = site3;
1559 greenindx[ngreen][5] = spin3;
1560 greenindx[ngreen][6] = site3;
1561 greenindx[ngreen][7] = spin4;
1577 for (store = 0; store < 2; store++) {
1580 greenindx = (
int **)malloc(
sizeof(
int*) * (ngreen + 1));
1581 for (igreen = 0; igreen < ngreen; igreen++)
1582 greenindx[igreen] = (
int *)malloc(
sizeof(
int) * 8);
1586 for (site1 = 0; site1 < StdI->
nsite; site1++) {
1590 for (spin1 = 0; spin1 <= S1Max; spin1++) {
1592 for (site2 = 0; site2 < StdI->
nsite; site2++) {
1595 && site1 != site2)
continue;
1599 for (spin2 = 0; spin2 <= S2Max; spin2++) {
1601 for (site3 = 0; site3 < StdI->
nsite; site3++) {
1605 for (spin3 = 0; spin3 <= S3Max; spin3++) {
1607 for (site4 = 0; site4 < StdI->
nsite; site4++) {
1610 && site3 != site4)
continue;
1614 for (spin4 = 0; spin4 <= S4Max; spin4++) {
1617 greenindx[ngreen][0] = site1;
1618 greenindx[ngreen][1] = spin1;
1619 greenindx[ngreen][2] = site2;
1620 greenindx[ngreen][3] = spin2;
1621 greenindx[ngreen][4] = site3;
1622 greenindx[ngreen][5] = spin3;
1623 greenindx[ngreen][6] = site4;
1624 greenindx[ngreen][7] = spin4;
1640 fp = fopen(
"greentwo.def",
"w");
1641 fprintf(fp,
"=============================================\n");
1642 fprintf(fp,
"NCisAjsCktAltDC %10d\n", ngreen);
1643 fprintf(fp,
"=============================================\n");
1644 fprintf(fp,
"======== Green functions for Sq AND Nq ======\n");
1645 fprintf(fp,
"=============================================\n");
1646 for (igreen = 0; igreen < ngreen; igreen++) {
1647 fprintf(fp,
"%5d %5d %5d %5d %5d %5d %5d %5d\n",
1648 greenindx[igreen][0], greenindx[igreen][1], greenindx[igreen][2], greenindx[igreen][3],
1649 greenindx[igreen][4], greenindx[igreen][5], greenindx[igreen][6], greenindx[igreen][7]);
1654 fprintf(stdout,
" greentwo.def is written.\n");
1656 for (igreen = 0; igreen < ngreen; igreen++) {
1657 free(greenindx[igreen]);
1671 fprintf(stdout,
"\nSorry, specified combination, \n");
1672 fprintf(stdout,
" MODEL : %s \n", model);
1673 fprintf(stdout,
" LATTICE : %s, \n", lattice);
1674 fprintf(stdout,
"is unsupported in the STANDARD MODE...\n");
1675 fprintf(stdout,
"Please use the EXPART MODE, or write a NEW FUNCTION and post us.\n");
1691 fprintf(stdout,
" ioutputmode = %-10d\n", StdI->
ioutputmode);
1693 else if (strcmp(StdI->
outputmode,
"cor") == 0
1695 || strcmp(StdI->
outputmode,
"correlation") == 0) {
1697 fprintf(stdout,
" ioutputmode = %-10d\n", StdI->
ioutputmode);
1699 else if (strcmp(StdI->
outputmode,
"****") == 0) {
1701 fprintf(stdout,
" ioutputmode = %-10d ###### DEFAULT VALUE IS USED ######\n", StdI->
ioutputmode);
1703 else if (strcmp(StdI->
outputmode,
"raw") == 0
1707 fprintf(stdout,
" ioutputmode = %-10d\n", StdI->
ioutputmode);
1710 fprintf(stdout,
"\n ERROR ! Unsupported OutPutMode : %s\n", StdI->
outputmode);
1737 #elif defined(_mVMC) 1738 if (strcmp(StdI->CParaFileHead,
"****") == 0) {
1739 strcpy(StdI->CParaFileHead,
"zqp\0");
1740 fprintf(stdout,
" CParaFileHead = %-12s###### DEFAULT VALUE IS USED ######\n", StdI->CParaFileHead);
1742 else fprintf(stdout,
" CParaFileHead = %-s\n", StdI->CParaFileHead);
1748 if (StdI->NVMCCalMode == 0)
StdFace_NotUsed_i(
"NDataQtySmp", StdI->NDataQtySmp);
1751 if (StdI->
lGC == 0 && (StdI->
Sz2 == 0 || StdI->
Sz2 == StdI->
NaN_i)) {
1766 if (StdI->NVMCCalMode == 1)
StdFace_NotUsed_i(
"NSROptItrSmp", StdI->NSROptItrSmp);
1773 if (strcmp(StdI->
model,
"hubbard") == 0) StdI->NExUpdatePath = 0;
1774 else if (strcmp(StdI->
model,
"spin") == 0) StdI->NExUpdatePath = 2;
1775 else if (strcmp(StdI->
model,
"kondo") == 0) {
1776 if(StdI->
lGC==0) StdI->NExUpdatePath = 1;
1777 else StdI->NExUpdatePath = 3;
1779 fprintf(stdout,
" %15s = %-10d\n",
"NExUpdatePath", StdI->NExUpdatePath);
1793 if (strcmp(StdI->
model,
"hubbard") == 0){
1806 else if (strcmp(StdI->
model,
"spin") == 0) {
1814 else if (strcmp(StdI->
model,
"kondo") == 0) {
1835 int nintr0, kintr, jintr;
1839 for (kintr = 0; kintr < StdI->
NCintra; kintr++) {
1840 for (jintr = kintr + 1; jintr < StdI->
NCintra; jintr++)
1844 StdI->
Cintra[jintr] = 0.0;
1848 for (kintr = 0; kintr < StdI->
NCintra; kintr++) {
1849 if (fabs(StdI->
Cintra[kintr]) > 0.000001) nintr0 = nintr0 + 1;
1855 fp = fopen(
"coulombintra.def",
"w");
1856 fprintf(fp,
"=============================================\n");
1857 fprintf(fp,
"NCoulombIntra %10d\n", nintr0);
1858 fprintf(fp,
"=============================================\n");
1859 fprintf(fp,
"================== CoulombIntra ================\n");
1860 fprintf(fp,
"=============================================\n");
1861 for (kintr = 0; kintr < StdI->
NCintra; kintr++) {
1862 if (fabs(StdI->
Cintra[kintr]) > 0.000001)
1863 fprintf(fp,
"%5d %25.15f\n",
1868 fprintf(stdout,
" coulombintra.def is written.\n");
1873 for (kintr = 0; kintr < StdI->
NCinter; kintr++) {
1874 for (jintr = kintr + 1; jintr < StdI->
NCinter; jintr++)
1884 StdI->
Cinter[jintr] = 0.0;
1888 for (kintr = 0; kintr < StdI->
NCinter; kintr++) {
1889 if (fabs(StdI->
Cinter[kintr]) > 0.000001) nintr0 = nintr0 + 1;
1895 fp = fopen(
"coulombinter.def",
"w");
1896 fprintf(fp,
"=============================================\n");
1897 fprintf(fp,
"NCoulombInter %10d\n", nintr0);
1898 fprintf(fp,
"=============================================\n");
1899 fprintf(fp,
"================== CoulombInter ================\n");
1900 fprintf(fp,
"=============================================\n");
1901 for (kintr = 0; kintr < StdI->
NCinter; kintr++) {
1902 if (fabs(StdI->
Cinter[kintr]) > 0.000001)
1903 fprintf(fp,
"%5d %5d %25.15f\n",
1908 fprintf(stdout,
" coulombinter.def is written.\n");
1913 for (kintr = 0; kintr < StdI->
NHund; kintr++) {
1914 for (jintr = kintr + 1; jintr < StdI->
NHund; jintr++)
1923 StdI->
Hund[kintr] += StdI->
Hund[jintr];
1924 StdI->
Hund[jintr] = 0.0;
1928 for (kintr = 0; kintr < StdI->
NHund; kintr++) {
1929 if (fabs(StdI->
Hund[kintr]) > 0.000001) nintr0 = nintr0 + 1;
1931 if (nintr0 == 0 || StdI->
lBoost == 1) StdI->
LHund = 0;
1932 else StdI->
LHund = 1;
1934 if (StdI->
LHund == 1) {
1935 fp = fopen(
"hund.def",
"w");
1936 fprintf(fp,
"=============================================\n");
1937 fprintf(fp,
"NHund %10d\n", nintr0);
1938 fprintf(fp,
"=============================================\n");
1939 fprintf(fp,
"=============== Hund coupling ===============\n");
1940 fprintf(fp,
"=============================================\n");
1941 for (kintr = 0; kintr < StdI->
NHund; kintr++) {
1942 if (fabs(StdI->
Hund[kintr]) > 0.000001)
1943 fprintf(fp,
"%5d %5d %25.15f\n",
1948 fprintf(stdout,
" hund.def is written.\n");
1953 for (kintr = 0; kintr < StdI->
NEx; kintr++) {
1954 for (jintr = kintr + 1; jintr < StdI->
NEx; jintr++)
1963 StdI->
Ex[kintr] += StdI->
Ex[jintr];
1964 StdI->
Ex[jintr] = 0.0;
1968 for (kintr = 0; kintr < StdI->
NEx; kintr++) {
1969 if (fabs(StdI->
Ex[kintr]) > 0.000001) nintr0 = nintr0 + 1;
1971 if (nintr0 == 0 || StdI->
lBoost == 1) StdI->
LEx = 0;
1974 if (StdI->
LEx == 1) {
1975 fp = fopen(
"exchange.def",
"w");
1976 fprintf(fp,
"=============================================\n");
1977 fprintf(fp,
"NExchange %10d\n", nintr0);
1978 fprintf(fp,
"=============================================\n");
1979 fprintf(fp,
"====== ExchangeCoupling coupling ============\n");
1980 fprintf(fp,
"=============================================\n");
1981 for (kintr = 0; kintr < StdI->
NEx; kintr++) {
1982 if (fabs(StdI->
Ex[kintr]) > 0.000001)
1983 fprintf(fp,
"%5d %5d %25.15f\n",
1984 StdI->
ExIndx[kintr][0], StdI->
ExIndx[kintr][1], StdI->
Ex[kintr]);
1988 fprintf(stdout,
" exchange.def is written.\n");
1993 for (kintr = 0; kintr < StdI->
NPairLift; kintr++) {
1994 for (jintr = kintr + 1; jintr < StdI->
NPairLift; jintr++)
2008 for (kintr = 0; kintr < StdI->
NPairLift; kintr++) {
2009 if (fabs(StdI->
PairLift[kintr]) > 0.000001) nintr0 = nintr0 + 1;
2015 fp = fopen(
"pairlift.def",
"w");
2016 fprintf(fp,
"=============================================\n");
2017 fprintf(fp,
"NPairLift %10d\n", nintr0);
2018 fprintf(fp,
"=============================================\n");
2019 fprintf(fp,
"====== Pair-Lift term ============\n");
2020 fprintf(fp,
"=============================================\n");
2021 for (kintr = 0; kintr < StdI->
NPairLift; kintr++) {
2022 if (fabs(StdI->
PairLift[kintr]) > 0.000001)
2023 fprintf(fp,
"%5d %5d %25.15f\n",
2028 fprintf(stdout,
" pairlift.def is written.\n");
2033 for (kintr = 0; kintr < StdI->
NPairHopp; kintr++) {
2034 for (jintr = kintr + 1; jintr < StdI->
NPairHopp; jintr++)
2048 for (kintr = 0; kintr < StdI->
NPairHopp; kintr++) {
2049 if (fabs(StdI->
PairHopp[kintr]) > 0.000001) nintr0 = nintr0 + 1;
2055 fp = fopen(
"pairhopp.def",
"w");
2056 fprintf(fp,
"=============================================\n");
2057 fprintf(fp,
"NPairHopp %10d\n", nintr0);
2058 fprintf(fp,
"=============================================\n");
2059 fprintf(fp,
"====== Pair-Hopping term ============\n");
2060 fprintf(fp,
"=============================================\n");
2061 for (kintr = 0; kintr < StdI->
NPairHopp; kintr++) {
2062 if (fabs(StdI->
PairHopp[kintr]) > 0.000001)
2063 fprintf(fp,
"%5d %5d %25.15f\n",
2068 fprintf(stdout,
" pairhopp.def is written.\n");
2073 for (jintr = 0; jintr < StdI->
nintr; jintr++) {
2074 for (kintr = jintr + 1; kintr < StdI->
nintr; kintr++) {
2094 StdI->
intr[jintr] = StdI->
intr[jintr] + StdI->
intr[kintr];
2095 StdI->
intr[kintr] = 0.0;
2116 StdI->
intr[jintr] = StdI->
intr[jintr] - StdI->
intr[kintr];
2117 StdI->
intr[kintr] = 0.0;
2122 for (jintr = 0; jintr < StdI->
nintr; jintr++) {
2123 for (kintr = jintr + 1; kintr < StdI->
nintr; kintr++) {
2170 StdI->
intr[kintr] = -StdI->
intr[kintr];
2175 for (jintr = 0; jintr < StdI->
nintr; jintr++) {
2197 StdI->
intr[jintr] = 0.0;
2202 for (kintr = 0; kintr < StdI->
nintr; kintr++) {
2203 if (cabs(StdI->
intr[kintr]) > 0.000001) nintr0 = nintr0 + 1;
2205 if (nintr0 == 0 || StdI->
lBoost == 1) StdI->
Lintr = 0;
2206 else StdI->
Lintr = 1;
2208 if (StdI->
Lintr == 1) {
2209 fp = fopen(
"interall.def",
"w");
2210 fprintf(fp,
"====================== \n");
2211 fprintf(fp,
"NInterAll %7d \n", nintr0);
2212 fprintf(fp,
"====================== \n");
2213 fprintf(fp,
"========zInterAll===== \n");
2214 fprintf(fp,
"====================== \n");
2218 for (kintr = 0; kintr < StdI->
nintr; kintr++) {
2219 if (cabs(StdI->
intr[kintr]) > 0.000001)
2220 fprintf(fp,
"%5d %5d %5d %5d %5d %5d %5d %5d %25.15f %25.15f\n",
2225 creal(StdI->
intr[kintr]), cimag(StdI->
intr[kintr]));
2231 fprintf(stdout,
" interall.def is written.\n");
2246 char *keyword, *value;
2250 fprintf(stdout,
"\n###### Input Parameter of Standard Intarface ######\n");
2251 if ((fp = fopen(fname,
"r")) == NULL) {
2252 fprintf(stdout,
"\n ERROR ! Cannot open input file %s !\n\n", fname);
2256 fprintf(stdout,
"\n Open Standard-Mode Inputfile %s \n\n", fname);
2261 while (fgets(ctmpline, 256, fp) != NULL) {
2264 if (strncmp(ctmpline,
"//", 2) == 0) {
2265 fprintf(stdout,
" Skipping a line.\n");
2268 else if (ctmpline[0] ==
'\0') {
2269 fprintf(stdout,
" Skipping a line.\n");
2272 keyword = strtok(ctmpline,
"=");
2273 value = strtok(NULL,
"=");
2274 if (value == NULL) {
2275 fprintf(stdout,
"\n ERROR ! \"=\" is NOT found !\n\n");
2279 fprintf(stdout,
" KEYWORD : %-20s | VALUE : %s \n", keyword, value);
2518 #elif defined(_mVMC) 2519 else if (strcmp(keyword,
"a0hsub") == 0)
StoreWithCheckDup_i(keyword, value, &StdI->boxsub[0][2]);
2520 else if (strcmp(keyword,
"a0lsub") == 0)
StoreWithCheckDup_i(keyword, value, &StdI->boxsub[0][1]);
2521 else if (strcmp(keyword,
"a0wsub") == 0)
StoreWithCheckDup_i(keyword, value, &StdI->boxsub[0][0]);
2522 else if (strcmp(keyword,
"a1hsub") == 0)
StoreWithCheckDup_i(keyword, value, &StdI->boxsub[1][2]);
2523 else if (strcmp(keyword,
"a1lsub") == 0)
StoreWithCheckDup_i(keyword, value, &StdI->boxsub[1][1]);
2524 else if (strcmp(keyword,
"a1wsub") == 0)
StoreWithCheckDup_i(keyword, value, &StdI->boxsub[1][0]);
2525 else if (strcmp(keyword,
"a2hsub") == 0)
StoreWithCheckDup_i(keyword, value, &StdI->boxsub[2][2]);
2526 else if (strcmp(keyword,
"a2lsub") == 0)
StoreWithCheckDup_i(keyword, value, &StdI->boxsub[2][1]);
2527 else if (strcmp(keyword,
"a2wsub") == 0)
StoreWithCheckDup_i(keyword, value, &StdI->boxsub[2][0]);
2528 else if (strcmp(keyword,
"complextype") == 0)
StoreWithCheckDup_i(keyword, value, &StdI->ComplexType);
2529 else if (strcmp(keyword,
"cparafilehead") == 0)
StoreWithCheckDup_s(keyword, value, StdI->CParaFileHead);
2530 else if (strcmp(keyword,
"dsroptredcut") == 0)
StoreWithCheckDup_d(keyword, value, &StdI->DSROptRedCut);
2531 else if (strcmp(keyword,
"dsroptstadel") == 0)
StoreWithCheckDup_d(keyword, value, &StdI->DSROptStaDel);
2532 else if (strcmp(keyword,
"dsroptstepdt") == 0)
StoreWithCheckDup_d(keyword, value, &StdI->DSROptStepDt);
2535 else if (strcmp(keyword,
"nvmccalmode") == 0)
StoreWithCheckDup_i(keyword, value, &StdI->NVMCCalMode);
2536 else if (strcmp(keyword,
"ndataidxstart") == 0)
StoreWithCheckDup_i(keyword, value, &StdI->NDataIdxStart);
2537 else if (strcmp(keyword,
"ndataqtysmp") == 0)
StoreWithCheckDup_i(keyword, value, &StdI->NDataQtySmp);
2538 else if (strcmp(keyword,
"nlanczosmode") == 0)
StoreWithCheckDup_i(keyword, value, &StdI->NLanczosMode);
2539 else if (strcmp(keyword,
"nmptrans") == 0)
StoreWithCheckDup_i(keyword, value, &StdI->NMPTrans);
2540 else if (strcmp(keyword,
"nspgaussleg") == 0)
StoreWithCheckDup_i(keyword, value, &StdI->NSPGaussLeg);
2541 else if (strcmp(keyword,
"nsplitsize") == 0)
StoreWithCheckDup_i(keyword, value, &StdI->NSplitSize);
2542 else if (strcmp(keyword,
"nspstot") == 0)
StoreWithCheckDup_i(keyword, value, &StdI->NSPStot);
2543 else if (strcmp(keyword,
"nsroptitrsmp") == 0)
StoreWithCheckDup_i(keyword, value, &StdI->NSROptItrSmp);
2544 else if (strcmp(keyword,
"nsroptitrstep") == 0)
StoreWithCheckDup_i(keyword, value, &StdI->NSROptItrStep);
2545 else if (strcmp(keyword,
"nstore") == 0)
StoreWithCheckDup_i(keyword, value, &StdI->NStore);
2546 else if (strcmp(keyword,
"nsrcg") == 0)
StoreWithCheckDup_i(keyword, value, &StdI->NSRCG);
2547 else if (strcmp(keyword,
"nvmcinterval") == 0)
StoreWithCheckDup_i(keyword, value, &StdI->NVMCInterval);
2548 else if (strcmp(keyword,
"nvmcsample") == 0)
StoreWithCheckDup_i(keyword, value, &StdI->NVMCSample);
2549 else if (strcmp(keyword,
"nvmcwarmup") == 0)
StoreWithCheckDup_i(keyword, value, &StdI->NVMCWarmUp);
2550 else if (strcmp(keyword,
"rndseed") == 0)
StoreWithCheckDup_i(keyword, value, &StdI->RndSeed);
2554 fprintf(stdout,
"ERROR ! Unsupported Keyword in Standard mode!\n");
2560 fprintf(stdout,
"\n");
2561 fprintf(stdout,
"####### Construct Model #######\n");
2562 fprintf(stdout,
"\n");
2568 fprintf(stdout,
" CDataFileHead = %-12s###### DEFAULT VALUE IS USED ######\n", StdI->
CDataFileHead);
2570 else fprintf(stdout,
" CDataFileHead = %-s\n", StdI->
CDataFileHead);
2574 if (strcmp(StdI->
model,
"fermionhubbard") == 0
2575 || strcmp(StdI->
model,
"hubbard") == 0)
2576 strcpy(StdI->
model,
"hubbard\0");
2577 else if(strcmp(StdI->
model,
"fermionhubbardgc") == 0
2578 || strcmp(StdI->
model,
"hubbardgc") == 0) {
2579 strcpy(StdI->
model,
"hubbard\0");
2582 else if (strcmp(StdI->
model,
"spin") == 0)
2583 strcpy(StdI->
model,
"spin\0");
2584 else if (strcmp(StdI->
model,
"spingc") == 0) {
2585 strcpy(StdI->
model,
"spin\0");
2589 else if(strcmp(StdI->
model,
"spingcboost") == 0 ||
2590 strcmp(StdI->
model,
"spingccma") == 0) {
2591 strcpy(StdI->
model,
"spin\0");
2596 else if (strcmp(StdI->
model,
"kondolattice") == 0
2597 || strcmp(StdI->
model,
"kondo") == 0) {
2598 strcpy(StdI->
model,
"kondo\0");
2600 else if(strcmp(StdI->
model,
"kondolatticegc") == 0
2601 || strcmp(StdI->
model,
"kondogc") == 0) {
2602 strcpy(StdI->
model,
"kondo\0");
2610 if (strcmp(StdI->
method,
"direct") == 0
2611 || strcmp(StdI->
method,
"alldiag") == 0)
2612 strcpy(StdI->
method,
"fulldiag\0");
2613 else if (strcmp(StdI->
method,
"te") == 0
2614 || strcmp(StdI->
method,
"time-evolution") == 0) {
2615 strcpy(StdI->
method,
"timeevolution\0");
2625 if (strcmp(StdI->
lattice,
"chain") == 0
2627 else if (strcmp(StdI->
lattice,
"face-centeredorthorhombic") == 0
2628 || strcmp(StdI->
lattice,
"fcorthorhombic") == 0
2630 else if (strcmp(StdI->
lattice,
"honeycomb") == 0
2632 else if (strcmp(StdI->
lattice,
"kagome") == 0
2634 else if (strcmp(StdI->
lattice,
"ladder") == 0
2636 else if (strcmp(StdI->
lattice,
"orthorhombic") == 0
2639 else if (strcmp(StdI->
lattice,
"tetragonal") == 0
2640 || strcmp(StdI->
lattice,
"tetragonallattice") == 0
2641 || strcmp(StdI->
lattice,
"square") == 0
2643 else if (strcmp(StdI->
lattice,
"triangular") == 0
2654 if (strcmp(StdI->
lattice,
"chain") == 0
2656 else if (strcmp(StdI->
lattice,
"honeycomb") == 0
2658 else if (strcmp(StdI->
lattice,
"kagome") == 0
2660 else if (strcmp(StdI->
lattice,
"ladder") == 0
2666 fprintf(stdout,
"\n");
2667 fprintf(stdout,
"###### Print Expert input files ######\n");
2668 fprintf(stdout,
"\n");
2678 #elif defined(_mVMC) 2680 if(StdI->
lGC == 0 && (StdI->
Sz2 == 0 || StdI->
Sz2 == StdI->
NaN_i))
2684 StdFace_generate_orb(StdI);
2687 if(StdI->
lGC == 1 || (StdI->
Sz2 != 0 && StdI->
Sz2 != StdI->
NaN_i) )
2689 PrintGutzwiller(StdI);
2700 for (ktrans = 0; ktrans < StdI->
ntrans; ktrans++) {
2705 for (kintr = 0; kintr < StdI->
nintr; kintr++) {
2711 fprintf(stdout,
"\n###### Input files are generated. ######\n\n");
static void StdFace_ResetVals(struct StdIntList *StdI)
Clear grobal variables in the standard mode All variables refered in this function is modified...
void StdFace_Triangular(struct StdIntList *StdI)
Setup a Hamiltonian for the Triangular lattice.
double OmegaIm
Imaginary part of frequency.
static void PrintCalcMod(struct StdIntList *StdI)
Print calcmod.def.
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...
int NPairHopp
Number of pair-hopping term, counted in each lattice file.
char Restart[256]
The name of restart mode, input from file.
static void PrintInteractions(struct StdIntList *StdI)
Output .def file for Specific interaction.
static void Print2Green(struct StdIntList *StdI)
Print greentwo.def.
static void PrintNamelist(struct StdIntList *StdI)
Print namelist.def.
double V2
Anisotropic Coulomb potential (1st), input parameter.
int LEx
Print exchange.def or not, set in PrintInteractions().
int NHund
Number of Hund term, counted in each lattice file.
double J0pp[3][3]
Isotropic, diagonal/off-diagonal spin coupling (3rd Near.), input parameter J0''x, J0''y, J0''z, J0''xy, etc. or set in StdFace_InputSpin().
static void StoreWithCheckDup_sl(char *keyword, char *valuestring, char *value)
Store an input value into the valiable (string) Force string lower. If duplicated, HPhi will stop.
double tshift
Shift of time-step of laser.
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 cutoff_t
Cutoof for the hopping in wannier90, input from file.
double J[3][3]
Isotropic, diagonal/off-diagonal spin coupling (1st Near.), input parameter Jx, Jy, Jz, Jxy, etc.
int L
Number of sites along the 2nd axis, input parameter.
static void CheckOutputMode(struct StdIntList *StdI)
Verify outputmode.
int ExpandCoef
The number of Hamiltonian-vector operation for the time-evolution.
double complex * intr
[StdIntList::nintr] Coefficient of general two-body term, malloc in StdFace_MallocInteractions() and ...
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_Ladder_Boost(struct StdIntList *StdI)
double pi180
, set in StdFace_ResetVals().
double J1ppAll
Anisotropic, diagonal spin coupling (3rd Near), input parameter J1''.
int initial_iv
the number for generating random number, input from file.
double ** At
[StdIntList::nt][3] Vector potential.
double J2pp[3][3]
Isotropic, diagonal/off-diagonal spin coupling (3rd Near.), input parameter J2''x, J2''y, J2''z, J2''xy, etc. or set in StdFace_InputSpin().
int LCinter
Print coulombinter.def or not, set in PrintInteractions().
int NumAve
Number of trials for TPQ calculation.
double * Ex
[StdIntList::NEx] Coefficient of exchange term, malloc in StdFace_MallocInteractions() and set in Std...
double JpAll
Isotropic, diagonal spin coupling (2nd Near), input parameter Jp.
void StdFace_Chain(struct StdIntList *StdI)
Setup a Hamiltonian for the Hubbard model on a Chain lattice.
int LCintra
Print coulombintra.def or not, set in PrintInteractions().
double J1[3][3]
Isotropic, diagonal/off-diagonal spin coupling (1st Near.), input parameter J1x, J1y, J1z, J1xy, etc. or set in StdFace_InputSpinNN().
int ioutputmode
Switch associated to StdIntList::outputmode.
int ** PLIndx
[StdIntList::NPairLift][2] Site indices of pair-lift term, malloc in StdFace_MallocInteractions() and...
double J2p[3][3]
Isotropic, diagonal/off-diagonal spin coupling (2nd Near.), input parameter J2'x, J2'y...
double complex * trans
[StdIntList::ntrans] Coefficient of one-body term, malloc in StdFace_MallocInteractions() and set in ...
char SpectrumType[256]
The type of mode for spectrum, input from file.
static void Text2Lower(char *value)
double complex t
Nearest-neighbor hopping, input parameter.
double JAll
Isotropic, diagonal spin coupling (1st Near.), input parameter J.
static void PrintPump(struct StdIntList *StdI)
Print single.def or pair.def.
int S2
Total spin |S| of a local spin, input from file.
int Nomega
Number of frequencies, input from file.
int ** ExIndx
[StdIntList::NEx][2] Site indices of exchange term, malloc in StdFace_MallocInteractions() and set in...
char CalcSpec[256]
The name of mode for spectrum, input from file.
double cutoff_j
Cutoof for the Hund in wannier90, input from file.
int NsiteUC
Number of sites in the unit cell. Defined in the beginning of each lattice function.
static void UnsupportedSystem(char *model, char *lattice)
Stop HPhi if unsupported model is read.
double J1All
Anisotropic, diagonal spin coupling (1st Near), input parameter J1.
void StdFace_Chain_Boost(struct StdIntList *StdI)
Setup a Hamiltonian for the generalized Heisenberg model on a Chain lattice.
double V0p
Anisotropic Coulomb potential (2nd), input parameter.
double J1pp[3][3]
Isotropic, diagonal/off-diagonal spin coupling (3rd Near.), input parameter J1''x, J1''y, J1''z, J1''xy, etc. or set in StdFace_InputSpin().
double OmegaMax
Maximum of frequency for spectrum, input from file.
int W
Number of sites along the 1st axis, input parameter.
double VecPot[3]
Vector potential.
double V2p
Anisotropic Coulomb potential (2nd), input parameter.
double V2pp
Anisotropic Coulomb potential (3rd), input parameter.
double J2ppAll
Anisotropic, diagonal spin coupling (3rd Near), input parameter J2''.
double complex tpp
3rd-nearest hopping, input parameter
int ntrans
Number of transfer, counted in each lattice file.
char model[256]
Name of model, input parameter.
static void PrintExcitation(struct StdIntList *StdI)
Print single.def or pair.def.
int AntiPeriod[3]
If corresponding StdIntList::phase = 180, it becomes 1.
int ** CintraIndx
[StdIntList::NCintra][1] Site indices of intra-site Coulomb term, malloc in StdFace_MallocInteraction...
int NCinter
Number of inter-site Coulomb interaction, counted in each lattice file.
double Gamma
Transvars magnetic field, input parameter.
int NCintra
Number of intra-site Coulomb interaction, counted in each lattice file.
int LPairLift
Print pairlift.def or not, set in PrintInteractions().
int Lintr
Print interall.def or not, set in PrintInteractions().
char OutputExVec[256]
The name of output mode for the excited vector, input from file.
static void PrintModPara(struct StdIntList *StdI)
Print modpara.def.
double cutoff_length_J
Cutoof for R in wannier90, input from file.
double JppAll
Isotropic, diagonal spin coupling (3rd Near), input parameter J''.
double complex t1pp
Anisotropic hopping (3rd), input parameter.
double V1
Anisotropic Coulomb potential (1st), input parameter.
double J0All
Anisotropic, diagonal spin coupling (1st 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 J0ppAll
Anisotropic, diagonal spin coupling (3rd Near), input parameter J0''.
double U
On-site Coulomb potential, input parameter.
double complex t0p
Anisotropic hopping (2nd), input parameter.
double * Hund
[StdIntList::NHund] Coefficient of Hund term, malloc in StdFace_MallocInteractions() and set in StdFa...
int ** Cell
[StdIntList][3] The cell position in the fractional coordinate. Malloc and Set in StdFace_InitSite()...
double * PairLift
[StdIntList::NPairLift] Coefficient of pair-lift term, malloc in StdFace_MallocInteractions() and set...
char InitialVecType[256]
The name of initialguess-type, input from file.
double complex t2pp
Anisotropic hopping (3rd), input parameter.
static void StoreWithCheckDup_s(char *keyword, char *valuestring, char *value)
Store an input value into the valiable (string) If duplicated, HPhi will stop.
double SpectrumQ[3]
wavenumver (q-vector) in fractional coordinate
double phase[3]
Boundary phase, input parameter phase0, etc.
int exct
The number of eigenvectors to be computed. input from file.
int *** pumpindx
[StdIntList::nt][StdIntList::npump][4] Site/spin indices of one-body term, malloc in StdFace_MallocIn...
double V1pp
Anisotropic Coulomb potential (3rd), input parameter.
int NPairLift
Number of pair-lift term, counted in each lattice file.
double tdump
Time scale of dumping.
double J0pAll
Anisotropic, diagonal spin coupling (2nd Near), input parameter J0'.
int PumpBody
one- or two-body pumping, defined from StdIntList::PumpType
int * npump
[StdIntList::nt] Number of transfer, counted in each lattice file.
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 OmegaMin
Minimum of frequency for spectrum, input from file.
int LanczosTarget
Which eigenvector is used for the convergence check.
int LanczosEps
Convergence threshold for the Lanczos method.
int ** HundIndx
[StdIntList::NHund][2] Site indices of Hund term, malloc in StdFace_MallocInteractions() and set in S...
double complex tp
2nd-nearest hopping, input parameter
void StdFace_Honeycomb(struct StdIntList *StdI)
Setup a Hamiltonian for the Hubbard model on a Honeycomb lattice.
char EigenVecIO[256]
The name of I/O mode for eigenvector, input from file.
double Jpp[3][3]
Isotropic, diagonal/off-diagonal spin coupling (3rd Near.), input parameter J''x, J''y...
int LHund
Print hund.def or not, set in PrintInteractions().
int Lanczos_max
The maxixmum number of iterations, input from file.
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().
char HamIO[256]
The name of I/O mode for Hamiltonian, input from file.
static void PrintTrans(struct StdIntList *StdI)
Print the transfer file.
double complex t0pp
Anisotropic hopping (3rd), input parameter.
double V0
Anisotropic Coulomb potential (1st), input parameter.
double cutoff_length_t
Cutoof for R in wannier90, input from file.
double complex ** pump
[StdIntList::nt][StdIntList::npump] Coefficient of one-body term, malloc in StdFace_MallocInteraction...
void StdFace_Kagome_Boost(struct StdIntList *StdI)
int NEx
Number of exchange term, counted in each lattice file.
double Vpp
Off-site Coulomb potential (3rd), input parameter.
double complex t1p
Anisotropic hopping (2nd), input parameter.
void StdFace_Kagome(struct StdIntList *StdI)
Setup a Hamiltonian for the Kagome lattice.
char method[256]
The name of method, input from file.
double complex t2
Anisotropic hopping (1st), input parameter.
int lGC
Switch for computing Grandcanonical ensemble(== 1). Setted in StdFace_main() after all keywords are r...
double LargeValue
The shift parameter for the TPQ calculation.
char PumpType[256]
The type of pump.
void StdFace_Honeycomb_Boost(struct StdIntList *StdI)
void StdFace_Orthorhombic(struct StdIntList *StdI)
Setup a Hamiltonian for the Simple Orthorhombic lattice.
static void TrimSpaceQuote(char *value)
Remove : space etc. from keyword and value in an iput file.
int ** intrindx
[StdIntList::nintr][8] Site/spin indices of two-body term, malloc in StdFace_MallocInteractions() and...
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)...
int Sz2
Total Sz, input from file.
int NCell
The number of the unit cell in the super-cell (determinant of StdIntList::box). Set in StdFace_InitSi...
double cutoff_length_U
Cutoof for R in wannier90, input from file.
double Vp
Off-site Coulomb potential (2nd), input parameter.
static void StoreWithCheckDup_d(char *keyword, char *valuestring, double *value)
Store an input value into the valiable (double) If duplicated, HPhi will stop.
double J1pAll
Anisotropic, diagonal spin coupling (2nd Near), input parameter J1'.
static void Print1Green(struct StdIntList *StdI)
Print greenone.def.
void StdFace_RequiredVal_i(char *valname, int val)
Stop HPhi if a variable (integer) which must be specified is absent in the input file (=2147483647...
void StdFace_Tetragonal(struct StdIntList *StdI)
Setup a Hamiltonian for the square lattice.
double * PairHopp
[StdIntList::NPairLift] Coefficient of pair-hopping term, malloc in StdFace_MallocInteractions() and ...
int nsite
Number of sites, set in the each lattice file.
int ** transindx
[StdIntList::ntrans][4] Site/spin indices of one-body term, malloc in StdFace_MallocInteractions() an...
double J2All
Anisotropic, diagonal spin coupling (1st Near), input parameter J2.
int Height
Number of sites along the 3rd axis, input parameter.
static void CheckModPara(struct StdIntList *StdI)
Summary numerical parameter check the combination of the number of sites, total spin, the number of electrons.
Variables used in the Standard mode. These variables are passed as a pointer of the structure(StdIntL...
double V0pp
Anisotropic Coulomb potential (3rd), input parameter.
double * Cintra
[StdIntList::NCintra] Coefficient of intra-site Coulomb term, malloc in StdFace_MallocInteractions() ...
static void StdFace_LargeValue(struct StdIntList *StdI)
Set Largevalue (StdIntList::LargeValue) for TPQ. Sum absolute-value of all one- and two- body terms...
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).
static void PrintLocSpin(struct StdIntList *StdI)
Print the locspin file.
char lattice[256]
Name of lattice. Input parameter.
int nintr
Number of InterAll, counted in each lattice file.
char outputmode[256]
Select amount of correlation function, input from file.
double Uquench
Quenched on-site potential.
double h
Longitudinal magnetic field, input parameter.
double a
The lattice constant. Input parameter.
void StdFace_Pyrochlore(struct StdIntList *StdI)
Setup a Hamiltonian for the Pyrochlore structure.
int SpectrumBody
one- or two-body excitation, defined from StdIntList::SpectrumType
int ** PHIndx
[StdIntList::NPairLift][2] Site indices of pair-hopping term, malloc in StdFace_MallocInteractions() ...
static void StoreWithCheckDup_i(char *keyword, char *valuestring, int *value)
Store an input value into the valiable (integer) If duplicated, HPhi will stop.
double J2[3][3]
Isotropic, diagonal/off-diagonal spin coupling (1st Near.), input parameter J2x, J2y, J2z, J2xy, etc. or set in StdFace_InputSpinNN().
void StdFace_FCOrtho(struct StdIntList *StdI)
Setup a Hamiltonian for the Face-Centered Orthorhombic lattice.
void StdFace_Ladder(struct StdIntList *StdI)
Setup a Hamiltonian for the generalized Heisenberg model on a square lattice.
int nelec
Number of electrons, input from file.
double freq
Frequency of laser.
int NaN_i
It is used for initializing input parameter. This means that a parameter wich is not specified in inp...
double * Cinter
[StdIntList::NCinter] Coefficient of inter-site Coulomb term, malloc in StdFace_MallocInteractions() ...
static void StoreWithCheckDup_c(char *keyword, char *valuestring, double complex *value)
Store an input value into the valiable (Double complex) If duplicated, HPhi will stop.
void StdFace_Wannier90(struct StdIntList *StdI)
Setup a Hamiltonian for the Wannier90 *_hr.dat.
int ExpecInterval
Interval for the iteration when the expectation value is computed.
double J2pAll
Anisotropic, diagonal spin coupling (2nd Near), input parameter J2'.
void StdFace_main(char *fname)
Main routine for the standard mode.
double ** tau
Cell-internal site position in the fractional coordinate. Defined in the beginning of each lattice fu...
double J0p[3][3]
Isotropic, diagonal/off-diagonal spin coupling (2nd Near.), input parameter J0'x, J0'y...
void StdFace_exit(int errorcode)
MPI Abortation wrapper.
char CDataFileHead[256]
Header of the output files. Input from file.
int LPairHopp
Print pairhopp.def or not, set in PrintInteractions().
double cutoff_u
Cutoof for the Coulomb in wannier90, input from file.
static void VectorPotential(struct StdIntList *StdI)
double V1p
Anisotropic Coulomb potential (2nd), input parameter.
double K
4-spin term. Not used.
int ** CinterIndx
[StdIntList::NCinter][2] Site indices of inter-site Coulomb term, malloc in StdFace_MallocInteraction...