38 #include "LogMessage.h" 39 #include "wrapperMPI.h" 40 #include "common/setmemory.h" 87 int isite1,
int isigma1,
88 int isite2,
int isigma2,
89 int isite3,
int isigma3,
90 int isite4,
int isigma4
96 double complex *cInterAllValue,
97 int isite1,
int isigma1,
98 int isite2,
int isigma2,
99 int isite3,
int isigma3,
100 int isite4,
int isigma4,
101 double re_value,
double im_value
131 const int icheckValue,
132 const int ilowestValue,
133 const int iHighestValue
136 if(icheckValue < ilowestValue || icheckValue > iHighestValue){
156 char cKWList[][D_CharTmpReadDef],
163 for(itmpKWidx=0; itmpKWidx<iSizeOfKWidx; itmpKWidx++){
164 if(strcmp(cKW,
"")==0){
167 else if(
CheckWords(cKW, cKWList[itmpKWidx])==0){
195 char csplit[] =
" ,.\t\n";
196 if(*ctmpLine==
'\n')
return 1;
197 ctmpRead = strtok(ctmpLine, csplit);
198 if(strncmp(ctmpRead,
"=", 1)==0 || strncmp(ctmpRead,
"#", 1)==0 || ctmpRead==NULL){
201 strcpy(ctmp, ctmpRead);
203 ctmpRead = strtok( NULL, csplit );
204 *itmp = strtol(ctmpRead, &cerror, 0);
211 ctmpRead = strtok( NULL, csplit );
212 if(ctmpRead != NULL){
237 char ctmpLine[D_CharTmpReadDef+D_CharKWDMAX];
238 char ctmp[D_CharKWDMAX];
263 while(
fgetsMPI(ctmpLine, D_CharTmpReadDef+D_CharKWDMAX, fp)!=NULL ){
265 if(iret==1)
continue;
271 else if(
CheckWords(ctmp,
"FlgFiniteTemperature")==0){
283 else if(
CheckWords(ctmp,
"InitialVecType")==0){
396 const char* cFileListNameFile,
397 char cFileNameList[][D_CharTmpReadDef]
402 char ctmpFileName[D_FileNameMaxReadDef];
403 char ctmpKW[D_CharTmpReadDef], ctmp2[256];
406 strcpy(cFileNameList[i],
"");
409 fplist =
fopenMPI(cFileListNameFile,
"r");
412 while(
fgetsMPI(ctmp2, 256, fplist) != NULL){
413 memset(ctmpKW,
'\0', strlen(ctmpKW));
414 memset(ctmpFileName,
'\0', strlen(ctmpFileName));
415 sscanf(ctmp2,
"%s %s\n", ctmpKW, ctmpFileName);
417 if(strncmp(ctmpKW,
"#", 1)==0 || *ctmp2==
'\n' || (strcmp(ctmpKW,
"")&&strcmp(ctmpFileName,
""))==0){
420 else if(strcmp(ctmpKW,
"")*strcmp(ctmpFileName,
"")==0){
436 if(strcmp(cFileNameList[itmpKWidx],
"") !=0){
443 strcpy(cFileNameList[itmpKWidx], ctmpFileName);
467 char defname[D_FileNameMaxReadDef];
468 char ctmp[D_CharTmpReadDef], ctmp2[256];
470 unsigned int iline=0;
479 int iReadNCond=
FALSE;
499 if(strcmp(defname,
"")==0){
516 if (strcmp(defname,
"") == 0)
continue;
517 if(iKWidx==KWSpectrumVec){
536 fgetsMPI(ctmp,
sizeof(ctmp) /
sizeof(
char), fp);
538 sscanf(ctmp2,
"%s %d\n", ctmp, &itmp);
539 fgetsMPI(ctmp,
sizeof(ctmp) /
sizeof(
char), fp);
540 fgetsMPI(ctmp,
sizeof(ctmp) /
sizeof(
char), fp);
541 fgetsMPI(ctmp,
sizeof(ctmp) /
sizeof(
char), fp);
549 fgetsMPI(ctmp,
sizeof(ctmp) /
sizeof(
char), fp);
553 while (
fgetsMPI(ctmp2, 256, fp) != NULL) {
554 if (*ctmp2 ==
'\n')
continue;
555 sscanf(ctmp2,
"%s %lf %lf\n", ctmp, &dtmp, &dtmp2);
557 X->
Nsite = (int) dtmp;
563 X->
Ndown = (int) dtmp;
575 X->
NCond = (int) dtmp;
578 else if (
CheckWords(ctmp,
"Lanczos_max") == 0) {
581 else if (
CheckWords(ctmp,
"initial_iv") == 0) {
585 X->
nvec = (int) dtmp;
590 else if (
CheckWords(ctmp,
"LanczosEps") == 0) {
593 else if (
CheckWords(ctmp,
"LanczosTarget") == 0) {
596 else if (
CheckWords(ctmp,
"LargeValue") == 0) {
602 else if(strcmp(ctmp,
"TimeSlice")==0){
605 else if(strcmp(ctmp,
"ExpandCoef")==0){
608 else if(strcmp(ctmp,
"OutputInterval")==0){
611 else if (
CheckWords(ctmp,
"ExpecInterval") == 0) {
614 else if(strcmp(ctmp,
"Tinit")==0){
639 else if(
CheckWords(ctmp,
"TargetTPQRand")==0) {
651 fgetsMPI(ctmp,
sizeof(ctmp) /
sizeof(
char), fp);
653 sscanf(ctmp2,
"%s %d\n", ctmp, &(X->
NLocSpn));
657 fgetsMPI(ctmp,
sizeof(ctmp) /
sizeof(
char), fp);
659 sscanf(ctmp2,
"%s %d\n", ctmp, &(X->
NTransfer));
663 fgetsMPI(ctmp,
sizeof(ctmp) /
sizeof(
char), fp);
669 fgetsMPI(ctmp,
sizeof(ctmp) /
sizeof(
char), fp);
675 fgetsMPI(ctmp,
sizeof(ctmp) /
sizeof(
char), fp);
681 fgetsMPI(ctmp,
sizeof(ctmp) /
sizeof(
char), fp);
688 fgetsMPI(ctmp,
sizeof(ctmp) /
sizeof(
char), fp);
694 fgetsMPI(ctmp,
sizeof(ctmp) /
sizeof(
char), fp);
700 fgetsMPI(ctmp,
sizeof(ctmp) /
sizeof(
char), fp);
706 fgetsMPI(ctmp,
sizeof(ctmp) /
sizeof(
char), fp);
708 sscanf(ctmp2,
"%s %d\n", ctmp, &(X->
NInterAll));
712 fgetsMPI(ctmp,
sizeof(ctmp) /
sizeof(
char), fp);
714 sscanf(ctmp2,
"%s %d\n", ctmp, &(X->
NCisAjt));
718 fgetsMPI(ctmp,
sizeof(ctmp) /
sizeof(
char), fp);
724 fgetsMPI(ctmp,
sizeof(ctmp)/
sizeof(
char), fp);
726 sscanf(ctmp2,
"%s %d\n", ctmp, &(X->
NLaser));
732 fgetsMPI(ctmp,
sizeof(ctmp)/
sizeof(
char), fp);
740 while (
fgetsMPI(ctmp2, 256, fp) != NULL) {
741 sscanf(ctmp2,
"%lf %d \n", &dtmp, &itmp);
742 for (i = 0; i < itmp; ++i) {
745 if(iTETransMax < itmp) iTETransMax=itmp;
754 fgetsMPI(ctmp,
sizeof(ctmp)/
sizeof(
char), fp);
760 int iTEInterAllMax=0;
762 while (
fgetsMPI(ctmp2, 256, fp) != NULL) {
763 sscanf(ctmp2,
"%lf %d \n", &dtmp, &itmp);
764 for (i = 0; i < itmp; ++i) {
767 if(iTEInterAllMax < itmp) iTEInterAllMax=itmp;
786 sscanf(ctmp2,
"%d\n", &(xBoost->
NumarrayJ));
788 for (iline = 0; iline < xBoost->
NumarrayJ * 3; iline++) {
793 sscanf(ctmp2,
"%ld %ld %ld %ld\n", &(xBoost->
W0), &(xBoost->
R0), &(xBoost->
num_pivot),
798 case KWSingleExcitation:
800 fgetsMPI(ctmp,
sizeof(ctmp)/
sizeof(
char), fp);
805 case KWPairExcitation:
807 fgetsMPI(ctmp,
sizeof(ctmp)/
sizeof(
char), fp);
826 case SpinlessFermion:
828 if(iReadNCond==
TRUE){
830 fprintf(
stdoutMPI,
"For Spin, Ncond should not be defined.\n");
836 fprintf(
stdoutMPI,
" Warning: For Spinless fermion, 2Sz should not be defined.\n");
851 fprintf(
stdoutMPI,
"Ncond is incorrect.\n");
862 fprintf(
stdoutMPI,
" 2Sz is not defined.\n");
870 fprintf(
stdoutMPI,
" NCond is not defined.\n");
881 fprintf(
stdoutMPI,
" 2Sz is not defined.\n");
885 fprintf(
stdoutMPI,
" NCond is not defined.\n");
908 case SpinlessFermionGC:
910 fprintf(
stdoutMPI,
"\n Warning: For GC, both Ncond and 2Sz should not be defined.\n");
986 char defname[D_FileNameMaxReadDef];
987 char ctmp[D_CharTmpReadDef], ctmp2[256];
989 unsigned int i,j, idx, itype;
993 int isite1, isite2, isite3, isite4;
994 int isigma1, isigma2, isigma3, isigma4;
995 double dvalue_re, dvalue_im;
996 double dArrayValue_re[3];
998 int ieps_CheckImag0=-12;
1000 unsigned int iline=0;
1006 int icnt_interall=0;
1007 int iflg_interall=0;
1009 unsigned int iloop=0;
1011 for(iKWidx=KWLocSpin; iKWidx<
D_iKWNumDef; iKWidx++){
1013 if(strcmp(defname,
"")==0 || iKWidx==KWSpectrumVec)
continue;
1017 if(iKWidx != KWBoost){
1018 for(i=0;i<IgnoreLinesInDef;i++)
fgetsMPI(ctmp,
sizeof(ctmp)/
sizeof(
char), fp);
1026 while(
fgetsMPI(ctmp2, 256, fp) != NULL){
1032 sscanf(ctmp2,
"%d %d\n", &(xitmp[0]), &(xitmp[1]) );
1033 X->
LocSpn[xitmp[0]] = xitmp[1];
1052 while(
fgetsMPI(ctmp2, 256, fp) != NULL )
1059 sscanf(ctmp2,
"%d %d %d %d %lf %lf\n",
1073 if(isite1==isite2 && isigma1==isigma2){
1083 if(isite1 != isite2){
1090 if(isite1 != isite2){
1097 if(isigma1 != 0 || isigma2 !=0){
1099 fprintf(stderr,
cErrNonHermiteTrans, isite1, isigma1, isite2, isigma2, dvalue_re, dvalue_im);
1106 for( i=0; i < icnt_trans; i++){
1116 if(iflg_trans == 0){
1147 case KWCoulombIntra:
1150 while(
fgetsMPI(ctmp2, 256, fp) != NULL){
1155 sscanf(ctmp2,
"%d %lf\n",
1169 case KWCoulombInter:
1172 while(
fgetsMPI(ctmp2, 256, fp) != NULL){
1178 sscanf(ctmp2,
"%d %d %lf\n",
1197 while(
fgetsMPI(ctmp2,256,fp) != NULL)
1204 sscanf(ctmp2,
"%d %d %lf\n",
1222 fprintf(
stdoutMPI,
"PairHop is not active in Spin and SpinGC.\n");
1227 while(
fgetsMPI(ctmp2, 256, fp) != NULL){
1232 sscanf(ctmp2,
"%d %d %lf\n",
1253 while(
fgetsMPI(ctmp2,256,fp) != NULL){
1259 sscanf(ctmp2,
"%d %d %lf\n",
1278 while(
fgetsMPI(ctmp2,256,fp) != NULL){
1284 sscanf(ctmp2,
"%d %d %lf\n",
1312 fprintf(
stdoutMPI,
"PairLift is active only in SpinGC.\n");
1315 while(
fgetsMPI(ctmp2,256,fp) != NULL)
1322 sscanf(ctmp2,
"%d %d %lf\n",
1345 while (
fgetsMPI(ctmp2, 256, fp) != NULL) {
1350 sscanf(ctmp2,
"%d %d %d %d %d %d %d %d %lf %lf\n",
1364 isite1, isigma1, isite2, isigma2,
1365 isite3, isigma3, isite4, isigma4) != 0) {
1377 dvalue_re, dvalue_im
1419 while(
fgetsMPI(ctmp2, 256, fp) != NULL){
1424 sscanf(ctmp2,
"%d %d %d %d\n",
1431 if(isite1 != isite2){
1438 X->
CisAjt[ idx ][0] = isite1;
1439 X->
CisAjt[ idx ][1] = isigma1;
1440 X->
CisAjt[ idx ][2] = isite2;
1441 X->
CisAjt[ idx ][3] = isigma2;
1456 while(
fgetsMPI(ctmp2, 256, fp) != NULL){
1462 sscanf(ctmp2,
"%d %d %d %d %d %d %d %d\n",
1505 while(
fgetsMPI(ctmp2, 256, fp) != NULL){
1506 sscanf(ctmp2,
"%s %lf\n", &(ctmp), &(X->
ParaLaser[idx]));
1520 while(
fgetsMPI(ctmp2, 256, fp) != NULL){
1524 sscanf(ctmp2,
"%d %d %d %d %lf %lf\n",
1555 while(
fgetsMPI(ctmp2, 256, fp) != NULL) {
1561 sscanf(ctmp2,
"%d %d %d %d %d %d %d %d %lf %lf\n",
1574 isite1, isigma1, isite2, isigma2,
1575 isite3, isigma3, isite4, isigma4) != 0) {
1586 dvalue_re, dvalue_im
1626 sscanf(ctmp2,
"%lf %lf %lf\n",
1629 &dArrayValue_re[2]);
1630 for(iline=0; iline<3; iline++){
1631 xBoost->
vecB[iline]= dArrayValue_re[iline];
1639 for(iline=0; iline<xBoost->
NumarrayJ; iline++){
1640 for(ilineIn=0; ilineIn<3; ilineIn++){
1642 sscanf(ctmp2,
"%lf %lf %lf\n",
1645 &dArrayValue_re[2]);
1646 for(ilineIn2=0; ilineIn2<3; ilineIn2++){
1647 xBoost->
arrayJ[iline][ilineIn][ilineIn2]= dArrayValue_re[ilineIn2];
1658 for(iline=0; iline<xBoost->
num_pivot; iline++){
1661 sscanf(ctmp2,
"%d %d %d %d %d %d %d\n",
1671 for(iloop=0; iloop<xBoost->
R0; iloop++){
1672 for(itmp=0; itmp<7; itmp++){
1681 for(iline=0; iline<xBoost->
num_pivot; iline++){
1683 for(ilineIn2=0; ilineIn2<xBoost->
list_6spin_star[iline][0]; ilineIn2++){
1685 sscanf(ctmp2,
"%d %d %d %d %d %d %d\n",
1696 for(iloop=0; iloop<xBoost->
R0; iloop++){
1697 for(itmp=0; itmp<7; itmp++){
1708 case KWSingleExcitation:
1712 fprintf(stderr,
"SingleExcitation is not allowed for spin system.\n");
1716 while (
fgetsMPI(ctmp2, 256, fp) != NULL) {
1717 sscanf(ctmp2,
"%d %d %d %lf %lf\n",
1743 case KWPairExcitation:
1746 while (
fgetsMPI(ctmp2, 256, fp) != NULL) {
1747 sscanf(ctmp2,
"%d %d %d %d %d %lf %lf\n",
1793 case KWCoulombIntra:
1794 case KWCoulombInter:
1830 if(iSite>=iMaxNum)
return(-1);
1908 int isigma1, isigma2;
1909 int itmpsite1, itmpsite2;
1910 int itmpsigma1, itmpsigma2;
1911 int itmperrsite1, itmperrsite2;
1912 int itmperrsigma1, itmperrsigma2;
1913 double complex dcerrTrans;
1914 int icheckHermiteCount=
FALSE;
1917 double complex ddiff_trans;
1918 unsigned int itmpIdx, icntHermite, icntchemi;
1927 icheckHermiteCount=
FALSE;
1935 if(isite1 == itmpsite2 && isite2 == itmpsite1){
1936 if(isigma1 == itmpsigma2 && isigma2 == itmpsigma1){
1940 itmperrsite1=itmpsite1;
1941 itmperrsigma1=itmpsigma1;
1942 itmperrsite2=itmpsite2;
1943 itmperrsigma2=itmpsigma2;
1946 fprintf(
stdoutMPI,
cErrNonHermiteTrans, itmperrsite1, itmperrsigma1, itmperrsite2, itmperrsigma2, creal(dcerrTrans), cimag(dcerrTrans));
1950 if (icheckHermiteCount ==
FALSE) {
1953 fprintf(stderr,
"Elements of Transfers are incorrect.\n");
1956 if(isite1 !=isite2 || isigma1 !=isigma2){
1957 for(itmpIdx=0; itmpIdx<4; itmpIdx++){
1972 icheckHermiteCount =
TRUE;
1981 if(icheckHermiteCount ==
FALSE){
1995 for(itmpIdx=0; itmpIdx<4; itmpIdx++){
2025 double complex* ParaInterAll,
2026 int **InterAllOffDiagonal,
2027 double complex*ParaInterAllOffDiagonal,
2028 const int NInterAllOffDiagonal,
2029 const int iCalcModel
2031 unsigned int i, j, icntincorrect, itmpret;
2032 int isite1, isite2, isite3, isite4;
2033 int isigma1, isigma2, isigma3, isigma4;
2034 int itmpsite1, itmpsite2, itmpsite3, itmpsite4;
2035 int itmpsigma1, itmpsigma2, itmpsigma3, itmpsigma4;
2036 unsigned int itmpIdx, icntHermite;
2037 int icheckHermiteCount =
FALSE;
2038 double complex ddiff_intall;
2041 for (i = 0; i < NInterAllOffDiagonal; i++) {
2043 isite1 = InterAllOffDiagonal[i][0];
2044 isigma1 = InterAllOffDiagonal[i][1];
2045 isite2 = InterAllOffDiagonal[i][2];
2046 isigma2 = InterAllOffDiagonal[i][3];
2047 isite3 = InterAllOffDiagonal[i][4];
2048 isigma3 = InterAllOffDiagonal[i][5];
2049 isite4 = InterAllOffDiagonal[i][6];
2050 isigma4 = InterAllOffDiagonal[i][7];
2051 icheckHermiteCount =
FALSE;
2053 for (j = 0; j < NInterAllOffDiagonal; j++) {
2054 itmpsite1 = InterAllOffDiagonal[j][0];
2055 itmpsigma1 = InterAllOffDiagonal[j][1];
2056 itmpsite2 = InterAllOffDiagonal[j][2];
2057 itmpsigma2 = InterAllOffDiagonal[j][3];
2058 itmpsite3 = InterAllOffDiagonal[j][4];
2059 itmpsigma3 = InterAllOffDiagonal[j][5];
2060 itmpsite4 = InterAllOffDiagonal[j][6];
2061 itmpsigma4 = InterAllOffDiagonal[j][7];
2063 if (isite1 == itmpsite4 && isite2 == itmpsite3 && isite3 == itmpsite2 && isite4 == itmpsite1) {
2064 if (isigma1 == itmpsigma4 && isigma2 == itmpsigma3 && isigma3 == itmpsigma2 && isigma4 == itmpsigma1) {
2065 ddiff_intall = cabs(ParaInterAllOffDiagonal[i] - conj(ParaInterAllOffDiagonal[j]));
2069 if (icheckHermiteCount ==
FALSE) {
2070 icheckHermiteCount =
TRUE;
2072 if (2 * icntHermite >= NInterAllOffDiagonal) {
2073 fprintf(
stdoutMPI,
"Elements of InterAll are incorrect.\n");
2077 for (itmpIdx = 0; itmpIdx < 8; itmpIdx++) {
2078 InterAll[2 * icntHermite][itmpIdx] = InterAllOffDiagonal[i][itmpIdx];
2079 InterAll[2 * icntHermite + 1][itmpIdx] = InterAllOffDiagonal[j][itmpIdx];
2082 ParaInterAll[2 * icntHermite] = ParaInterAllOffDiagonal[i];
2083 ParaInterAll[2 * icntHermite + 1] = ParaInterAllOffDiagonal[j];
2090 }
else if (isite1 == itmpsite2 && isite2 == itmpsite1 && isite3 == itmpsite4 &&
2091 isite4 == itmpsite3) {
2092 if (iCalcModel == Kondo || iCalcModel == KondoGC || iCalcModel == Spin || iCalcModel == SpinGC) {
2093 if (isigma1 == itmpsigma2 && isigma2 == itmpsigma1 && isigma3 == itmpsigma4 && isigma4 == itmpsigma3) {
2094 ddiff_intall = ParaInterAllOffDiagonal[i] - conj(ParaInterAllOffDiagonal[j]);
2097 if (icheckHermiteCount ==
FALSE) {
2098 icheckHermiteCount =
TRUE;
2100 if (2 * icntHermite >= NInterAllOffDiagonal) {
2101 fprintf(
stdoutMPI,
"Elements of InterAll are incorrect.\n");
2104 for (itmpIdx = 0; itmpIdx < 8; itmpIdx++) {
2105 InterAll[2 * icntHermite][itmpIdx] = InterAllOffDiagonal[i][itmpIdx];
2107 for (itmpIdx = 0; itmpIdx < 4; itmpIdx++) {
2108 InterAll[2 * icntHermite + 1][2 * itmpIdx] = InterAllOffDiagonal[i][6 -
2111 InterAll[2 * icntHermite + 1][2 * itmpIdx + 1] = InterAllOffDiagonal[i][7 - 2 *
2115 ParaInterAll[2 * icntHermite] = ParaInterAllOffDiagonal[i];
2116 ParaInterAll[2 * icntHermite + 1] = ParaInterAllOffDiagonal[j];
2128 fprintf(
stdoutMPI,
cErrNonHermiteInterAll, isite1, isigma1, isite2, isigma2, isite3, isigma3, isite4, isigma4,
2129 creal(ParaInterAllOffDiagonal[i]), cimag(ParaInterAllOffDiagonal[i]));
2134 if (icntincorrect != 0) {
2138 for (i = 0; i < NInterAllOffDiagonal; i++) {
2139 for (itmpIdx = 0; itmpIdx < 8; itmpIdx++) {
2140 InterAllOffDiagonal[i][itmpIdx] = InterAll[i][itmpIdx];
2142 ParaInterAllOffDiagonal[i] = ParaInterAll[i];
2168 complex
double *ParaInterAll,
2169 const int NInterAll,
2170 int **InterAllDiagonal,
2171 double *ParaInterAllDiagonal,
2172 int **InterAllOffDiagonal,
2173 complex
double *ParaInterAllOffDiagonal,
2177 unsigned int *NChemi,
2178 const int iCalcModel
2181 unsigned int i,icnt_diagonal, icnt_offdiagonal, tmp_i;
2182 int isite1, isite2, isite3, isite4;
2183 int isigma1, isigma2, isigma3, isigma4;
2188 for(i=0; i<NInterAll; i++){
2189 isite1=InterAll[i][0];
2190 isigma1=InterAll[i][1];
2191 isite2=InterAll[i][2];
2192 isigma2=InterAll[i][3];
2193 isite3=InterAll[i][4];
2194 isigma3=InterAll[i][5];
2195 isite4=InterAll[i][6];
2196 isigma4=InterAll[i][7];
2199 if(isite1 == isite2 && isite3 == isite4 &&
2200 isigma1 == isigma2 && isigma3 == isigma4)
2202 InterAllDiagonal[icnt_diagonal][0]=isite1;
2203 InterAllDiagonal[icnt_diagonal][1]=isigma1;
2204 InterAllDiagonal[icnt_diagonal][2]=isite3;
2205 InterAllDiagonal[icnt_diagonal][3]=isigma3;
2206 ParaInterAllDiagonal[icnt_diagonal] = creal(ParaInterAll[i]);
2210 else if(isite1 == isite4 && isite2 ==isite3 &&
2211 isigma1 == isigma4 && isigma2 ==isigma3)
2213 InterAllDiagonal[icnt_diagonal][0]=isite1;
2214 InterAllDiagonal[icnt_diagonal][1]=isigma1;
2215 InterAllDiagonal[icnt_diagonal][2]=isite2;
2216 InterAllDiagonal[icnt_diagonal][3]=isigma2;
2217 ParaInterAllDiagonal[icnt_diagonal] = -creal(ParaInterAll[i]);
2218 Chemi[*NChemi] = isite1;
2219 SpinChemi[*NChemi] = isigma1;
2221 ParaChemi[*NChemi] = -creal(ParaInterAll[i]);
2230 case HubbardNConserved:
2234 if(isigma1 == isigma2 && isigma3 == isigma4){
2235 for(tmp_i=0; tmp_i<8; tmp_i++){
2236 InterAllOffDiagonal[icnt_offdiagonal][tmp_i]=InterAll[i][tmp_i];
2238 ParaInterAllOffDiagonal[icnt_offdiagonal] = ParaInterAll[i];
2240 else if(isigma1==isigma4 && isigma2 == isigma3){
2241 InterAllOffDiagonal[icnt_offdiagonal][0]=isite1;
2242 InterAllOffDiagonal[icnt_offdiagonal][1]=isigma1;
2243 InterAllOffDiagonal[icnt_offdiagonal][2]=isite4;
2244 InterAllOffDiagonal[icnt_offdiagonal][3]=isigma1;
2245 InterAllOffDiagonal[icnt_offdiagonal][4]=isite3;
2246 InterAllOffDiagonal[icnt_offdiagonal][5]=isigma2;
2247 InterAllOffDiagonal[icnt_offdiagonal][6]=isite2;
2248 InterAllOffDiagonal[icnt_offdiagonal][7]=isigma2;
2249 ParaInterAllOffDiagonal[icnt_offdiagonal] = -ParaInterAll[i];
2253 if(iCalcModel==Hubbard || iCalcModel==Kondo){
2263 creal(ParaInterAll[i]),
2264 cimag(ParaInterAll[i])
2269 for(tmp_i=0; tmp_i<8; tmp_i++){
2270 InterAllOffDiagonal[icnt_offdiagonal][tmp_i]=InterAll[i][tmp_i];
2272 ParaInterAllOffDiagonal[icnt_offdiagonal] = ParaInterAll[i];
2278 if(isite1 == isite2 && isite3 == isite4){
2279 for(tmp_i=0; tmp_i<8; tmp_i++){
2280 InterAllOffDiagonal[icnt_offdiagonal][tmp_i]=InterAll[i][tmp_i];
2282 ParaInterAllOffDiagonal[icnt_offdiagonal] =ParaInterAll[i];
2323 #include "version_major.h" 2326 #include "version_minor.h" 2329 #include "version_patch.h" 2337 else if (argc == 3 &&
2340 *mode=STANDARD_MODE;
2342 else if (argc == 3 &&
2346 *mode = STANDARD_DRY_MODE;
2348 else if (argc >= 2 &&
2352 fprintf(
stdoutMPI,
"\nHPhi version %d.%d.%d \n\n", ver_maj, ver_min, ver_pat);
2359 fprintf(
stdoutMPI,
" $ HPhi -e {namelist_file} \n");
2360 fprintf(
stdoutMPI,
"* Standard mode \n");
2361 fprintf(
stdoutMPI,
" $ HPhi -s {input_file} \n");
2362 fprintf(
stdoutMPI,
"* Standard DRY mode \n");
2363 fprintf(
stdoutMPI,
" $ HPhi -sdry {input_file} \n");
2364 fprintf(
stdoutMPI,
" In this mode, Hphi stops after it generats expert input files. \n");
2365 fprintf(
stdoutMPI,
"* Print the version \n");
2394 if(site1==site2 && site3==site4){
2417 const int isite1,
const int isite2,
2418 const int isite3,
const int isite4,
2423 if (isite1 != isite2) {
2429 if (isite3 != isite4) {
2457 eps=pow(10.0, neps);
2458 eps_CG=pow(10.0, nepsCG);
2483 case HubbardNConserved:
2485 case SpinlessFermion:
2486 case SpinlessFermionGC:
2487 for(i=0; i<X->
Nsite; i++){
2496 for(i=0; i<X->
Nsite; i++){
2508 for(i=0; i<X->
Nsite; i++){
2598 const int isite1,
const int isigma1,
2599 const int isite2,
const int isigma2,
2600 const int isite3,
const int isigma3,
2601 const int isite4,
const int isigma4,
2605 if( isigma1 > iLocInfo[isite1] || isigma2 >iLocInfo[isite2]
2606 ||isigma3 > iLocInfo[isite3] || isigma4 >iLocInfo[isite4]){
2630 int isigma1, isigma2;
2637 if(isigma1 > X->
LocSpn[isite1] || isigma2 >X->
LocSpn[isite2]){
2664 if(tmp_Nup%2 != 0 && tmp_Ndown%2 !=0){
2665 printf(
"Nup=%d, Ndown=%d\n",X->
Nup,X->
Ndown);
2666 fprintf(
stdoutMPI,
"2Sz is incorrect.\n");
2686 const char* cKeyWord
2691 char ctmp_small[256]={0};
2692 char cKW_small[256]={0};
2695 strncpy(cKW_small, cKeyWord, n);
2698 cKW_small[i]=tolower(cKW_small[i]);
2701 strncpy(ctmp_small, ctmp, n);
2703 ctmp_small[i]=tolower(ctmp_small[i]);
2705 if(n<strlen(cKW_small)) n=strlen(cKW_small);
2706 return(strncmp(ctmp_small, cKW_small, n));
2749 int iFlgGeneralSpin,
2751 int isite1,
int isigma1,
2752 int isite2,
int isigma2,
2753 int isite3,
int isigma3,
2754 int isite4,
int isigma4
2756 if(
CheckQuadSite(isite1, isite2, isite3, isite4, Nsite) !=0){
2757 fprintf(stderr,
"%s",
"Error: Site index of InterAll is incorrect.\n");
2761 if(iCalcModel == Spin || iCalcModel ==SpinGC){
2763 fprintf(stderr,
"%s",
"Error: Spin index of InterAll is incorrect.\n");
2767 else if(iCalcModel == SpinlessFermion || iCalcModel==SpinlessFermionGC){
2768 if(isigma1 !=0 || isigma2 != 0 || isigma3 != 0 || isigma4 !=0){
2769 fprintf(stderr,
"%s",
"Error: Spin index of InterAll is incorrect.\n");
2773 else if(iCalcModel == Kondo){
2779 if(iFlgGeneralSpin ==
TRUE) {
2806 int **iInterAllInfo,
2807 double complex *cInterAllValue,
2808 int isite1,
int isigma1,
2809 int isite2,
int isigma2,
2810 int isite3,
int isigma3,
2811 int isite4,
int isigma4,
2812 double dvalue_re,
double dvalue_im
2815 int iflg_interall = 0;
2817 for (i = 0; i < *icnt_interall; i++) {
2818 if (isite1 == iInterAllInfo[i][0] && isite2 == iInterAllInfo[i][2] &&
2819 isite3 == iInterAllInfo[i][4] && isite4 == iInterAllInfo[i][6] &&
2820 isigma1 == iInterAllInfo[i][1] && isigma2 == iInterAllInfo[i][3] &&
2821 isigma3 == iInterAllInfo[i][5] && isigma4 == iInterAllInfo[i][7]) {
2822 cInterAllValue[i] += dvalue_re + dvalue_im * I;
2829 if (iflg_interall == 0) {
2830 iInterAllInfo[*icnt_interall][0] = isite1;
2831 iInterAllInfo[*icnt_interall][1] = isigma1;
2832 iInterAllInfo[*icnt_interall][2] = isite2;
2833 iInterAllInfo[*icnt_interall][3] = isigma2;
2834 iInterAllInfo[*icnt_interall][4] = isite3;
2835 iInterAllInfo[*icnt_interall][5] = isigma3;
2836 iInterAllInfo[*icnt_interall][6] = isite4;
2837 iInterAllInfo[*icnt_interall][7] = isigma4;
2838 cInterAllValue[*icnt_interall] = dvalue_re + I * dvalue_im;
2841 if (isite1 == isite2 && isite3 == isite4 &&
2842 isigma1 == isigma2 && isigma3 == isigma4) {
2844 }
else if (isite1 == isite4 && isite2 == isite3 &&
2845 isigma1 == isigma4 && isigma2 == isigma3) {
2865 const int NTETransfer,
2871 int isigma1, isigma2;
2872 int itmpsite1, itmpsite2;
2873 int itmpsigma1, itmpsigma2;
2874 int itmperrsite1, itmperrsite2;
2875 int itmperrsigma1, itmperrsigma2;
2876 double complex dcerrTrans;
2877 int icheckHermiteCount;
2880 double complex ddiff_trans;
2881 unsigned int itmpIdx, icntHermite, icntchemi;
2885 int** tmp_TETransfer = i_2d_allocate(NTETransfer, 4);
2886 double complex*tmp_paraTETransfer = (
double complex*)malloc((NTETransfer)*
sizeof(
double complex));
2889 for(i=0; i<NTETransfer; i++){
2891 tmp_TETransfer[i][j]=X->
TETransfer[idx][i][j];
2898 for(i=0; i<NTETransfer; i++){
2899 isite1=tmp_TETransfer[i][0];
2900 isigma1=tmp_TETransfer[i][1];
2901 isite2=tmp_TETransfer[i][2];
2902 isigma2=tmp_TETransfer[i][3];
2903 icheckHermiteCount=
FALSE;
2904 for(j=0; j<NTETransfer; j++){
2905 itmpsite1=tmp_TETransfer[j][0];
2906 itmpsigma1=tmp_TETransfer[j][1];
2907 itmpsite2=tmp_TETransfer[j][2];
2908 itmpsigma2=tmp_TETransfer[j][3];
2909 if(isite1 == itmpsite2 && isite2 == itmpsite1){
2910 if(isigma1 == itmpsigma2 && isigma2 == itmpsigma1){
2912 ddiff_trans = tmp_paraTETransfer[i]-conj(tmp_paraTETransfer[j]);
2914 itmperrsite1=itmpsite1;
2915 itmperrsigma1=itmpsigma1;
2916 itmperrsite2=itmpsite2;
2917 itmperrsigma2=itmpsigma2;
2918 dcerrTrans=tmp_paraTETransfer[j];
2920 fprintf(
stdoutMPI,
cErrNonHermiteTrans, itmperrsite1, itmperrsigma1, itmperrsite2, itmperrsigma2, creal(dcerrTrans), cimag(dcerrTrans));
2924 if (icheckHermiteCount ==
FALSE) {
2926 if(2*icntHermite >= NTETransfer){
2927 fprintf(stderr,
"Elements of Transfers are incorrect.\n");
2930 if(isite1 !=isite2 || isigma1 !=isigma2){
2931 for(itmpIdx=0; itmpIdx<4; itmpIdx++){
2932 X->
TETransfer[idx][2*icntHermite][itmpIdx]=tmp_TETransfer[i][itmpIdx];
2933 X->
TETransfer[idx][2*icntHermite+1][itmpIdx]=tmp_TETransfer[j][itmpIdx];
2946 icheckHermiteCount =
TRUE;
2954 if(icheckHermiteCount ==
FALSE){
2970 free_i_2d_allocate(tmp_TETransfer);
2971 free(tmp_paraTETransfer);
unsigned int NTETimeSteps
unsigned int NSingleExcitationOperator
Number of single excitaion operator for spectrum.
int irand
Input keyword TargetTPQRand ???
unsigned int * NTEInterAllOffDiagonal
int LanczosEps
log(10 base) of the convergence threshold. Read from Calcmod in readdef.h
void exitMPI(int errorcode)
MPI Abortation wrapper.
int iFlgSpecOmegaMin
Whether DefineList::dcOmegaMin is input or not.
int CheckFormatForKondoInt(const int isite1, const int isite2, const int isite3, const int isite4, int *iLocInfo)
function of checking format of Kondo interactions
unsigned int NHundCoupling
Number of Hund coupling.
char * cErrIncorrectFormatForKondoTrans
char * cErrIncorrectSpinIndexForInter
int CheckInterAllHermite(int **InterAll, double complex *ParaInterAll, int **InterAllOffDiagonal, double complex *ParaInterAllOffDiagonal, const int NInterAllOffDiagonal, const int iCalcModel)
function of checking hermite conditions about interall interactions
int JudgeDefType(const int argc, char *argv[], int *mode)
function of judging a type of define files.
int * EDSpinChemi
[DefineList::Nsite]
unsigned int NTEInterAllMax
unsigned int NLocSpn
Number of local spins.
void SetConvergenceFactor(struct DefineList *X)
function to set convergence factors
int iFlgSzConserved
Flag whether Sz is conserved.
char * cErrReadDefFile
Error Message in readdef.c.
int GetKWWithIdx(char *ctmpLine, char *ctmp, int *itmp)
Function of Getting keyword and it's variable from characters.
int ** ExchangeCoupling
[DefineList::NExchangeCoupling][2] Index of exchange term. malloc in setmem_def().
int GetFileName(const char *cFileListNameFile, char cFileNameList[][D_CharTmpReadDef])
Function of Fitting FileName.
double * ParaInterAll_Diagonal
[DefineList::NInterAll_Diagonal] Coupling constant of diagonal inter-all term. malloc in setmem_def()...
void InitializeInteractionNum(struct DefineList *X)
function of initializing interactions
int fidx
Always 0, it is not used ???
int Total2Sz
Total in this process.
int *** TETransferDiagonal
double complex dcOmegaMax
Upper limit of the frequency for the spectrum.
int CheckLocSpin(struct DefineList *X)
function of checking indexies of localized spin
unsigned int NdownMPI
Total number of spin-down electrons across processes. Deffer from DefineList::Ndown. Read from modpara in readdef.h.
int iOutputEigenVec
ASwitch for outputting an eigenvector. 0: no output, 1:output.
int CheckInterAllCondition(int iCalcModel, int Nsite, int iFlgGeneralSpin, int *iLocSpin, int isite1, int isigma1, int isite2, int isigma2, int isite3, int isigma3, int isite4, int isigma4)
Check InterAll condition.
int * LocSpn
[DefineList::NLocSpn] Flag (and size) of the local spin. malloc in setmem_def().
int ** CisAjtCkuAlvDC
[DefineList::NCisAjtCkuAlvDC][4] Indices of two-body correlation function. malloc in setmem_def()...
unsigned int Nup
Number of spin-up electrons in this process.
int ** EDGeneralTransfer
Index of transfer integrals for calculation. malloc in setmem_def(). Data Format [DefineList::NTransf...
long unsigned int num_pivot
int iNGPU
GPU mode ( only for FullDiag )
int ReadDefFileIdxPara(struct DefineList *X, struct BoostList *xBoost)
function of reading def files to get keyword index
int ReadDefFileError(const char *defname)
Error Function of reading def files.
double complex * ParaInterAll_OffDiagonal
[DefineList::NInterAll_OffDiagonal] Coupling constant of off-diagonal inter-all term. malloc in setmem_def().
unsigned int NPairLiftCoupling
Number of pair-lift term.
char * cErrIncorrectFormatInter
int iFlgScaLAPACK
ScaLAPACK mode ( only for FullDiag )
unsigned int nvec
Read from Calcmod in readdef.h.
int ReadDefFileNInt(char *xNameListFile, struct DefineList *X, struct BoostList *xBoost)
Function of reading information about "ModPara" file and total number of parameters from other def fi...
double complex ** ParaTETransfer
int ValidateValue(const int icheckValue, const int ilowestValue, const int iHighestValue)
Function of Validating value.
unsigned int NInterAll_OffDiagonal
Number of interall term (off-diagonal)
unsigned int * NTETransfer
int InputInterAllInfo(int *icnt_interall, int **iInterAllInfo, double complex *cInterAllValue, int isite1, int isigma1, int isite2, int isigma2, int isite3, int isigma3, int isite4, int isigma4, double re_value, double im_value)
Input InterAll Interactions (Operators of the same kinds are grouped together).
int CheckKW(const char *cKW, char cKWList[][D_CharTmpReadDef], int iSizeOfKWidx, int *iKWidx)
Function of Checking keyword in NameList file.
int ** InterAll_OffDiagonal
[DefineList::NinterAll_OffDiagonal][8] Interacted quartet
int ** InterAll_Diagonal
[DefineList::NinterAll_Diagonal][4] Interacted quartet
int ** GeneralTransfer
Index of transfer integrals obtained by a def file. malloc in setmem_def(). Data Format [DefineList::...
int ** PairHopping
[DefineList::NPairHopping][2] Index of pair-hopping. malloc in setmem_def().
unsigned int NupOrg
Number of spin-up electrons before exitation. Used only in the spectrum calculation. Read from modpara in readdef.h.
unsigned int NeMPI
Total number of electrons across process. Differ from DefineList::Ne .
unsigned int Ndown
Number of spin-down electrons in this process.
double ** ParaTETransferDiagonal
static char(* cFileNameListFile)[D_CharTmpReadDef]
int CheckQuadSite(const int iSite1, const int iSite2, const int iSite3, const int iSite4, const int iMaxNum)
Check Site Number for a quad -> (siteA, siteB, siteC, siteD).
int ** PairLiftCoupling
[DefineList::NPairHopping][2] Index of pair-lift term. malloc in setmem_def().
int ** HundCoupling
[DefineList::NHundCoupling][2] Index of Hund coupling. malloc in setmem_def().
int iFlgFiniteTemperature
???
unsigned int NInterAll_Diagonal
Number of interall term (diagonal)
double complex ** ParaTEInterAll
double complex * ParaInterAll
[DefineList::NInterAll] Coupling constant of inter-all term. malloc in setmem_def().
double complex * ParaGeneralTransfer
Value of general transfer integrals by a def file. malloc in setmem_def(). Data Format [DefineList::N...
char * cWarningIncorrectFormatForSpin
double * ParaExchangeCoupling
[DefineList::NExchangeCoupling] Coupling constant of exchange term. malloc in setmem_def().
unsigned int Nsite
Number of sites in the INTRA process region.
double * ParaCoulombInter
[DefineList::NCoulombInter]Coupling constant of off-site Coulomb interaction. malloc in setmem_def()...
int READ
It is ALWAYS 0 ???
int read_hacker
Whether use an efficient method (=1) in sz.c or not (=0)
int CheckTransferHermite(struct DefineList *X)
Check Hermite for Transfer integrals.
int CheckFormatForSpinInt(const int site1, const int site2, const int site3, const int site4)
function of checking format of spin interactions
double complex * EDParaGeneralTransfer
Value of general transfer integrals by a def file. malloc in setmem_def(). Data Format [DefineList::N...
double * ParaPairLiftCoupling
[DefineList::NPairHopping] Coupling constant of pair-lift term. malloc in setmem_def().
int CheckSpinIndexForTrans(struct DefineList *X)
function of checking spin index for transfers
int CheckWords(const char *ctmp, const char *cKeyWord)
function of checking whether ctmp is same as cKeyWord or not
double complex * ParaPairExcitationOperator
[DefineList::NPairExcitationOperator] Coefficient of pair excitaion operator for spectrum. malloc in setmem_def().
unsigned int NCoulombIntra
double complex *** arrayJ
double complex ** ParaTEInterAllOffDiagonal
unsigned int NIsingCoupling
Number of Ising term.
int ** SingleExcitationOperator
[DefineList::NSingleExcitationOperator][3] Indices of single excitaion operator for spectrum...
char * cErrNonConservedInterAll
int ReadcalcmodFile(const char *defname, struct DefineList *X)
Function of Reading calcmod file.
char * cErrOutputHamForFullDiag
char * cErrIncorrectFormatForKondoInt
char * cErrNonHermiteInterAll
double * EDParaChemi
[DefineList::Nsite] On-site potential parameter. malloc in setmem_def().
char * cErrNonHermiteTrans
long unsigned int ishift_nspin
char * CParaFileHead
Read from Calcmod in readdef.h. It is not used. Just for the compatibility to mVMC.
unsigned int NExchangeCoupling
Number of exchange term.
int iFlgGeneralSpin
Flag for the general (Sz/=1/2) spin.
char * cErrIncorrectSpinIndexForTrans
int iNOmega
Number of frequencies for spectrum.
int iCalcEigenVec
Switch for method to calculate eigenvectors. 0:Lanczos+CG, 1: Lanczos. default value is set as 0 in r...
unsigned int NCisAjtCkuAlvDC
Number of indices of two-body correlation function.
unsigned int NPairHopping
Number of pair-hopping term.
int iFlgSpecOmegaOrg
Whether DefineList::dcOmegaOrg is input or not.
int CheckTETransferHermite(struct DefineList *X, const int NTETrans, const int idx)
Check Hermite for TETransfer integrals.
char * cWarningIncorrectFormatForSpin2
char * cErrInputOutputHam
unsigned int NCisAjt
Number of indices of two-body correlation function.
unsigned int NPairExcitationOperator
Number of pair excitaion operator for spectrum.
long int * SiteToBit
[DefineList::NsiteMPI] Similar to DefineList::Tpow. For general spin.
int GetDiagonalInterAll(int **InterAll, complex double *ParaInterAll, const int NInterAll, int **InterAllDiagonal, double *ParaInterAllDiagonal, int **InterAllOffDiagonal, complex double *ParaInterAllOffDiagonal, int *Chemi, int *SpinChemi, double *ParaChemi, unsigned int *NChemi, const int iCalcModel)
function of getting diagonal components
unsigned int * NTEInterAllDiagonal
int ** CisAjt
[DefineList::NCisAjt][4] Indices of one-body correlation function. malloc in setmem_def().
char * cErrNonHermiteInterAllForAll
unsigned int NupMPI
Total number of spin-up electrons across processes. Deffer from DefineList::Nup. Read from modpara in...
double ** ParaTEInterAllDiagonal
int ** PairExcitationOperator
[DefineList::NPairExcitationOperator][5] Indices of pair excitaion operator for spectrum. malloc in setmem_def().
unsigned int NdownOrg
Number of spin-down electrons before exitation. Used only in the spectrum calculation. Read from modpara in readdef.h.
unsigned int Ne
Number of electrons in this process.
double * ParaPairHopping
[DefineList::NPairHopping] Coupling constant of pair-hopping term. malloc in setmem_def().
char * cErrNonHermiteTransForAll
unsigned int NInterAll
Total Number of Interacted quartet.
unsigned int EDNTransfer
Number of transfer integrals for calculation.
double complex dcOmegaOrg
Origin limit of the frequency for the spectrum.
unsigned int NTransfer
Number of transfer integrals obtained by a def file.
double * ParaHundCoupling
[DefineList::NHundCoupling] Hund coupling constant. malloc in setmem_def().
int iFlgSpecOmegaMax
Whether DefineList::dcOmegaMax is input or not.
int CheckSite(const int iSite, const int iMaxNum)
Check Site Number.
static char cKWListOfFileNameList[][D_CharTmpReadDef]
int LanczosTarget
Which eigenstate is used to check convergence. Read from Calcmod in readdef.h.
int CheckGeneralSpinIndexForInterAll(const int isite1, const int isigma1, const int isite2, const int isigma2, const int isite3, const int isigma3, const int isite4, const int isigma4, int *iLocInfo)
function of checking spin index for all interactions
int iCalcModel
Switch for model. 0:Hubbard, 1:Spin, 2:Kondo, 3:HubbardGC, 4:SpinGC, 5:KondoGC, 6:HubbardNConserved.
double complex dcOmegaMin
Lower limit of the frequency for the spectrum.
int *** TEInterAllOffDiagonal
unsigned int NCoulombInter
Number of off-site Coulomb interaction.
long int initial_iv
Seed of random number for initial guesss of wavefunctions.
double * ParaCoulombIntra
int WRITE
It is ALWAYS 0 ???
unsigned int EDNChemi
Number of on-site term.
int flgBoost
Flag whether use CMA algorithm.
int *** TEInterAllDiagonal
int iFlgCalcSpec
Input parameter CalcSpec in teh CalcMod file.
double complex * ParaSingleExcitationOperator
[DefineList::NSingleExcitationOperator] Coefficient of single excitaion operator for spectrum...
int iOutputMode
Switch for output mode. 0: OneBodyG and TwoBodyG. 1: OneBodyG and TwoBodyG and correlations for charg...
void ResetInteractionNum(struct DefineList *X)
function of resetting number of interactions
const char * cReadFileNamelist
unsigned int NCond
Number of itinerant electrons.
int GetFileNameByKW(int iKWidx, char **FileName)
function of getting file name labeled by the keyword
int iInitialVecType
Switch for type of inital vectors. 0:complex type, 1: real type. default value is set as 0 in readdef...
int ** InterAll
[DefineList::NinterAll][8] Interacted quartet
int CheckPairSite(const int iSite1, const int iSite2, const int iMaxNum)
Check Site Number for a pair -> (siteA, siteB).
char * fgetsMPI(char *InputString, int maxcount, FILE *fp)
MPI file I/O (get a line, fgets) wrapper. Only the root node (myrank = 0) reads and broadcast string...
int * EDChemi
[DefineList::Nsite] Chemical potential. malloc in setmem_def().
unsigned int NTETransferMax
int iInputEigenVec
Switch for reading an eigenvector. 0: no input, 1:input.
unsigned int * NTEInterAll
unsigned int * NTETransferDiagonal
char * CDataFileHead
Read from Calcmod in readdef.h. Header of output file such as Green's function.
FILE * fopenMPI(const char *FileName, const char *mode)
MPI file I/O (open) wrapper. Only the root node (myrank = 0) should be open/read/write (small) parame...
int CheckTotal2Sz(struct DefineList *X)
function of checking an input data of total2Sz
Definision of system (Hamiltonian) etc.
unsigned int Lanczos_max
Maximum number of iterations.
int iCalcType
Switch for calculation type. 0:Lanczos, 1:TPQCalc, 2:FullDiag.
FILE * stdoutMPI
File pointer to the standard output defined in InitializeMPI()
unsigned int k_exct
Read from Calcmod in readdef.h.