42   fprintf(stdout, 
"\n\n #######  You DO NOT have to WORRY about the following MPI-ERROR MESSAGE.  #######\n\n");
    43   ierr = MPI_Abort(MPI_COMM_WORLD, errorcode);
    44   ierr = MPI_Finalize();
    46   if (ierr != 0) fprintf(stderr, 
"\n  MPI_Finalize() = %d\n\n", ierr);
    57   double complex trans0,
    77   double complex trans0,
    84   double complex Cphase, coef;
    91   if (strcmp(StdI->
method, 
"timeevolution") == 0 && StdI->
PumpBody == 1) {
    94       for (ii = 0; ii < 3; ii++) Cphase +=  StdI->
At[it][ii] * dR[ii];
    95       coef = cos(Cphase) + I * sin(-Cphase);
    96       for (ispin = 0; ispin < 2; ispin++) {
    97         StdI->
pump[it][StdI->
npump[it]] = coef * trans0;
   104         StdI->
pump[it][StdI->
npump[it]] = conj(coef * trans0);
   115     for (ispin = 0; ispin < 2; ispin++) {
   117       StdFace_trans(StdI, conj(trans0), isite, ispin, jsite, ispin);
   162   S = (double)
S2 * 0.5;
   166   for (ispin = 0; ispin <= 
S2; ispin++){
   173     Sz = (double)ispin - S;
   187         isite, ispin + 1, isite, ispin);
   189         isite, ispin, isite, ispin + 1);
   201   double complex intr0,
   232   int ispin, jspin, ZGeneral, ExGeneral;
   233   double Si, Sj, Siz, Sjz;
   234   double complex intr0;
   240   if (Si2 == 1 || Sj2 == 1) {
   259     if (fabs(
J[0][1]) < 0.000001 && fabs(
J[1][0]) < 0.000001
   261       && abs(
J[0][0] - 
J[1][1]) < 0.000001
   273       StdI->
Ex[StdI->
NEx] = - 0.25 * (
J[0][0] + 
J[1][1]);
   275       if (strcmp(StdI->
model, 
"kondo") == 0)
   276         StdI->
Ex[StdI->
NEx] = -0.25 * (
J[0][0] + 
J[1][1]);
   278         StdI->
Ex[StdI->
NEx] = 0.25 * (
J[0][0] + 
J[1][1]);
   294   Si = 0.5 * (double)Si2;
   295   Sj = 0.5 * (double)Sj2;
   297   for (ispin = 0; ispin <= Si2; ispin++) {
   298     Siz = (double)ispin - Si;
   299     for (jspin = 0; jspin <= Sj2; jspin++) {
   300       Sjz = (double)jspin - Sj;
   309         intr0 = 
J[2][2] * Siz * Sjz;
   311           isite, ispin, isite, ispin, jsite, jspin, jsite, jspin);
   324       if ((ispin < Si2 && jspin < Sj2) && ExGeneral == 1) {
   325         intr0 = 0.25 * (
J[0][0] + 
J[1][1] + I*(
J[0][1] - 
J[1][0]))
   326           * sqrt(Si * (Si + 1.0) - Siz * (Siz + 1.0))
   327           * sqrt(Sj * (Sj + 1.0) - Sjz * (Sjz + 1.0));
   329           isite, ispin + 1, isite, ispin, jsite, jspin, jsite, jspin + 1);
   331           isite, ispin, isite, ispin + 1, jsite, jspin + 1, jsite, jspin);
   344       if ((ispin < Si2 && jspin < Sj2) && ExGeneral == 1) {
   345         intr0 = 0.5 * 0.5 * (
J[0][0] - 
J[1][1] - I*(
J[0][1] + 
J[1][0]))
   346           * sqrt(Si * (Si + 1.0) - Siz * (Siz + 1.0))
   347           * sqrt(Sj * (Sj + 1.0) - Sjz * (Sjz + 1.0));
   349           isite, ispin + 1, isite, ispin, jsite, jspin + 1, jsite, jspin);
   351           isite, ispin, isite, ispin + 1, jsite, jspin, jsite, jspin + 1);
   364         intr0 = 0.5 * (
J[0][2] - I * 
J[1][2]) * sqrt(Si * (Si + 1.0) - Siz * (Siz + 1.0)) * Sjz;
   366           isite, ispin + 1, isite, ispin, jsite, jspin, jsite, jspin);
   368           jsite, jspin, jsite, jspin, isite, ispin, isite, ispin + 1);
   381         intr0 = 0.5 * (
J[2][0] - I * 
J[2][1]) * Siz * sqrt(Sj * (Sj + 1.0) - Sjz * (Sjz + 1.0));
   383           isite, ispin, isite, ispin, jsite, jspin + 1, jsite, jspin);
   385           jsite, jspin, jsite, jspin + 1, isite, ispin, isite, ispin);
   420   if (isnan(*val) == 1) {
   422     fprintf(stdout, 
"  %15s = %-10.5f  ######  DEFAULT VALUE IS USED  ######\n", valname, *val);
   424   else fprintf(stdout, 
"  %15s = %-10.5f\n", valname, *val);
   439   if (isnan(*val) == 1) {
   443     if (isnan(val0) == 1) *val = val1;
   445     fprintf(stdout, 
"  %15s = %-10.5f  ######  DEFAULT VALUE IS USED  ######\n", valname, *val);
   447   else fprintf(stdout, 
"  %15s = %-10.5f\n", valname, *val);
   461   if (isnan(creal(*val)) == 1) {
   463     fprintf(stdout, 
"  %15s = %-10.5f %-10.5f  ######  DEFAULT VALUE IS USED  ######\n", valname, creal(*val), cimag(*val));
   465   else fprintf(stdout, 
"  %15s = %-10.5f %-10.5f\n", valname, creal(*val), cimag(*val));
   479   int NaN_i = 2147483647;
   483     fprintf(stdout, 
"  %15s = %-10d  ######  DEFAULT VALUE IS USED  ######\n", valname, *val);
   485   else fprintf(stdout, 
"  %15s = %-10d\n", valname, *val);
   497   if (isnan(val) == 0) {
   498     fprintf(stdout, 
"\n Check !  %s is SPECIFIED but will NOT be USED. \n", valname);
   499     fprintf(stdout, 
"            Please COMMENT-OUT this line \n");
   500     fprintf(stdout, 
"            or check this input is REALLY APPROPRIATE for your purpose ! \n\n");
   514   if (isnan(creal(val)) == 0) {
   515     fprintf(stdout, 
"\n Check !  %s is SPECIFIED but will NOT be USED. \n", valname);
   516     fprintf(stdout, 
"            Please COMMENT-OUT this line \n");
   517     fprintf(stdout, 
"            or check this input is REALLY APPROPRIATE for your purpose ! \n\n");
   533   char Jname[3][3][10];
   535   sprintf(Jname[0][0], 
"%sx", valname);
   536   sprintf(Jname[0][1], 
"%sxy", valname);
   537   sprintf(Jname[0][2], 
"%sxz", valname);
   538   sprintf(Jname[1][0], 
"%syx", valname);
   539   sprintf(Jname[1][1], 
"%sy", valname);
   540   sprintf(Jname[1][2], 
"%syz", valname);
   541   sprintf(Jname[2][0], 
"%szx", valname);
   542   sprintf(Jname[2][1], 
"%szy", valname);
   543   sprintf(Jname[2][2], 
"%sz", valname);
   547   for (i1 = 0; i1 < 3; i1++) {
   548     for (i2 = 0; i2 < 3; i2++) {
   563   int NaN_i = 2147483647;
   566     fprintf(stdout, 
"\n Check !  %s is SPECIFIED but will NOT be USED. \n", valname);
   567     fprintf(stdout, 
"            Please COMMENT-OUT this line \n");
   568     fprintf(stdout, 
"            or check this input is REALLY APPROPRIATE for your purpose ! \n\n");
   582   int NaN_i = 2147483647;
   585     fprintf(stdout, 
"ERROR ! %s is NOT specified !\n", valname);
   588   else fprintf(stdout, 
"  %15s = %-3d\n", valname, val);
   603   int ii, jj, iCellV_frac[3];
   607   for (ii = 0; ii < 3; ii++) {
   609     for (jj = 0; jj < 3; jj++)iCellV_frac[ii] += StdI->
rbox[ii][jj] * iCellV[jj];
   614   for (ii = 0; ii < 3; ii++)
   615     nBox[ii] = (iCellV_frac[ii] + StdI->
NCell * 1000) / StdI->
NCell - 1000;
   619   for (ii = 0; ii < 3; ii++)
   620     iCellV_frac[ii] -= StdI->
NCell*(nBox[ii]);
   622   for (ii = 0; ii < 3; ii++) {
   624     for (jj = 0; jj < 3; jj++) iCellV_fold[ii] += StdI->
box[jj][ii] * iCellV_frac[jj];
   625     iCellV_fold[ii] = (iCellV_fold[ii] + StdI->
NCell * 1000) / StdI->
NCell - 1000;
   638   int bound[3][2], edge, ii, jj;
   640   int nBox[3], iCellV_fold[3], iCellV[3];
   641   double pos[4][2], xmin, xmax;
   643   fprintf(stdout, 
"\n  @ Super-Lattice setting\n\n");
   655     fprintf(stdout, 
"\nERROR ! (L, W, Height) and (a0W, ..., a2H) conflict !\n\n");
   663     for (ii = 0; ii < 3; ii++) 
for (jj = 0; jj < 3; jj++)
   664       StdI->
box[ii][jj] = 0;
   665     StdI->
box[0][0] = StdI->
W;
   666     StdI->
box[1][1] = StdI->
L;
   695   if (dim == 2) StdI->
phase[2] = 0.0;
   696   for (ii = 0; ii < 3; ii++) {
   704   StdI->
tau = (
double **)malloc(
sizeof(
double*) * StdI->
NsiteUC);
   705   for (ii = 0; ii < StdI->
NsiteUC; ii++) {
   706     StdI->
tau[ii] = (
double *)malloc(
sizeof(
double) * 3);
   713   for (ii = 0; ii < 3; ii++) {
   715       * StdI->
box[1][(ii + 1) % 3]
   716       * StdI->
box[2][(ii + 2) % 3]
   718       * StdI->
box[1][(ii + 2) % 3]
   719       * StdI->
box[2][(ii + 1) % 3];
   721   printf(
"   Number of Cell = %d\n", abs(StdI->
NCell));
   722   if (StdI->
NCell == 0) {
   726   for (ii = 0; ii < 3; ii++) {
   727     for (jj = 0; jj < 3; jj++) {
   728       StdI->
rbox[ii][jj] = StdI->
box[(ii + 1) % 3][(jj + 1) % 3] * StdI->
box[(ii + 2) % 3][(jj + 2) % 3]
   729                          - StdI->
box[(ii + 1) % 3][(jj + 2) % 3] * StdI->
box[(ii + 2) % 3][(jj + 1) % 3];
   732   if (StdI->
NCell < 0) {
   733     for (ii = 0; ii < 3; ii++)
   734       for (jj = 0; jj < 3; jj++)
   735         StdI->
rbox[ii][jj] *= -1;
   742   for (ii = 0; ii < 3; ii++) {
   745     for (nBox[2] = 0; nBox[2] < 2; nBox[2]++) {
   746       for (nBox[1] = 0; nBox[1] < 2; nBox[1]++) {
   747         for (nBox[0] = 0; nBox[0] < 2; nBox[0]++) {
   749           for (jj = 0; jj < 3; jj++) edge += nBox[jj] * StdI->
box[jj][ii];
   750           if (edge < bound[ii][0]) bound[ii][0] = edge;
   751           if (edge > bound[ii][1]) bound[ii][1] = edge;
   759   StdI->
Cell = (
int **)malloc(
sizeof(
int*) * StdI->
NCell);
   760   for (ii = 0; ii < StdI->
NCell; ii++) {
   761     StdI->
Cell[ii] = (
int *)malloc(
sizeof(
int) * 3);
   764   for (iCellV[2] = bound[2][0]; iCellV[2] <= bound[2][1]; iCellV[2]++) {
   765     for (iCellV[1] = bound[1][0]; iCellV[1] <= bound[1][1]; iCellV[1]++) {
   766       for (iCellV[0] = bound[0][0]; iCellV[0] <= bound[0][1]; iCellV[0]++) {
   768         if (nBox[0] == 0 && nBox[1] == 0 && nBox[2] == 0) {
   769           for (ii = 0; ii < 3; ii++)
   770             StdI->
Cell[jj][ii] = iCellV[ii];
   782     pos[1][0] = StdI->
direct[0][0] * (double)StdI->
box[0][0] + StdI->
direct[1][0] * (
double)StdI->
box[0][1];
   783     pos[1][1] = StdI->
direct[0][1] * (double)StdI->
box[0][0] + StdI->
direct[1][1] * (
double)StdI->
box[0][1];
   784     pos[2][0] = StdI->
direct[0][0] * (double)StdI->
box[1][0] + StdI->
direct[1][0] * (
double)StdI->
box[1][1];
   785     pos[2][1] = StdI->
direct[0][1] * (double)StdI->
box[1][0] + StdI->
direct[1][1] * (
double)StdI->
box[1][1];
   786     pos[3][0] = pos[1][0] + pos[2][0];
   787     pos[3][1] = pos[1][1] + pos[2][1];
   791     for (ipos = 0; ipos < 4; ipos++) {
   792       if (pos[ipos][0] < xmin) xmin = pos[ipos][0];
   793       if (pos[ipos][0] > xmax) xmax = pos[ipos][0];
   794       if (pos[ipos][1] < xmin) xmin = pos[ipos][1];
   795       if (pos[ipos][1] > xmax) xmax = pos[ipos][1];
   800     fprintf(fp, 
"#set terminal pdf color enhanced \\\n");
   801     fprintf(fp, 
"#dashed dl 1.0 size 20.0cm, 20.0cm \n");
   802     fprintf(fp, 
"#set output \"lattice.pdf\"\n");
   803     fprintf(fp, 
"set xrange [%f: %f]\n", xmin, xmax);
   804     fprintf(fp, 
"set yrange [%f: %f]\n", xmin, xmax);
   805     fprintf(fp, 
"set size square\n");
   806     fprintf(fp, 
"unset key\n");
   807     fprintf(fp, 
"unset tics\n");
   808     fprintf(fp, 
"unset border\n");
   810     fprintf(fp, 
"set style line 1 lc 1 lt 1\n");
   811     fprintf(fp, 
"set style line 2 lc 5 lt 1\n");
   812     fprintf(fp, 
"set style line 3 lc 0 lt 1\n");
   814     fprintf(fp, 
"set arrow from %f, %f to %f, %f nohead front ls 3\n", pos[0][0], pos[0][1], pos[1][0], pos[1][1]);
   815     fprintf(fp, 
"set arrow from %f, %f to %f, %f nohead front ls 3\n", pos[1][0], pos[1][1], pos[3][0], pos[3][1]);
   816     fprintf(fp, 
"set arrow from %f, %f to %f, %f nohead front ls 3\n", pos[3][0], pos[3][1], pos[2][0], pos[2][1]);
   817     fprintf(fp, 
"set arrow from %f, %f to %f, %f nohead front ls 3\n", pos[2][0], pos[2][1], pos[0][0], pos[0][1]);
   835   double complex *Cphase,
   839   int iCell, jCell, kCell, ii;
   840   int nBox[3], jCellV[3];
   842   dR[0] = - (double)diW + StdI->
tau[isiteUC][0] - StdI->
tau[jsiteUC][0];
   843   dR[1] = - (
double)diL + StdI->
tau[isiteUC][1] - StdI->
tau[jsiteUC][1];
   844   dR[2] = - (double)diH + StdI->
tau[isiteUC][2] - StdI->
tau[jsiteUC][2];
   846   jCellV[0] = iW + diW;
   847   jCellV[1] = iL + diL;
   848   jCellV[2] = iH + diH;
   851   for (ii = 0; ii < 3; ii++) *Cphase *= cpow(StdI->
ExpPhase[ii], (
double)nBox[ii]);
   853   for (kCell = 0; kCell < StdI->
NCell; kCell++) {
   854     if (jCellV[0] == StdI->
Cell[kCell][0] &&
   855         jCellV[1] == StdI->
Cell[kCell][1] &&
   856         jCellV[2] == StdI->
Cell[kCell][2]) 
   860     if (iW == StdI->
Cell[kCell][0] &&
   861         iL == StdI->
Cell[kCell][1] &&
   862         iH == StdI->
Cell[kCell][2])
   867   *isite = iCell * StdI->
NsiteUC + isiteUC;
   868   *jsite = jCell * StdI->
NsiteUC + jsiteUC;
   869   if (strcmp(StdI->
model, 
"kondo") == 0) {
   889   double complex *Cphase,
   893   double xi, yi, xj, yj;
   897   StdFace_FindSite(StdI, iW, iL, 0, -diW, -diL, 0, jsiteUC, isiteUC, isite, jsite, Cphase, dR);
   899   xi = StdI->
direct[0][0] * ((double)iW + StdI->
tau[jsiteUC][0])
   900      + StdI->
direct[1][0] * ((double)iL + StdI->
tau[jsiteUC][1]);
   901   yi = StdI->
direct[0][1] * ((double)iW + StdI->
tau[jsiteUC][0])
   902      + StdI->
direct[1][1] * ((double)iL + StdI->
tau[jsiteUC][1]);
   904   xj = StdI->
direct[0][0] * ((double)(iW - diW) + StdI->
tau[isiteUC][0])
   905      + StdI->
direct[1][0] * ((
double)(iL - diL) + StdI->
tau[isiteUC][1]);
   906   yj = StdI->
direct[0][1] * ((double)(iW - diW) + StdI->
tau[isiteUC][0])
   907      + StdI->
direct[1][1] * ((
double)(iL - diL) + StdI->
tau[isiteUC][1]);
   909   if (*isite < 10)fprintf(fp, 
"set label \"%1d\" at %f, %f center front\n", *isite, xi, yi);
   910   else            fprintf(fp, 
"set label \"%2d\" at %f, %f center front\n", *isite, xi, yi);
   911   if (*jsite < 10)fprintf(fp, 
"set label \"%1d\" at %f, %f center front\n", *jsite, xj, yj);
   912   else            fprintf(fp, 
"set label \"%2d\" at %f, %f center front\n", *jsite, xj, yj);
   913   fprintf(fp, 
"set arrow from %f, %f to %f, %f nohead ls %d\n", xi, yi, xj, yj, connect);
   917   StdFace_FindSite(StdI, iW, iL, 0, diW, diL, 0, isiteUC, jsiteUC, isite, jsite, Cphase, dR);
   919   xi = StdI->
direct[1][0] * ((double)iL + StdI->
tau[isiteUC][1])
   920      + StdI->
direct[0][0] * ((double)iW + StdI->
tau[isiteUC][0]);
   921   yi = StdI->
direct[1][1] * ((double)iL + StdI->
tau[isiteUC][1])
   922      + StdI->
direct[0][1] * ((double)iW + StdI->
tau[isiteUC][0]);
   924   xj = StdI->
direct[0][0] * ((double)(iW + diW) + StdI->
tau[jsiteUC][0])
   925      + StdI->
direct[1][0] * ((
double)(iL + diL) + StdI->
tau[jsiteUC][1]);
   926   yj = StdI->
direct[0][1] * ((double)(iW + diW) + StdI->
tau[jsiteUC][0])
   927      + StdI->
direct[1][1] * ((
double)(iL + diL) + StdI->
tau[jsiteUC][1]);
   929   if (*isite < 10)fprintf(fp, 
"set label \"%1d\" at %f, %f center front\n", *isite, xi, yi);
   930   else            fprintf(fp, 
"set label \"%2d\" at %f, %f center front\n", *isite, xi, yi);
   931   if (*jsite < 10)fprintf(fp, 
"set label \"%1d\" at %f, %f center front\n", *jsite, xj, yj);
   932   else            fprintf(fp, 
"set label \"%2d\" at %f, %f center front\n", *jsite, xj, yj);
   933   fprintf(fp, 
"set arrow from %f, %f to %f, %f nohead ls %d\n", xi, yi, xj, yj, connect);
   940   int ii, jj, kk, isite, iCell;
   943   fp = fopen(
"lattice.xsf", 
"w");
   944   fprintf(fp, 
"CRYSTAL\n");
   945   fprintf(fp, 
"PRIMVEC\n");
   946   for (ii = 0; ii < 3; ii++) {
   947     for (jj = 0; jj < 3; jj++) {
   949       for (kk = 0; kk < 3; kk++)
   950         vec[jj] += (
double)StdI->
box[ii][kk] * StdI->
direct[kk][jj];
   952     fprintf(fp, 
"%15.5f %15.5f %15.5f\n", 
vec[0], 
vec[1], 
vec[2]);
   954   fprintf(fp, 
"PRIMCOORD\n");
   956   for (iCell = 0; iCell < StdI->
NCell; iCell++) {
   957     for (isite = 0; isite < StdI->
NsiteUC; isite++) {
   958       for (jj = 0; jj < 3; jj++) {
   960         for (kk = 0; kk < 3; kk++)
   961           vec[jj] += ((
double)StdI->
Cell[iCell][kk] + StdI->
tau[isite][kk])
   964       fprintf(fp, 
"H %15.5f %15.5f %15.5f\n", 
vec[0], 
vec[1], 
vec[2]);
   981   char Jname[3][3][10]; 
   983   strcpy(Jname[0][0], 
"x\0");
   984   strcpy(Jname[0][1], 
"xy\0");
   985   strcpy(Jname[0][2], 
"xz\0");
   986   strcpy(Jname[1][0], 
"yx\0");
   987   strcpy(Jname[1][1], 
"y\0");
   988   strcpy(Jname[1][2], 
"yz\0");
   989   strcpy(Jname[2][0], 
"zx\0");
   990   strcpy(Jname[2][1], 
"zy\0");
   991   strcpy(Jname[2][2], 
"z\0");
   993   if (isnan(StdI->
JAll) == 0 && isnan(
J0All)  == 0) {
   994     fprintf(stdout, 
"\n ERROR! J and %s conflict !\n\n", J0name);
   997   for (i1 = 0; i1 < 3; i1++) {
   998     for (i2 = 0; i2 < 3; i2++) {
   999       if (isnan(StdI->
JAll) == 0 && isnan(StdI->
J[i1][i2]) == 0) {
  1000         fprintf(stdout, 
"\n ERROR! J and J%s conflict !\n\n", Jname[i1][i2]);
  1003       else if (isnan(
J0All) == 0 && isnan(StdI->
J[i1][i2]) == 0) {
  1004         fprintf(stdout, 
"\n ERROR! %s and J%s conflict !\n\n",
  1005           J0name, Jname[i1][i2]);
  1008       else if (isnan(
J0All) == 0 && isnan(
J0[i1][i2]) == 0) {
  1009         fprintf(stdout, 
"\n ERROR! %s and %s%s conflict !\n\n", J0name,
  1010           J0name, Jname[i1][i2]);
  1013       else if (isnan(
J0[i1][i2]) == 0 && isnan(StdI->
JAll) == 0) {
  1014         fprintf(stdout, 
"\n ERROR! %s%s and J conflict !\n\n",
  1015           J0name, Jname[i1][i2]);
  1021   for (i1 = 0; i1 < 3; i1++) {
  1022     for (i2 = 0; i2 < 3; i2++) {
  1023       for (i3 = 0; i3 < 3; i3++) {
  1024         for (i4 = 0; i4 < 3; i4++) {
  1025           if (isnan(
J0[i1][i2]) == 0 && isnan(StdI->
J[i3][i4]) == 0) {
  1026             fprintf(stdout, 
"\n ERROR! %s%s and J%s conflict !\n\n", 
  1027               J0name, Jname[i1][i2], Jname[i3][i4]);
  1035   for (i1 = 0; i1 < 3; i1++) {
  1036     for (i2 = 0; i2 < 3; i2++) {
  1037       if (isnan(
J0[i1][i2]) == 0)
  1038         fprintf(stdout, 
"  %14s%s = %-10.5f\n", J0name, Jname[i1][i2], 
J0[i1][i2]);
  1039       else if (isnan(StdI->
J[i1][i2]) == 0) {
  1040         J0[i1][i2] = StdI->
J[i1][i2];
  1041         fprintf(stdout, 
"  %14s%s = %-10.5f\n", J0name, Jname[i1][i2], 
J0[i1][i2]);
  1043       else if (i1 == i2 && isnan(
J0All) == 0) {
  1045         fprintf(stdout, 
"  %14s%s = %-10.5f\n", J0name, Jname[i1][i2], 
J0[i1][i2]);
  1047       else if (i1 == i2 && isnan(StdI->
JAll) == 0) {
  1049         fprintf(stdout, 
"  %14s%s = %-10.5f\n", J0name, Jname[i1][i2], 
J0[i1][i2]);
  1068   char Jname[3][3][10];
  1070   strcpy(Jname[0][0], 
"x\0");
  1071   strcpy(Jname[0][1], 
"xy\0");
  1072   strcpy(Jname[0][2], 
"xz\0");
  1073   strcpy(Jname[1][0], 
"yx\0");
  1074   strcpy(Jname[1][1], 
"y\0");
  1075   strcpy(Jname[1][2], 
"yz\0");
  1076   strcpy(Jname[2][0], 
"zx\0");
  1077   strcpy(Jname[2][1], 
"zy\0");
  1078   strcpy(Jname[2][2], 
"z\0");
  1080   for (i1 = 0; i1 < 3; i1++) {
  1081     for (i2 = 0; i2 < 3; i2++) {
  1082       if (isnan(
JpAll) == 0 && isnan(
Jp[i1][i2]) == 0) {
  1083         fprintf(stdout, 
"\n ERROR! %s and %s%s conflict !\n\n", Jpname,
  1084           Jpname, Jname[i1][i2]);
  1090   for (i1 = 0; i1 < 3; i1++) {
  1091     for (i2 = 0; i2 < 3; i2++) {
  1092       if (isnan(
Jp[i1][i2]) == 0)
  1093         fprintf(stdout, 
"  %14s%s = %-10.5f\n", Jpname, Jname[i1][i2], 
Jp[i1][i2]);
  1094       else if (i1 == i2 && isnan(
JpAll) == 0) {
  1096         fprintf(stdout, 
"  %14s%s = %-10.5f\n", Jpname, Jname[i1][i2], 
Jp[i1][i2]);
  1115   if (isnan(StdI->
V) == 0 && isnan(*
V0) == 0) {
  1116     fprintf(stdout, 
"\n ERROR! V and %s conflict !\n\n", V0name);
  1119   else if (isnan(*
V0) == 0)
  1120     fprintf(stdout, 
"  %15s = %-10.5f\n", V0name, *
V0);
  1121   else if (isnan(StdI->
V) == 0) {
  1123     fprintf(stdout, 
"  %15s = %-10.5f\n", V0name, *
V0);
  1140   if (isnan(creal(StdI->
t)) == 0 && isnan(creal(*
t0)) == 0) {
  1141     fprintf(stdout, 
"\n ERROR! t and %s conflict !\n\n", t0name);
  1144   else if (isnan(creal(*
t0)) == 0)
  1145     fprintf(stdout, 
"  %15s = %-10.5f %-10.5f\n", t0name, creal(*
t0), cimag(*
t0));
  1146   else if (isnan(creal(StdI->
t)) == 0) {
  1148     fprintf(stdout, 
"  %15s = %-10.5f %-10.5f\n", t0name, creal(*
t0), cimag(*
t0));
  1159   int isite, iCell, ii;
  1161   fp = fopen(
"geometry.dat", 
"w");
  1163   for (ii = 0; ii < 3; ii++) 
  1164     fprintf(fp, 
"%25.15e %25.15e %25.15e\n", 
  1166   fprintf(fp, 
"%25.15e %25.15e %25.15e\n", 
  1168   for (ii = 0; ii < 3; ii++)
  1169     fprintf(fp, 
"%d %d %d\n",
  1170       StdI->
box[ii][0], StdI->
box[ii][1], StdI->
box[ii][2]);
  1172   for (iCell = 0; iCell < StdI->
NCell; iCell++) {
  1173     for (isite = 0; isite < StdI->
NsiteUC; isite++) {
  1174       fprintf(fp, 
"%d %d %d %d\n",
  1175         StdI->
Cell[iCell][0] - StdI->
Cell[0][0],
  1176         StdI->
Cell[iCell][1] - StdI->
Cell[0][1],
  1177         StdI->
Cell[iCell][2] - StdI->
Cell[0][2],
  1181   if (strcmp(StdI->
model, 
"kondo") == 0) {
  1182     for (iCell = 0; iCell < StdI->
NCell; iCell++) {
  1183       for (isite = 0; isite < StdI->
NsiteUC; isite++) {
  1184         fprintf(fp, 
"%d %d %d %d\n",
  1185           StdI->
Cell[iCell][0] - StdI->
Cell[0][0],
  1186           StdI->
Cell[iCell][1] - StdI->
Cell[0][1],
  1187           StdI->
Cell[iCell][2] - StdI->
Cell[0][2],
  1210   StdI->
transindx = (
int **)malloc(
sizeof(
int*) * ntransMax);
  1211   StdI->
trans = (
double complex *)malloc(
sizeof(
double complex) * ntransMax);
  1212   for (ii = 0; ii < ntransMax; ii++) {
  1213     StdI->
transindx[ii] = (
int *)malloc(
sizeof(
int) * 4);
  1217   if (strcmp(StdI->
method, 
"timeevolution") == 0 && StdI->
PumpBody == 1) {
  1220     StdI->
pump = (
double complex **)malloc(
sizeof(
double complex*) * StdI->
Lanczos_max);
  1222       StdI->
npump[it] = 0;
  1223       StdI->
pumpindx[it] = (
int **)malloc(
sizeof(
int*) * ntransMax);
  1224       StdI->
pump[it] = (
double complex *)malloc(
sizeof(
double complex) * ntransMax);
  1225       for (ii = 0; ii < ntransMax; ii++) {
  1226         StdI->
pumpindx[it][ii] = (
int *)malloc(
sizeof(
int) * 4);
  1234   StdI->
intrindx = (
int **)malloc(
sizeof(
int*) * nintrMax);
  1235   StdI->
intr = (
double complex *)malloc(
sizeof(
double complex) * nintrMax);
  1236   for (ii = 0; ii < nintrMax; ii++) {
  1237     StdI->
intrindx[ii] = (
int *)malloc(
sizeof(
int) * 8);
  1243   StdI->
CintraIndx = (
int **)malloc(
sizeof(
int*) * nintrMax);
  1244   StdI->
Cintra = (
double *)malloc(
sizeof(
double) * nintrMax);
  1245   for (ii = 0; ii < nintrMax; ii++) {
  1246     StdI->
CintraIndx[ii] = (
int *)malloc(
sizeof(
int) * 1);
  1252   StdI->
CinterIndx = (
int **)malloc(
sizeof(
int*) * nintrMax);
  1253   StdI->
Cinter = (
double *)malloc(
sizeof(
double) * nintrMax);
  1254   for (ii = 0; ii < nintrMax; ii++) {
  1255     StdI->
CinterIndx[ii] = (
int *)malloc(
sizeof(
int) * 2);
  1261   StdI->
HundIndx = (
int **)malloc(
sizeof(
int*) * nintrMax);
  1262   StdI->
Hund = (
double *)malloc(
sizeof(
double) * nintrMax);
  1263   for (ii = 0; ii < nintrMax; ii++) {
  1264     StdI->
HundIndx[ii] = (
int *)malloc(
sizeof(
int) * 2);
  1270   StdI->
ExIndx = (
int **)malloc(
sizeof(
int*) * nintrMax);
  1271   StdI->
Ex = (
double *)malloc(
sizeof(
double) * nintrMax);
  1272   for (ii = 0; ii < nintrMax; ii++) {
  1273     StdI->
ExIndx[ii] = (
int *)malloc(
sizeof(
int) * 2);
  1279   StdI->
PLIndx = (
int **)malloc(
sizeof(
int*) * nintrMax);
  1280   StdI->
PairLift = (
double *)malloc(
sizeof(
double) * nintrMax);
  1281   for (ii = 0; ii < nintrMax; ii++) {
  1282     StdI->
PLIndx[ii] = (
int *)malloc(
sizeof(
int) * 2);
  1288   StdI->
PHIndx = (
int **)malloc(
sizeof(
int*) * nintrMax);
  1289   StdI->
PairHopp = (
double *)malloc(
sizeof(
double) * nintrMax);
  1290   for (ii = 0; ii < nintrMax; ii++) {
  1291     StdI->
PHIndx[ii] = (
int *)malloc(
sizeof(
int) * 2);
  1300 static void StdFace_FoldSiteSub(
  1307   int ii, jj, iCellV_frac[3];
  1311   for (ii = 0; ii < 3; ii++) {
  1312     iCellV_frac[ii] = 0;
  1313     for (jj = 0; jj < 3; jj++)iCellV_frac[ii] += StdI->rboxsub[ii][jj] * iCellV[jj];
  1318   for (ii = 0; ii < 3; ii++)
  1319     nBox[ii] = (iCellV_frac[ii] + StdI->NCellsub * 1000) / StdI->NCellsub - 1000;
  1323   for (ii = 0; ii < 3; ii++)
  1324     iCellV_frac[ii] -= StdI->NCellsub*(nBox[ii]);
  1326   for (ii = 0; ii < 3; ii++) {
  1327     iCellV_fold[ii] = 0;
  1328     for (jj = 0; jj < 3; jj++) iCellV_fold[ii] += StdI->boxsub[jj][ii] * iCellV_frac[jj];
  1329     iCellV_fold[ii] = (iCellV_fold[ii] + StdI->NCellsub * 1000) / StdI->NCellsub - 1000;
  1339   int jsite, iCell, jCell, kCell;
  1340   int nBox[3], iCellV[3], jCellV[3], ii;
  1344   Sym = (
int **)malloc(
sizeof(
int*) * StdI->
nsite);
  1345   Anti = (
int **)malloc(
sizeof(
int*) * StdI->
nsite);
  1346   for (jsite = 0; jsite < StdI->
nsite; jsite++) {
  1347     Sym[jsite] = (
int *)malloc(
sizeof(
int) * StdI->
nsite);
  1348     Anti[jsite] = (
int *)malloc(
sizeof(
int) * StdI->
nsite);
  1354   for (iCell = 0; iCell < StdI->
NCell; iCell++) {
  1356     StdFace_FoldSiteSub(StdI, StdI->
Cell[iCell], nBox, iCellV);
  1360     if (iCellV[0] == StdI->
Cell[iCell][0] && 
  1361         iCellV[1] == StdI->
Cell[iCell][1] && 
  1362         iCellV[2] == StdI->
Cell[iCell][2]) {
  1366       for (jCell = 0; jCell < StdI->
NCell; jCell++) {
  1368         for (ii = 0; ii < 3; ii++)jCellV[ii] = StdI->
Cell[jCell][ii] + iCellV[ii];
  1371         for (kCell = 0; kCell < StdI->
NCell; kCell++) {
  1372           if (jCellV[0] == StdI->
Cell[kCell][0] && 
  1373               jCellV[1] == StdI->
Cell[kCell][1] &&
  1374               jCellV[2] == StdI->
Cell[kCell][2]) 
  1377             for (jsite = 0; jsite < StdI->
NsiteUC; jsite++) {
  1379               Sym[StdI->NSym][jCell*StdI->
NsiteUC + jsite] = kCell*StdI->
NsiteUC + jsite;
  1380               Anti[StdI->NSym][jCell*StdI->
NsiteUC + jsite]
  1385               if (strcmp(StdI->
model, 
"kondo") == 0) {
  1387                 Anti[StdI->NSym][StdI->
nsite / 2 + jCell*StdI->
NsiteUC + jsite]
  1402   fp = fopen(
"qptransidx.def", 
"w");
  1403   fprintf(fp, 
"=============================================\n");
  1404   fprintf(fp, 
"NQPTrans %10d\n", StdI->NSym);
  1405   fprintf(fp, 
"=============================================\n");
  1406   fprintf(fp, 
"======== TrIdx_TrWeight_and_TrIdx_i_xi ======\n");
  1407   fprintf(fp, 
"=============================================\n");
  1408   for (iSym = 0; iSym < StdI->NSym; iSym++) {
  1409     fprintf(fp, 
"%d %10.5f\n", iSym, 1.0);
  1411   for (iSym = 0; iSym < StdI->NSym; iSym++) {
  1412     for (jsite = 0; jsite < StdI->
nsite; jsite++) {
  1413       if (Anti[iSym][jsite] % 2 == 0) Anti[iSym][jsite] = 1;
  1414       else Anti[iSym][jsite] = -1;
  1416         fprintf(fp, 
"%5d  %5d  %5d  %5d\n", iSym, jsite, Sym[iSym][jsite], Anti[iSym][jsite]);
  1419         fprintf(fp, 
"%5d  %5d  %5d\n", iSym, jsite, Sym[iSym][jsite]);
  1425   fprintf(stdout, 
"    qptransidx.def is written.\n");
  1427   for (jsite = 0; jsite < StdI->
nsite; jsite++) {
  1438 static void StdFace_InitSiteSub(
struct StdIntList *StdI)
  1440   int ii, jj, kk, prod;
  1444   if ((StdI->Lsub != StdI->
NaN_i || StdI->Wsub != StdI->
NaN_i || StdI->Hsub != StdI->
NaN_i)
  1445     && (StdI->boxsub[0][0] != StdI->
NaN_i || StdI->boxsub[0][1] != StdI->
NaN_i || StdI->boxsub[0][2] != StdI->
NaN_i ||
  1446         StdI->boxsub[1][0] != StdI->
NaN_i || StdI->boxsub[1][1] != StdI->
NaN_i || StdI->boxsub[1][2] != StdI->
NaN_i ||
  1447         StdI->boxsub[2][0] != StdI->
NaN_i || StdI->boxsub[2][1] != StdI->
NaN_i || StdI->boxsub[2][2] != StdI->
NaN_i))
  1449     fprintf(stdout, 
"\nERROR ! (Lsub, Wsub, Hsub) and (a0Wsub, ..., a2Hsub) conflict !\n\n");
  1452   else if (StdI->Wsub != StdI->
NaN_i || StdI->Lsub != StdI->
NaN_i || StdI->Hsub != StdI->
NaN_i) {
  1456     for (ii = 0; ii < 3; ii++) 
for (jj = 0; jj < 3; jj++)
  1457       StdI->boxsub[ii][jj] = 0;
  1458     StdI->boxsub[0][0] = StdI->Wsub;
  1459     StdI->boxsub[1][1] = StdI->Lsub;
  1460     StdI->boxsub[2][2] = StdI->Hsub;
  1477   for (ii = 0; ii < 3; ii++) {
  1478     StdI->NCellsub += StdI->boxsub[0][ii]
  1479                     * StdI->boxsub[1][(ii + 1) % 3]
  1480                     * StdI->boxsub[2][(ii + 2) % 3]
  1481                     - StdI->boxsub[0][ii]
  1482                     * StdI->boxsub[1][(ii + 2) % 3]
  1483                     * StdI->boxsub[2][(ii + 1) % 3];
  1485   printf(
"         Number of Cell in the sublattice: %d\n", abs(StdI->NCellsub));
  1486   if (StdI->NCellsub == 0) {
  1490   for (ii = 0; ii < 3; ii++) {
  1491     for (jj = 0; jj < 3; jj++) {
  1492       StdI->rboxsub[ii][jj] = StdI->boxsub[(ii + 1) % 3][(jj + 1) % 3] * StdI->boxsub[(ii + 2) % 3][(jj + 2) % 3]
  1493                             - StdI->boxsub[(ii + 1) % 3][(jj + 2) % 3] * StdI->boxsub[(ii + 2) % 3][(jj + 1) % 3];
  1496   if (StdI->NCellsub < 0) {
  1497     for (ii = 0; ii < 3; ii++)
  1498       for (jj = 0; jj < 3; jj++)
  1499         StdI->rboxsub[ii][jj] *= -1;
  1500     StdI->NCellsub *= -1;
  1505   for (ii = 0; ii < 3; ii++) {
  1506     for (jj = 0; jj < 3; jj++) {
  1508       for (kk = 0; kk < 3; kk++) prod += StdI->rboxsub[ii][kk] * (
double)StdI->
box[jj][kk];
  1509       if (prod % StdI->NCellsub != 0) {
  1510         printf(
"\n ERROR ! Sublattice is INCOMMENSURATE !\n\n");
  1519 void StdFace_generate_orb(
struct StdIntList *StdI) {
  1520   int iCell, jCell, kCell, iCell2, jCell2, iOrb, isite, jsite, Anti;
  1521   int nBox[3], iCellV[3], jCellV[3], dCellV[3], ii;
  1524   StdFace_InitSiteSub(StdI);
  1526   StdI->Orb = (
int **)malloc(
sizeof(
int*) * StdI->
nsite);
  1527   StdI->AntiOrb = (
int **)malloc(
sizeof(
int*) * StdI->
nsite);
  1528   for (isite = 0; isite < StdI->
nsite; isite++) {
  1529     StdI->Orb[isite] = (
int *)malloc(
sizeof(
int) * StdI->
nsite);
  1530     StdI->AntiOrb[isite] = (
int *)malloc(
sizeof(
int) * StdI->
nsite);
  1532   CellDone = (
int **)malloc(
sizeof(
int*) * StdI->
NCell);
  1533   for (iCell = 0; iCell < StdI->
NCell; iCell++) {
  1534     CellDone[iCell] = (
int *)malloc(
sizeof(
int) * StdI->
NCell);
  1535     for (jCell = 0; jCell < StdI->
NCell; jCell++) {
  1536       CellDone[iCell][jCell] = 0;
  1541   for (iCell = 0; iCell < StdI->
NCell; iCell++) {
  1543     StdFace_FoldSiteSub(StdI, StdI->
Cell[iCell], nBox, iCellV);
  1547     for (kCell = 0; kCell < StdI->
NCell; kCell++) {
  1548       if (iCellV[0] == StdI->
Cell[kCell][0] && 
  1549           iCellV[1] == StdI->
Cell[kCell][1] &&
  1550           iCellV[2] == StdI->
Cell[kCell][2]) 
  1556     for (jCell = 0; jCell < StdI->
NCell; jCell++) {
  1558       for (ii = 0; ii < 3; ii++)
  1559         jCellV[ii] = StdI->
Cell[jCell][ii] + iCellV[ii] - StdI->
Cell[iCell][ii];
  1563       for (kCell = 0; kCell < StdI->
NCell; kCell++) {
  1564         if (jCellV[0] == StdI->
Cell[kCell][0] &&
  1565             jCellV[1] == StdI->
Cell[kCell][1] &&
  1566             jCellV[2] == StdI->
Cell[kCell][2]) 
  1574       for (ii = 0; ii < 3; ii++)
  1575         dCellV[ii] = StdI->
Cell[jCell][ii] - StdI->
Cell[iCell][ii];
  1578       for (ii = 0; ii < 3; ii++)Anti += StdI->
AntiPeriod[ii] * nBox[ii];
  1579       if (Anti % 2 == 0) Anti = 1;
  1582       for (isite = 0; isite < StdI->
NsiteUC; isite++) {
  1583         for (jsite = 0; jsite < StdI->
NsiteUC; jsite++) {
  1585           if (CellDone[iCell2][jCell2] == 0) {
  1586             StdI->Orb[iCell2*StdI->
NsiteUC + isite][jCell2*StdI->
NsiteUC + jsite] = iOrb;
  1587             StdI->AntiOrb[iCell2*StdI->
NsiteUC + isite][jCell2*StdI->
NsiteUC + jsite] = Anti;
  1590           StdI->Orb[iCell*StdI->
NsiteUC + isite][jCell*StdI->
NsiteUC + jsite]
  1591             = StdI->Orb[iCell2*StdI->
NsiteUC + isite][jCell2*StdI->
NsiteUC + jsite];
  1592           StdI->AntiOrb[iCell*StdI->
NsiteUC + isite][jCell*StdI->
NsiteUC + jsite] = Anti;
  1594           if (strcmp(StdI->
model, 
"kondo") == 0) {
  1595             if (CellDone[iCell2][jCell2] == 0) {
  1596               StdI->Orb[StdI->
nsite / 2 + iCell2*StdI->
NsiteUC + isite]
  1597                        [                  jCell2*StdI->
NsiteUC + jsite] = iOrb;
  1598               StdI->AntiOrb[StdI->
nsite / 2 + iCell2*StdI->
NsiteUC + isite]
  1599                            [                  jCell2*StdI->
NsiteUC + jsite] = Anti;
  1601               StdI->Orb[                  iCell2*StdI->
NsiteUC + isite]
  1602                        [StdI->
nsite / 2 + jCell2*StdI->
NsiteUC + jsite] = iOrb;
  1603               StdI->AntiOrb[                  iCell2*StdI->
NsiteUC + isite]
  1604                            [StdI->
nsite / 2 + jCell2*StdI->
NsiteUC + jsite] = Anti;
  1606               StdI->Orb[StdI->
nsite / 2 + iCell2*StdI->
NsiteUC + isite]
  1607                        [StdI->
nsite / 2 + jCell2*StdI->
NsiteUC + jsite] = iOrb;
  1608               StdI->AntiOrb[StdI->
nsite / 2 + iCell2*StdI->
NsiteUC + isite]
  1609                            [StdI->
nsite / 2 + jCell2*StdI->
NsiteUC + jsite] = Anti;
  1612             StdI->Orb[StdI->
nsite / 2 + iCell*StdI->
NsiteUC + isite]
  1613                      [                  jCell*StdI->
NsiteUC + jsite]
  1614             = StdI->Orb[StdI->
nsite / 2 + iCell2*StdI->
NsiteUC + isite]
  1615                        [                  jCell2*StdI->
NsiteUC + jsite];
  1616             StdI->AntiOrb[StdI->
nsite / 2 + iCell*StdI->
NsiteUC + isite]
  1617                          [                  jCell*StdI->
NsiteUC + jsite] = Anti;
  1618             StdI->Orb[                  iCell*StdI->
NsiteUC + isite]
  1620             = StdI->Orb[                  iCell2*StdI->
NsiteUC + isite]
  1622             StdI->AntiOrb[iCell*StdI->
NsiteUC + isite]
  1623                          [StdI->
nsite / 2 + jCell*StdI->
NsiteUC + jsite] = Anti;
  1624             StdI->Orb[StdI->
nsite / 2 + iCell*StdI->
NsiteUC + isite]
  1626               = StdI->Orb[StdI->
nsite / 2 + iCell2*StdI->
NsiteUC + isite]
  1628               StdI->AntiOrb[StdI->
nsite / 2 + iCell*StdI->
NsiteUC + isite]
  1629                            [StdI->
nsite / 2 + jCell*StdI->
NsiteUC + jsite] = Anti;
  1634       CellDone[iCell2][jCell2] = 1;
  1640   for (iCell = 0; iCell < StdI->
NCell; iCell++) free(CellDone[iCell]);
  1649   int isite, jsite, isiteUC, jsiteUC, revarsal, isite1, jsite1, iorb;
  1650   int NJastrow, iJastrow;
  1653   double complex Cphase;
  1656   Jastrow = (
int **)malloc(
sizeof(
int*) * StdI->
nsite);
  1657   for (isite = 0; isite < StdI->
nsite; isite++) 
  1658     Jastrow[isite] = (
int *)malloc(
sizeof(
int) * StdI->
nsite);
  1660   if (abs(StdI->NMPTrans) == 1 || StdI->NMPTrans == StdI->
NaN_i) {
  1664     for (isite = 0; isite < StdI->
nsite; isite++) {
  1665       for (jsite = 0; jsite < StdI->
nsite; jsite++) {
  1666         Jastrow[isite][jsite] = StdI->Orb[isite][jsite];
  1672     for (iorb = 0; iorb < StdI->NOrb; iorb++) {
  1673       for (isite = 0; isite < StdI->
nsite; isite++) {
  1674         for (jsite = 0; jsite < StdI->
nsite; jsite++) {
  1675           if (Jastrow[isite][jsite] == iorb) {
  1676             Jastrow[jsite][isite] = Jastrow[isite][jsite];
  1682     if (strcmp(StdI->
model, 
"hubbard") == 0) NJastrow = 0;
  1684     for (isite = 0; isite < StdI->
nsite; isite++) {
  1689         for (jsite = 0; jsite < StdI->
nsite; jsite++) {
  1690           Jastrow[isite][jsite] = -1;
  1691           Jastrow[jsite][isite] = -1;
  1696       for (jsite = 0; jsite < isite; jsite++) {
  1697         if (Jastrow[isite][jsite] >= 0) {
  1698           iJastrow = Jastrow[isite][jsite];
  1700           for (isite1 = 0; isite1 < StdI->
nsite; isite1++) {
  1701             for (jsite1 = 0; jsite1 < StdI->
nsite; jsite1++) {
  1702               if (Jastrow[isite1][jsite1] == iJastrow)
  1703                 Jastrow[isite1][jsite1] = NJastrow;
  1710     NJastrow = -NJastrow;
  1711     for (isite = 0; isite < StdI->
nsite; isite++) {
  1712       for (jsite = 0; jsite < StdI->
nsite; jsite++) {
  1713         Jastrow[isite][jsite] = -1 - Jastrow[isite][jsite];
  1719     if (strcmp(StdI->
model, 
"spin") == 0) {
  1722       for (isite = 0; isite < StdI->
nsite; isite++) {
  1723         for (jsite = 0; jsite < StdI->
nsite; jsite++) {
  1724           Jastrow[isite][jsite] = 0;
  1732       if (strcmp(StdI->
model, 
"kondo") == 0) {
  1736         for (isite = 0; isite < StdI->
nsite; isite++) {
  1737           for (jsite = 0; jsite < StdI->
nsite / 2; jsite++) {
  1738             Jastrow[isite][jsite] = 0;
  1739             Jastrow[jsite][isite] = 0;
  1746       for (dCell = 0; dCell < StdI->
NCell; dCell++) {
  1749           -StdI->
Cell[dCell][0], -StdI->
Cell[dCell][1], -StdI->
Cell[dCell][2],
  1750           0, 0, &isite, &jsite, &Cphase, dR);
  1752         iCell = jsite / StdI->
NsiteUC;
  1753         if (iCell < dCell) {
  1759         else if (iCell == dCell) {
  1767         for (isiteUC = 0; isiteUC < StdI->
NsiteUC; isiteUC++) {
  1768           for (jsiteUC = 0; jsiteUC < StdI->
NsiteUC; jsiteUC++) {
  1769             if (revarsal == 1 && jsiteUC > isiteUC) 
continue;
  1770             if (isiteUC == jsiteUC &&
  1771               StdI->
Cell[dCell][0] == 0 &&
  1772               StdI->
Cell[dCell][1] == 0 &&
  1773               StdI->
Cell[dCell][2] == 0) 
continue;
  1775             for (iCell = 0; iCell < StdI->
NCell; iCell++) {
  1777                 StdI->
Cell[iCell][0], StdI->
Cell[iCell][1], StdI->
Cell[iCell][2],
  1778                 StdI->
Cell[dCell][0], StdI->
Cell[dCell][1], StdI->
Cell[dCell][2],
  1779                 isiteUC, jsiteUC, &isite, &jsite, &Cphase, dR);
  1781               Jastrow[isite][jsite] = NJastrow;
  1782               Jastrow[jsite][isite] = NJastrow;
  1794   fp = fopen(
"jastrowidx.def", 
"w");
  1795   fprintf(fp, 
"=============================================\n");
  1796   fprintf(fp, 
"NJastrowIdx %10d\n", NJastrow);
  1797   fprintf(fp, 
"ComplexType %10d\n", 0);
  1798   fprintf(fp, 
"=============================================\n");
  1799   fprintf(fp, 
"=============================================\n");
  1801   for (isite = 0; isite < StdI->
nsite; isite++) {
  1802     for (jsite = 0; jsite < StdI->
nsite; jsite++) {
  1803       if (isite == jsite) 
continue;
  1804       fprintf(fp, 
"%5d  %5d  %5d\n", isite, jsite, Jastrow[isite][jsite]);
  1808   for (iJastrow = 0; iJastrow < NJastrow; iJastrow++){
  1809     if (strcmp(StdI->
model, 
"hubbard") == 0 || iJastrow > 0)
  1810       fprintf(fp, 
"%5d  %5d\n", iJastrow, 1);
  1812       fprintf(fp, 
"%5d  %5d\n", iJastrow, 0);
  1816   fprintf(stdout, 
"    jastrowidx.def is written.\n");
  1818   for (isite = 0; isite < StdI->
nsite; isite++) free(Jastrow[isite]);
 void StdFace_trans(struct StdIntList *StdI, double complex trans0, int isite, int ispin, int jsite, int jspin)
Add transfer to the list set StdIntList::trans and StdIntList::transindx and increment StdIntList::nt...
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. 
int NHund
Number of Hund term, counted in each lattice file. 
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 ExpPhase[3]
. 
double J[3][3]
Isotropic, diagonal/off-diagonal spin coupling (1st Near.), input parameter Jx, Jy, Jz, Jxy, etc. 
void StdFace_GeneralJ(struct StdIntList *StdI, double J[3][3], int Si2, int Sj2, int isite, int jsite)
Treat J as a 3*3 matrix [(6S + 1)*(6S' + 1) interactions]. 
int L
Number of sites along the 2nd axis, input parameter. 
double complex * intr
[StdIntList::nintr] Coefficient of general two-body term, malloc in StdFace_MallocInteractions() and ...
void StdFace_HubbardLocal(struct StdIntList *StdI, double mu0, double h0, double Gamma0, double U0, int isite)
Add intra-Coulomb, magnetic field, chemical potential for the itenerant electron. ...
double pi180
, set in StdFace_ResetVals(). 
void StdFace_PrintGeometry(struct StdIntList *StdI)
Print geometry of sites for the pos-process of correlation function. 
double ** At
[StdIntList::nt][3] Vector potential. 
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. 
int ** PLIndx
[StdIntList::NPairLift][2] Site indices of pair-lift term, malloc in StdFace_MallocInteractions() and...
double complex * trans
[StdIntList::ntrans] Coefficient of one-body term, malloc in StdFace_MallocInteractions() and set in ...
void StdFace_Hopping(struct StdIntList *StdI, double complex trans0, int isite, int jsite, double *dR)
Add Hopping for the both spin. 
double complex t
Nearest-neighbor hopping, input parameter. 
void StdFace_MallocInteractions(struct StdIntList *StdI, int ntransMax, int nintrMax)
Malloc Arrays for interactions. 
double JAll
Isotropic, diagonal spin coupling (1st Near.), input parameter J. 
int S2
Total spin |S| of a local spin, input from file. 
int ** ExIndx
[StdIntList::NEx][2] Site indices of exchange term, malloc in StdFace_MallocInteractions() and set in...
int NsiteUC
Number of sites in the unit cell. Defined in the beginning of each lattice function. 
void StdFace_InputCoulombV(struct StdIntList *StdI, double *V0, char *V0name)
Input off-site Coulomb interaction from the input file, if it is not specified, use the default value...
void StdFace_InputHopp(struct StdIntList *StdI, double complex *t0, char *t0name)
Input hopping integral from the input file, if it is not specified, use the default value(0 or the is...
void StdFace_InitSite(struct StdIntList *StdI, FILE *fp, int dim)
Initialize the super-cell where simulation is performed. 
int W
Number of sites along the 1st axis, input parameter. 
int ntrans
Number of transfer, counted in each lattice file. 
char model[256]
Name of model, input parameter. 
void StdFace_NotUsed_J(char *valname, double JAll, double J[3][3])
Stop HPhi if variables (real) not used is specified in the input file (!=NaN). 
void StdFace_PrintVal_dd(char *valname, double *val, double val0, double val1)
Print a valiable (real) read from the input file if it is not specified in the input file (=NaN)...
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 rbox[3][3]
The inversion of StdIntList::box. Set in StdFace_InitSite(). 
double J0All
Anisotropic, diagonal spin coupling (1nd Near), input parameter J0. 
double J0[3][3]
Isotropic, diagonal/off-diagonal spin coupling (1st Near.), input parameter J0x, J0y, J0z, J0xy, etc. or set in StdFace_InputSpinNN(). 
double * 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...
double phase[3]
Boundary phase, input parameter phase0, etc. 
int *** pumpindx
[StdIntList::nt][StdIntList::npump][4] Site/spin indices of one-body term, malloc in StdFace_MallocIn...
int NPairLift
Number of pair-lift term, counted in each lattice file. 
int PumpBody
one- or two-body pumping, defined from StdIntList::PumpType 
int * npump
[StdIntList::nt] Number of transfer, counted in each lattice file. 
int * locspinflag
[StdIntList::nsite] LocSpin in Expert mode, malloc and set in each lattice file. 
int ** HundIndx
[StdIntList::NHund][2] Site indices of Hund term, malloc in StdFace_MallocInteractions() and set in S...
int Lanczos_max
The maxixmum number of iterations, input from file. 
double V
Off-site Coulomb potential (1st), input parameter. 
double complex t0
Anisotropic hopping (1st), input parameter. 
double direct[3][3]
The unit direct lattice vector. Set in StdFace_InitSite(). 
void StdFace_MagField(struct StdIntList *StdI, int S2, double h, double Gamma, int isite)
Add longitudinal and transvars magnetic field to the list. 
void StdFace_NotUsed_d(char *valname, double val)
Stop HPhi if a variable (real) not used is specified in the input file (!=NaN). 
double V0
Anisotropic Coulomb potential (1st), input parameter. 
double complex ** pump
[StdIntList::nt][StdIntList::npump] Coefficient of one-body term, malloc in StdFace_MallocInteraction...
void StdFace_Coulomb(struct StdIntList *StdI, double V, int isite, int jsite)
Add onsite/offsite Coulomb term to the list StdIntList::Cinter and StdIntList::CinterIndx, and increase the number of them (StdIntList::NCinter). 
void StdFace_InputSpin(struct StdIntList *StdI, double Jp[3][3], double JpAll, char *Jpname)
Input spin-spin interaction other than nearest-neighbor. 
void StdFace_SetLabel(struct StdIntList *StdI, FILE *fp, int iW, int iL, int diW, int diL, int isiteUC, int jsiteUC, int *isite, int *jsite, int connect, double complex *Cphase, double *dR)
Set Label in the gnuplot display (Only used in 2D system) 
int NEx
Number of exchange term, counted in each lattice file. 
char method[256]
The name of method, input from file. 
int ** intrindx
[StdIntList::nintr][8] Site/spin indices of two-body term, malloc in StdFace_MallocInteractions() and...
void StdFace_PrintVal_d(char *valname, double *val, double val0)
Print a valiable (real) read from the input file if it is not specified in the input file (=NaN)...
void StdFace_InputSpinNN(struct StdIntList *StdI, double J0[3][3], double J0All, char *J0name)
Input nearest-neighbor spin-spin interaction. 
int NCell
The number of the unit cell in the super-cell (determinant of StdIntList::box). Set in StdFace_InitSi...
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...
static void StdFace_FoldSite(struct StdIntList *StdI, int iCellV[3], int nBox[3], int iCellV_fold[3])
Move a site into the original supercell if it is outside the original supercell. 
double * PairHopp
[StdIntList::NPairLift] Coefficient of pair-hopping term, malloc in StdFace_MallocInteractions() and ...
void StdFace_NotUsed_c(char *valname, double complex val)
Stop HPhi if a variable (complex) not used is specified in the input file (!=NaN). 
void StdFace_PrintVal_c(char *valname, double complex *val, double complex val0)
Print a valiable (complex) read from the input file if it is not specified in the input file (=NaN)...
int nsite
Number of sites, set in the each lattice file. 
int ** transindx
[StdIntList::ntrans][4] Site/spin indices of one-body term, malloc in StdFace_MallocInteractions() an...
int Height
Number of sites along the 3rd axis, input parameter. 
Variables used in the Standard mode. These variables are passed as a pointer of the structure(StdIntL...
double * Cintra
[StdIntList::NCintra] Coefficient of intra-site Coulomb term, malloc in StdFace_MallocInteractions() ...
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). 
void StdFace_PrintXSF(struct StdIntList *StdI)
Print lattice.xsf (XCrysDen format) 
int nintr
Number of InterAll, counted in each lattice file. 
double h
Longitudinal magnetic field, input parameter. 
void StdFace_FindSite(struct StdIntList *StdI, int iW, int iL, int iH, int diW, int diL, int diH, int isiteUC, int jsiteUC, int *isite, int *jsite, double complex *Cphase, double *dR)
Find the index of transfer and interaction. 
int ** PHIndx
[StdIntList::NPairLift][2] Site indices of pair-hopping term, malloc in StdFace_MallocInteractions() ...
void StdFace_intr(struct StdIntList *StdI, double complex intr0, int site1, int spin1, int site2, int spin2, int site3, int spin3, int site4, int spin4)
Add interaction (InterAll) to the list Set StdIntList::intr and StdIntList::intrindx and increase the...
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() ...
double ** tau
Cell-internal site position in the fractional coordinate. Defined in the beginning of each lattice fu...
void StdFace_exit(int errorcode)
MPI Abortation wrapper. 
int ** CinterIndx
[StdIntList::NCinter][2] Site indices of inter-site Coulomb term, malloc in StdFace_MallocInteraction...