HΦ  3.2.0
StdFace_main.c File Reference

Read Input file and write files for Expert mode. Initialize variables. Check parameters. More...

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <math.h>
#include "StdFace_vals.h"
#include "StdFace_ModelUtil.h"
#include <complex.h>
+ Include dependency graph for StdFace_main.c:

Go to the source code of this file.

Functions

static void StdFace_LargeValue (struct StdIntList *StdI)
 Set Largevalue (StdIntList::LargeValue) for TPQ. Sum absolute-value of all one- and two- body terms. More...
 
static void PrintCalcMod (struct StdIntList *StdI)
 Print calcmod.def. More...
 
static void PrintExcitation (struct StdIntList *StdI)
 Print single.def or pair.def. More...
 
static void VectorPotential (struct StdIntList *StdI)
 
static void PrintPump (struct StdIntList *StdI)
 Print single.def or pair.def. More...
 
static void StdFace_ResetVals (struct StdIntList *StdI)
 Clear grobal variables in the standard mode All variables refered in this function is modified. More...
 
static void Text2Lower (char *value)
 
static void TrimSpaceQuote (char *value)
 Remove : space etc. from keyword and value in an iput file. More...
 
static void StoreWithCheckDup_s (char *keyword, char *valuestring, char *value)
 Store an input value into the valiable (string) If duplicated, HPhi will stop. More...
 
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. More...
 
static void StoreWithCheckDup_i (char *keyword, char *valuestring, int *value)
 Store an input value into the valiable (integer) If duplicated, HPhi will stop. More...
 
static void StoreWithCheckDup_d (char *keyword, char *valuestring, double *value)
 Store an input value into the valiable (double) If duplicated, HPhi will stop. More...
 
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. More...
 
static void PrintLocSpin (struct StdIntList *StdI)
 Print the locspin file. More...
 
static void PrintTrans (struct StdIntList *StdI)
 Print the transfer file. More...
 
static void PrintNamelist (struct StdIntList *StdI)
 Print namelist.def. More...
 
static void PrintModPara (struct StdIntList *StdI)
 Print modpara.def. More...
 
static void Print1Green (struct StdIntList *StdI)
 Print greenone.def. More...
 
static void Print2Green (struct StdIntList *StdI)
 Print greentwo.def. More...
 
static void UnsupportedSystem (char *model, char *lattice)
 Stop HPhi if unsupported model is read. More...
 
static void CheckOutputMode (struct StdIntList *StdI)
 Verify outputmode. More...
 
static void CheckModPara (struct StdIntList *StdI)
 Summary numerical parameter check the combination of the number of sites, total spin, the number of electrons. More...
 
static void PrintInteractions (struct StdIntList *StdI)
 Output .def file for Specific interaction. More...
 
void StdFace_main (char *fname)
 Main routine for the standard mode. More...
 

Detailed Description

Read Input file and write files for Expert mode. Initialize variables. Check parameters.

The following lattices are supported:

Definition in file StdFace_main.c.

Function Documentation

◆ CheckModPara()

static void CheckModPara ( struct StdIntList StdI)
static

Summary numerical parameter check the combination of the number of sites, total spin, the number of electrons.

Author
Mitsuaki Kawamura (The University of Tokyo)

Definition at line 1719 of file StdFace_main.c.

References StdIntList::AntiPeriod, StdIntList::exct, StdIntList::ExpecInterval, StdIntList::initial_iv, StdIntList::Lanczos_max, StdIntList::LanczosEps, StdIntList::LanczosTarget, StdIntList::LargeValue, StdIntList::lGC, StdIntList::model, StdIntList::NaN_i, StdIntList::nelec, StdIntList::Nomega, StdIntList::nsite, StdIntList::NumAve, StdIntList::OmegaIm, StdIntList::OmegaMax, StdIntList::OmegaMin, StdFace_NotUsed_i(), StdFace_PrintVal_d(), StdFace_PrintVal_i(), StdFace_RequiredVal_i(), and StdIntList::Sz2.

Referenced by StdFace_main().

1720 {
1721 
1722 
1723 #if defined(_HPhi)
1724  StdFace_PrintVal_i("Lanczos_max", &StdI->Lanczos_max, 2000);
1725  StdFace_PrintVal_i("initial_iv", &StdI->initial_iv, -1);
1726  /*StdFace_PrintVal_i("nvec", &StdI->nvec, 1);*/
1727  StdFace_PrintVal_i("exct", &StdI->exct, 1);
1728  StdFace_PrintVal_i("LanczosEps", &StdI->LanczosEps, 14);
1729  StdFace_PrintVal_i("LanczosTarget", &StdI->LanczosTarget, 2);
1730  if(StdI->LanczosTarget < StdI->exct) StdI->LanczosTarget = StdI->exct;
1731  StdFace_PrintVal_i("NumAve", &StdI->NumAve, 5);
1732  StdFace_PrintVal_i("ExpecInterval", &StdI->ExpecInterval, 20);
1733  StdFace_PrintVal_i("NOmega", &StdI->Nomega, 200);
1734  StdFace_PrintVal_d("OmegaMax", &StdI->OmegaMax, StdI->LargeValue*StdI->nsite);
1735  StdFace_PrintVal_d("OmegaMin", &StdI->OmegaMin, -StdI->LargeValue*StdI->nsite);
1736  StdFace_PrintVal_d("OmegaIm", &StdI->OmegaIm, 0.01* (int)StdI->LargeValue);
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);
1741  }
1742  else fprintf(stdout, " CParaFileHead = %-s\n", StdI->CParaFileHead);
1743 
1744  StdFace_PrintVal_i("NVMCCalMode", &StdI->NVMCCalMode, 0);
1745  StdFace_PrintVal_i("NLanczosMode", &StdI->NLanczosMode, 0);
1746  StdFace_PrintVal_i("NDataIdxStart", &StdI->NDataIdxStart, 1);
1747 
1748  if (StdI->NVMCCalMode == 0) StdFace_NotUsed_i("NDataQtySmp", StdI->NDataQtySmp);
1749  /*else*/StdFace_PrintVal_i("NDataQtySmp", &StdI->NDataQtySmp, 1);
1750 
1751  if (StdI->lGC == 0 && (StdI->Sz2 == 0 || StdI->Sz2 == StdI->NaN_i)) {
1752  StdFace_PrintVal_i("NSPGaussLeg", &StdI->NSPGaussLeg, 8);
1753  StdFace_PrintVal_i("NSPStot", &StdI->NSPStot, 0);
1754  }
1755  else {
1756  StdFace_NotUsed_i("NSPGaussLeg", StdI->NSPGaussLeg);
1757  StdFace_NotUsed_i("NSPStot", StdI->NSPStot);
1758  }
1759 
1760  if (StdI->AntiPeriod[0] == 1 || StdI->AntiPeriod[1] == 1 || StdI->AntiPeriod[2] == 2)
1761  StdFace_PrintVal_i("NMPTrans", &StdI->NMPTrans, -1);
1762  else StdFace_PrintVal_i("NMPTrans", &StdI->NMPTrans, 1);
1763 
1764  StdFace_PrintVal_i("NSROptItrStep", &StdI->NSROptItrStep, 1000);
1765 
1766  if (StdI->NVMCCalMode == 1) StdFace_NotUsed_i("NSROptItrSmp", StdI->NSROptItrSmp);
1767  /*else*/ StdFace_PrintVal_i("NSROptItrSmp", &StdI->NSROptItrSmp, StdI->NSROptItrStep/10);
1768 
1769  StdFace_PrintVal_i("NVMCWarmUp", &StdI->NVMCWarmUp, 10);
1770  StdFace_PrintVal_i("NVMCInterval", &StdI->NVMCInterval, 1);
1771  StdFace_PrintVal_i("NVMCSample", &StdI->NVMCSample, 1000);
1772 
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;
1778  }
1779  fprintf(stdout, " %15s = %-10d\n", "NExUpdatePath", StdI->NExUpdatePath);
1780 
1781  StdFace_PrintVal_i("RndSeed", &StdI->RndSeed, 123456789);
1782  StdFace_PrintVal_i("NSplitSize", &StdI->NSplitSize, 1);
1783  StdFace_PrintVal_i("NStore", &StdI->NStore, 1);
1784  StdFace_PrintVal_i("NSRCG", &StdI->NSRCG, 0);
1785 
1786  StdFace_PrintVal_d("DSROptRedCut", &StdI->DSROptRedCut, 0.001);
1787  StdFace_PrintVal_d("DSROptStaDel", &StdI->DSROptStaDel, 0.02);
1788  StdFace_PrintVal_d("DSROptStepDt", &StdI->DSROptStepDt, 0.02);
1789 #endif
1790  /*
1791  (Un)Conserved variables (Number of electrons, total Sz)
1792  */
1793  if (strcmp(StdI->model, "hubbard") == 0){
1794 #if defined(_HPhi)
1795  if (StdI->lGC == 0) StdFace_RequiredVal_i("nelec", StdI->nelec);
1796  else {
1797  StdFace_NotUsed_i("nelec", StdI->nelec);
1798  StdFace_NotUsed_i("2Sz", StdI->Sz2);
1799  }
1800 #else
1801  StdFace_RequiredVal_i("nelec", StdI->nelec);
1802  if (StdI->lGC == 0) StdFace_PrintVal_i("2Sz", &StdI->Sz2, 0);
1803  else StdFace_NotUsed_i("2Sz", StdI->Sz2);
1804 #endif
1805  }
1806  else if (strcmp(StdI->model, "spin") == 0) {
1807  StdFace_NotUsed_i("nelec", StdI->nelec);
1808 #if defined(_mVMC)
1809  StdI->nelec = 0;
1810 #endif
1811  if (StdI->lGC == 0) StdFace_RequiredVal_i("2Sz", StdI->Sz2);
1812  else StdFace_NotUsed_i("2Sz", StdI->Sz2);
1813  }/*else if (strcmp(StdI->model, "spin") == 0)*/
1814  else if (strcmp(StdI->model, "kondo") == 0) {
1815 #if defined(_HPhi)
1816  if (StdI->lGC == 0) StdFace_RequiredVal_i("nelec", StdI->nelec);
1817  else {
1818  StdFace_NotUsed_i("nelec", StdI->nelec);
1819  StdFace_NotUsed_i("2Sz", StdI->Sz2);
1820  }
1821 #else
1822  StdFace_RequiredVal_i("nelec", StdI->nelec);
1823  if (StdI->lGC == 0) StdFace_PrintVal_i("2Sz", &StdI->Sz2, 0);
1824  else StdFace_NotUsed_i("2Sz", StdI->Sz2);
1825 #endif
1826  }/*else if (strcmp(StdI->model, "kondo") == 0)*/
1827 }/*static void CheckModPara*/
double OmegaIm
Imaginary part of frequency.
Definition: StdFace_vals.h:290
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 initial_iv
the number for generating random number, input from file.
Definition: StdFace_vals.h:266
int NumAve
Number of trials for TPQ calculation.
Definition: StdFace_vals.h:271
int Nomega
Number of frequencies, input from file.
Definition: StdFace_vals.h:287
double OmegaMax
Maximum of frequency for spectrum, input from file.
Definition: StdFace_vals.h:288
char model[256]
Name of model, input parameter.
Definition: StdFace_vals.h:60
int AntiPeriod[3]
If corresponding StdIntList::phase = 180, it becomes 1.
Definition: StdFace_vals.h:156
int exct
The number of eigenvectors to be computed. input from file.
Definition: StdFace_vals.h:268
double OmegaMin
Minimum of frequency for spectrum, input from file.
Definition: StdFace_vals.h:289
int LanczosTarget
Which eigenvector is used for the convergence check.
Definition: StdFace_vals.h:270
int LanczosEps
Convergence threshold for the Lanczos method.
Definition: StdFace_vals.h:269
int Lanczos_max
The maxixmum number of iterations, input from file.
Definition: StdFace_vals.h:265
int lGC
Switch for computing Grandcanonical ensemble(== 1). Setted in StdFace_main() after all keywords are r...
Definition: StdFace_vals.h:233
double LargeValue
The shift parameter for the TPQ calculation.
Definition: StdFace_vals.h:274
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.
Definition: StdFace_vals.h:241
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...
int nsite
Number of sites, set in the each lattice file.
Definition: StdFace_vals.h:161
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).
int nelec
Number of electrons, input from file.
Definition: StdFace_vals.h:235
int NaN_i
It is used for initializing input parameter. This means that a parameter wich is not specified in inp...
Definition: StdFace_vals.h:28
int ExpecInterval
Interval for the iteration when the expectation value is computed.
Definition: StdFace_vals.h:272
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CheckOutputMode()

static void CheckOutputMode ( struct StdIntList StdI)
static

Verify outputmode.

Author
Mitsuaki Kawamura (The University of Tokyo)

Definition at line 1682 of file StdFace_main.c.

References StdIntList::ioutputmode, StdIntList::outputmode, and StdFace_exit().

Referenced by StdFace_main().

1683 {
1684  /*
1685  Form for Correlation function
1686  */
1687  if (strcmp(StdI->outputmode, "non") == 0
1688  || strcmp(StdI->outputmode, "none") == 0
1689  || strcmp(StdI->outputmode, "off") == 0) {
1690  StdI->ioutputmode = 0;
1691  fprintf(stdout, " ioutputmode = %-10d\n", StdI->ioutputmode);
1692  }
1693  else if (strcmp(StdI->outputmode, "cor") == 0
1694  || strcmp(StdI->outputmode, "corr") == 0
1695  || strcmp(StdI->outputmode, "correlation") == 0) {
1696  StdI->ioutputmode = 1;
1697  fprintf(stdout, " ioutputmode = %-10d\n", StdI->ioutputmode);
1698  }
1699  else if (strcmp(StdI->outputmode, "****") == 0) {
1700  StdI->ioutputmode = 1;
1701  fprintf(stdout, " ioutputmode = %-10d ###### DEFAULT VALUE IS USED ######\n", StdI->ioutputmode);
1702  }
1703  else if (strcmp(StdI->outputmode, "raw") == 0
1704  || strcmp(StdI->outputmode, "all") == 0
1705  || strcmp(StdI->outputmode, "full") == 0) {
1706  StdI->ioutputmode = 2;
1707  fprintf(stdout, " ioutputmode = %-10d\n", StdI->ioutputmode);
1708  }
1709  else{
1710  fprintf(stdout, "\n ERROR ! Unsupported OutPutMode : %s\n", StdI->outputmode);
1711  StdFace_exit(-1);
1712  }
1713 }/*static void CheckOutputMode*/
int ioutputmode
Switch associated to StdIntList::outputmode.
Definition: StdFace_vals.h:242
char outputmode[256]
Select amount of correlation function, input from file.
Definition: StdFace_vals.h:237
void StdFace_exit(int errorcode)
MPI Abortation wrapper.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Print1Green()

static void Print1Green ( struct StdIntList StdI)
static

Print greenone.def.

Author
Mitsuaki Kawamura (The University of Tokyo)

Definition at line 1381 of file StdFace_main.c.

References StdIntList::ioutputmode, StdIntList::locspinflag, StdIntList::model, StdIntList::nsite, and StdIntList::NsiteUC.

Referenced by StdFace_main().

1382 {
1383  FILE *fp;
1384  int ngreen, igreen, store, xkondo;
1385  int isite, jsite, ispin, jspin, SiMax, SjMax;
1386  int **greenindx;
1387  /*
1388  Set Indices of correlation functions
1389  */
1390  ngreen = 0;
1391  if (StdI->ioutputmode != 0) {
1392  for (store = 0; store < 2; store++) {
1393 
1394  if (store == 1) {
1395  greenindx = (int **)malloc(sizeof(int*) * (ngreen + 1));
1396  for (igreen = 0; igreen < ngreen; igreen++) {
1397  greenindx[igreen] = (int *)malloc(sizeof(int) * 4);
1398  }
1399  ngreen = 0;
1400  }/*if (store == 1)*/
1401 
1402  if (strcmp(StdI->model, "kondo") == 0) xkondo = 2;
1403  else xkondo = 1;
1404 
1405  if (StdI->ioutputmode == 1) {
1406  for (isite = 0; isite < StdI->NsiteUC*xkondo; isite++) {
1407 
1408  if (isite >= StdI->NsiteUC) isite += StdI->nsite / 2;
1409 
1410  if (StdI->locspinflag[isite] == 0) SiMax = 1;
1411  else SiMax = StdI->locspinflag[isite];
1412 
1413  for (ispin = 0; ispin <= SiMax; ispin++) {
1414  for (jsite = 0; jsite < StdI->nsite; jsite++) {
1415 
1416  if (StdI->locspinflag[jsite] == 0) SjMax = 1;
1417  else SjMax = StdI->locspinflag[jsite];
1418 
1419  for (jspin = 0; jspin <= SjMax; jspin++) {
1420 
1421  if (isite != jsite &&
1422  (StdI->locspinflag[isite] != 0 && StdI->locspinflag[jsite] != 0)) continue;
1423 
1424  if (ispin == jspin){
1425  if (store == 1) {
1426  greenindx[ngreen][0] = isite;
1427  greenindx[ngreen][1] = ispin;
1428  greenindx[ngreen][2] = jsite;
1429  greenindx[ngreen][3] = jspin;
1430  }
1431  ngreen++;
1432  }
1433 
1434  }/*for (jspin = 0; jspin <= SjMax; jspin++)*/
1435  }/*for (jsite = 0; jsite < StdI->nsite; jsite++)*/
1436  }/*for (ispin = 0; ispin <= SiMax; ispin++)*/
1437  }/*for (isite = 0; isite < StdI->nsite; isite++)*/
1438  }/*if (StdI->ioutputmode == 1)*/
1439  else {
1440  for (isite = 0; isite < StdI->nsite; isite++) {
1441 
1442  if (StdI->locspinflag[isite] == 0) SiMax = 1;
1443  else SiMax = StdI->locspinflag[isite];
1444 
1445  for (ispin = 0; ispin <= SiMax; ispin++) {
1446  for (jsite = 0; jsite < StdI->nsite; jsite++) {
1447 
1448  if (StdI->locspinflag[jsite] == 0) SjMax = 1;
1449  else SjMax = StdI->locspinflag[jsite];
1450 
1451  for (jspin = 0; jspin <= SjMax; jspin++) {
1452 
1453  if (isite != jsite &&
1454  (StdI->locspinflag[isite] != 0 && StdI->locspinflag[jsite] != 0)) continue;
1455 
1456  if (store == 1) {
1457  greenindx[ngreen][0] = isite;
1458  greenindx[ngreen][1] = ispin;
1459  greenindx[ngreen][2] = jsite;
1460  greenindx[ngreen][3] = jspin;
1461  }
1462  ngreen++;
1463 
1464  }/*for (jspin = 0; jspin <= SjMax; jspin++)*/
1465  }/*for (jsite = 0; jsite < StdI->nsite; jsite++)*/
1466  }/*for (ispin = 0; ispin <= SiMax; ispin++)*/
1467  }/*for (isite = 0; isite < StdI->nsite; isite++)*/
1468  }/*if (StdI->ioutputmode == 2)*/
1469  }/*if (StdI->ioutputmode != 0)*/
1470 
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]);
1480  }
1481  fflush(fp);
1482  fclose(fp);
1483 
1484  fprintf(stdout, " greenone.def is written.\n");
1485 
1486  for (igreen = 0; igreen < ngreen; igreen++) {
1487  free(greenindx[igreen]);
1488  }
1489  free(greenindx);
1490 
1491  }/*if (StdI->ioutputmode != 0) */
1492 }/*static void Print1Green*/
int ioutputmode
Switch associated to StdIntList::outputmode.
Definition: StdFace_vals.h:242
int NsiteUC
Number of sites in the unit cell. Defined in the beginning of each lattice function.
Definition: StdFace_vals.h:53
char model[256]
Name of model, input parameter.
Definition: StdFace_vals.h:60
int * locspinflag
[StdIntList::nsite] LocSpin in Expert mode, malloc and set in each lattice file.
Definition: StdFace_vals.h:162
int nsite
Number of sites, set in the each lattice file.
Definition: StdFace_vals.h:161
+ Here is the caller graph for this function:

◆ Print2Green()

static void Print2Green ( struct StdIntList StdI)
static

Print greentwo.def.

Author
Mitsuaki Kawamura (The University of Tokyo)

Definition at line 1497 of file StdFace_main.c.

References StdIntList::ioutputmode, StdIntList::locspinflag, StdIntList::model, StdIntList::nsite, and StdIntList::NsiteUC.

Referenced by StdFace_main().

1497  {
1498  FILE *fp;
1499  int ngreen, store, igreen, xkondo;
1500  int site1, site2, site3, site4;
1501  int spin1, spin2, spin3, spin4;
1502  int S1Max, S2Max, S3Max, S4Max;
1503  int **greenindx;
1504  /*
1505  Set Indices of correlation functions
1506  */
1507  ngreen = 0;
1508  if (StdI->ioutputmode == 1) {
1509  for (store = 0; store < 2; store++) {
1510 
1511  if (store == 1) {
1512  greenindx = (int **)malloc(sizeof(int*) * (ngreen + 1));
1513  for (igreen = 0; igreen < ngreen; igreen++)
1514  greenindx[igreen] = (int *)malloc(sizeof(int) * 8);
1515  ngreen = 0;
1516  }/*if (store == 1)*/
1517 
1518  if (strcmp(StdI->model, "kondo") == 0) xkondo = 2;
1519  else xkondo = 1;
1520 
1521  for (site1 = 0; site1 < StdI->NsiteUC*xkondo; site1++) {
1522 
1523  if (site1 >= StdI->NsiteUC) site1 += StdI->nsite / 2;
1524 
1525  if (StdI->locspinflag[site1] == 0) S1Max = 1;
1526  else S1Max = StdI->locspinflag[site1];
1527  for (spin1 = 0; spin1 <= S1Max; spin1++) {
1528  for (spin2 = 0; spin2 <= S1Max; spin2++) {
1529 
1530  for (site3 = 0; site3 < StdI->nsite; site3++) {
1531 
1532  if (StdI->locspinflag[site3] == 0) S3Max = 1;
1533  else S3Max = StdI->locspinflag[site3];
1534  for (spin3 = 0; spin3 <= S3Max; spin3++) {
1535  for (spin4 = 0; spin4 <= S3Max; spin4++) {
1536 
1537  if (spin1 - spin2 + spin3 - spin4 == 0) {
1538  if (store == 1) {
1539 #if defined(_mVMC)
1540  if (spin1 != spin2 || spin3 != spin4)
1541  {
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;
1550  }
1551  else
1552 #endif
1553  {
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;
1562  }
1563  }/*if (store == 1)*/
1564  ngreen++;
1565  }/*if (spin1 - spin2 + spin3 - spin4 == 0)*/
1566 
1567  }/*for (spin4 = 0; spin4 <= S3Max; spin4++)*/
1568  }/*for (spin3 = 0; spin3 <= S3Max; spin3++*/
1569  }/*for (site3 = 0; site3 < StdI->nsite; site3++)*/
1570  }/*for (spin2 = 0; spin2 <= S1Max; spin2++)*/
1571  }/*for (spin1 = 0; spin1 <= S1Max; spin1++)*/
1572  }/*for (site1 = 0; site1 < StdI->nsite; site1++)*/
1573 
1574  }/*for (store = 0; store < 2; store++)*/
1575  }/*if (StdI->ioutputmode == 1)*/
1576  else if (StdI->ioutputmode == 2) {
1577  for (store = 0; store < 2; store++) {
1578 
1579  if (store == 1) {
1580  greenindx = (int **)malloc(sizeof(int*) * (ngreen + 1));
1581  for (igreen = 0; igreen < ngreen; igreen++)
1582  greenindx[igreen] = (int *)malloc(sizeof(int) * 8);
1583  ngreen = 0;
1584  }/*if (store == 1)*/
1585 
1586  for (site1 = 0; site1 < StdI->nsite; site1++) {
1587 
1588  if (StdI->locspinflag[site1] == 0) S1Max = 1;
1589  else S1Max = StdI->locspinflag[site1];
1590  for (spin1 = 0; spin1 <= S1Max; spin1++) {
1591 
1592  for (site2 = 0; site2 < StdI->nsite; site2++) {
1593 
1594  if (StdI->locspinflag[site1] != 0 && StdI->locspinflag[site2] != 0
1595  && site1 != site2) continue;
1596 
1597  if (StdI->locspinflag[site2] == 0) S2Max = 1;
1598  else S2Max = StdI->locspinflag[site2];
1599  for (spin2 = 0; spin2 <= S2Max; spin2++) {
1600 
1601  for (site3 = 0; site3 < StdI->nsite; site3++) {
1602 
1603  if (StdI->locspinflag[site3] == 0) S3Max = 1;
1604  else S3Max = StdI->locspinflag[site3];
1605  for (spin3 = 0; spin3 <= S3Max; spin3++) {
1606 
1607  for (site4 = 0; site4 < StdI->nsite; site4++) {
1608 
1609  if (StdI->locspinflag[site3] != 0 && StdI->locspinflag[site4] != 0
1610  && site3 != site4) continue;
1611 
1612  if (StdI->locspinflag[site4] == 0) S4Max = 1;
1613  else S4Max = StdI->locspinflag[site4];
1614  for (spin4 = 0; spin4 <= S4Max; spin4++) {
1615 
1616  if (store == 1) {
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;
1625  }/*if (store == 1)*/
1626  ngreen++;
1627 
1628  }/*for (spin4 = 0; spin4 <= S4Max; spin4++)*/
1629  }/*for (site4 = 0; site4 < StdI->nsite; site4++)*/
1630  }/*for (spin3 = 0; spin3 <= S3Max; spin3++*/
1631  }/*for (site3 = 0; site3 < StdI->nsite; site3++)*/
1632  }/*for (spin2 = 0; spin2 <= S2Max; spin2++)*/
1633  }/*for (site2 = 0; site2 < StdI->nsite; site2++)*/
1634  }/*for (spin1 = 0; spin1 <= S1Max; spin1++)*/
1635  }/*for (site1 = 0; site1 < StdI->nsite; site1++)*/
1636 
1637  }/*for (store = 0; store < 2; store++)*/
1638  }/*if (StdI->ioutputmode == 2)*/
1639  if (StdI->ioutputmode != 0) {
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]);
1650  }
1651  fflush(fp);
1652  fclose(fp);
1653 
1654  fprintf(stdout, " greentwo.def is written.\n");
1655 
1656  for (igreen = 0; igreen < ngreen; igreen++) {
1657  free(greenindx[igreen]);
1658  }
1659  free(greenindx);
1660  }/*if (StdI->ioutputmode != 0)*/
1661 }/*static void Print2Green(struct StdIntList *StdI)*/
int ioutputmode
Switch associated to StdIntList::outputmode.
Definition: StdFace_vals.h:242
int NsiteUC
Number of sites in the unit cell. Defined in the beginning of each lattice function.
Definition: StdFace_vals.h:53
char model[256]
Name of model, input parameter.
Definition: StdFace_vals.h:60
int * locspinflag
[StdIntList::nsite] LocSpin in Expert mode, malloc and set in each lattice file.
Definition: StdFace_vals.h:162
int nsite
Number of sites, set in the each lattice file.
Definition: StdFace_vals.h:161
+ Here is the caller graph for this function:

◆ PrintCalcMod()

static void PrintCalcMod ( struct StdIntList StdI)
static

Print calcmod.def.

Author
Mitsuaki Kawamura (The University of Tokyo)

Definition at line 82 of file StdFace_main.c.

References StdIntList::CalcSpec, StdIntList::EigenVecIO, StdIntList::HamIO, StdIntList::InitialVecType, StdIntList::lGC, StdIntList::method, StdIntList::model, StdIntList::OutputExVec, StdIntList::PumpBody, StdIntList::Restart, and StdFace_exit().

Referenced by StdFace_main().

83 {
84  FILE *fp;
85  int iCalcType, iCalcModel, iRestart, iCalcSpec,
86  iCalcEigenvec, iInitialVecTpye, InputEigenVec, OutputEigenVec,
87  iInputHam, iOutputHam, iOutputExVec;
88  /*
89  First, check all parameters and exit if invalid parameters
90  */
91  fprintf(stdout, "\n @ CalcMod\n\n");
92  /*
93  Method
94  */
95  iCalcEigenvec = 0;
96  if (strcmp(StdI->method, "****") == 0){
97  fprintf(stdout, "ERROR ! Method is NOT specified !\n");
98  StdFace_exit(-1);
99  }
100  else if (strcmp(StdI->method, "lanczos") == 0) iCalcType = 0;
101  else if (strcmp(StdI->method, "lanczosenergy") == 0) {
102  iCalcType = 0;
103  iCalcEigenvec = 1;
104  }
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;
109  else{
110  fprintf(stdout, "\n ERROR ! Unsupported Solver : %s\n", StdI->method);
111  StdFace_exit(-1);
112  }/*if (strcmp(StdI->method, METHODS) != 0*/
113  if (iCalcType != 4) StdI->PumpBody = 0;
114  /*
115  Model
116  */
117  if (strcmp(StdI->model, "hubbard") == 0) {
118  if (StdI->lGC == 0)iCalcModel = 0;
119  else iCalcModel = 3;
120  }/*if (strcmp(StdI->model, "hubbard") == 0)*/
121  else if (strcmp(StdI->model, "spin") == 0) {
122  if (StdI->lGC == 0)iCalcModel = 1;
123  else iCalcModel = 4;
124  }/*if (strcmp(StdI->model, "spin") == 0)*/
125  else if (strcmp(StdI->model, "kondo") == 0) {
126  if (StdI->lGC == 0)iCalcModel = 2;
127  else iCalcModel = 5;
128  }/*if (strcmp(StdI->model, "kondo") == 0)*/
129  /*
130  Restart
131  */
132  if (strcmp(StdI->Restart, "****") == 0) {
133  strcpy(StdI->Restart, "none\0");
134  fprintf(stdout, " Restart = none ###### DEFAULT VALUE IS USED ######\n");
135  iRestart = 0;
136  }/*if (strcmp(StdI->Restart, "****") == 0)*/
137  else {
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;
145  else {
146  fprintf(stdout, "\n ERROR ! Restart Mode : %s\n", StdI->Restart);
147  StdFace_exit(-1);
148  }
149  }/*if (strcmp(StdI->Restart, "****") != 0)*/
150  /*
151  InitialVecType
152  */
153  if (strcmp(StdI->InitialVecType, "****") == 0) {
154  strcpy(StdI->InitialVecType, "c\0");
155  fprintf(stdout, " InitialVecType = c ###### DEFAULT VALUE IS USED ######\n");
156  iInitialVecTpye = 0;
157  }/*if (strcmp(StdI->InitialVecType, "****") == 0)*/
158  else {
159  fprintf(stdout, " InitialVecType = %s\n", StdI->InitialVecType);
160  if (strcmp(StdI->InitialVecType, "c") == 0) iInitialVecTpye = 0;
161  else if (strcmp(StdI->InitialVecType, "r") == 0) iInitialVecTpye = 1;
162  else {
163  fprintf(stdout, "\n ERROR ! Restart Mode : %s\n", StdI->Restart);
164  StdFace_exit(-1);
165  }
166  }/*if (strcmp(StdI->InitialVecType, "****") != 0)*/
167  /*
168  EigenVecIO
169  */
170  InputEigenVec = 0;
171  OutputEigenVec = 0;
172  if (strcmp(StdI->EigenVecIO, "****") == 0) {
173  strcpy(StdI->EigenVecIO, "none\0");
174  fprintf(stdout, " EigenVecIO = none ###### DEFAULT VALUE IS USED ######\n");
175  }/*if (strcmp(StdI->EigenVecIO, "****") == 0)*/
176  else {
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) {
182  InputEigenVec = 1;
183  OutputEigenVec = 1;
184  }/*if (strcmp(StdI->EigenVecIO, "inout") == 0)*/
185  else {
186  fprintf(stdout, "\n ERROR ! EigenVecIO Mode : %s\n", StdI->Restart);
187  StdFace_exit(-1);
188  }
189  }/*if (strcmp(StdI->EigenVecIO, "****") != 0)*/
190  if (strcmp(StdI->method, "timeevolution") == 0) InputEigenVec = 1;
191  /*
192  * HamIO
193  */
194  iOutputHam = 0;
195  iInputHam = 0;
196  if (strcmp(StdI->HamIO, "****") == 0) {
197  strcpy(StdI->HamIO, "none\0");
198  fprintf(stdout, " HamIO = none ###### DEFAULT VALUE IS USED ######\n");
199  }/*if (strcmp(StdI->HamIO, "****") == 0)*/
200  else {
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;
205  else {
206  fprintf(stdout, "\n ERROR ! HamIO mode : %s\n", StdI->HamIO);
207  StdFace_exit(-1);
208  }
209  }
210  /*
211  CalcSpec
212  */
213  if (strcmp(StdI->CalcSpec, "****") == 0) {
214  strcpy(StdI->CalcSpec, "none\0");
215  fprintf(stdout, " CalcSpec = none ###### DEFAULT VALUE IS USED ######\n");
216  iCalcSpec = 0;
217  }/*if (strcmp(StdI->CalcSpec, "****") == 0)*/
218  else {
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;
227  else {
228  fprintf(stdout, "\n ERROR ! CalcSpec : %s\n", StdI->CalcSpec);
229  StdFace_exit(-1);
230  }
231  }/*if (strcmp(StdI->CalcSpec, "****") != 0)*/
232  /*
233  OutputExcitedVec
234  */
235  iOutputExVec = 0;
236  if (strcmp(StdI->OutputExVec, "****") == 0) {
237  strcpy(StdI->OutputExVec, "none\0");
238  fprintf(stdout, " OutputExcitedVec = none ###### DEFAULT VALUE IS USED ######\n");
239  }/*if (strcmp(StdI->OutputExVec, "****") == 0)*/
240  else {
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;
244  else {
245  fprintf(stdout, "\n ERROR ! OutputExcitedVec : %s\n", StdI->OutputExVec);
246  StdFace_exit(-1);
247  }
248  }/*if (strcmp(StdI->OutputExVec, "****") != 0)*/
249 
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);
266  fflush(fp);
267  fclose(fp);
268  fprintf(stdout, " calcmod.def is written.\n\n");
269 }/*static void PrintCalcMod*/
char Restart[256]
The name of restart mode, input from file.
Definition: StdFace_vals.h:260
char CalcSpec[256]
The name of mode for spectrum, input from file.
Definition: StdFace_vals.h:285
char model[256]
Name of model, input parameter.
Definition: StdFace_vals.h:60
char OutputExVec[256]
The name of output mode for the excited vector, input from file.
Definition: StdFace_vals.h:294
char InitialVecType[256]
The name of initialguess-type, input from file.
Definition: StdFace_vals.h:261
int PumpBody
one- or two-body pumping, defined from StdIntList::PumpType
Definition: StdFace_vals.h:305
char EigenVecIO[256]
The name of I/O mode for eigenvector, input from file.
Definition: StdFace_vals.h:262
char HamIO[256]
The name of I/O mode for Hamiltonian, input from file.
Definition: StdFace_vals.h:263
char method[256]
The name of method, input from file.
Definition: StdFace_vals.h:259
int lGC
Switch for computing Grandcanonical ensemble(== 1). Setted in StdFace_main() after all keywords are r...
Definition: StdFace_vals.h:233
void StdFace_exit(int errorcode)
MPI Abortation wrapper.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ PrintExcitation()

static void PrintExcitation ( struct StdIntList StdI)
static

Print single.def or pair.def.

Author
Mitsuaki Kawamura (The University of Tokyo)

Definition at line 274 of file StdFace_main.c.

References StdIntList::Cell, StdIntList::model, StdIntList::NCell, StdIntList::nsite, StdIntList::NsiteUC, StdIntList::pi, StdIntList::S2, StdIntList::SpectrumBody, StdIntList::SpectrumQ, StdIntList::SpectrumType, StdFace_exit(), StdFace_PrintVal_d(), and StdIntList::tau.

Referenced by StdFace_main().

274  {
275  FILE *fp;
276  int NumOp, **spin, isite, ispin, icell, itau;
277  double *coef, pi, Cphase, S, Sz;
278  double *fourier_r, *fourier_i;
279 
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);
284  }
285  else {
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);
289  }
290 
291  fourier_r = (double *)malloc(sizeof(double) * StdI->nsite);
292  fourier_i = (double *)malloc(sizeof(double) * StdI->nsite);
293 
294  fprintf(stdout, "\n @ Spectrum\n\n");
295 
296  StdFace_PrintVal_d("SpectrumQW", &StdI->SpectrumQ[0], 0.0);
297  StdFace_PrintVal_d("SpectrumQL", &StdI->SpectrumQ[1], 0.0);
298  StdFace_PrintVal_d("SpectrumQH", &StdI->SpectrumQ[2], 0.0);
299 
300  if (strcmp(StdI->SpectrumType, "****") == 0) {
301  strcpy(StdI->SpectrumType, "szsz\0");
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;
307  coef[ispin] = Sz;
308  spin[ispin][0] = ispin;
309  spin[ispin][1] = ispin;
310  }
311  }
312  else {
313  NumOp = 2;
314  coef[0] = 0.5;
315  coef[1] = -0.5;
316  spin[0][0] = 0;
317  spin[0][1] = 0;
318  spin[1][0] = 1;
319  spin[1][1] = 1;
320  }
321  StdI->SpectrumBody = 2;
322  }
323  else {
324  fprintf(stdout, " SpectrumType = %s\n", StdI->SpectrumType);
325  if (strcmp(StdI->SpectrumType, "szsz") == 0) {
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;
330  coef[ispin] = Sz;
331  spin[ispin][0] = ispin;
332  spin[ispin][1] = ispin;
333  }
334  }
335  else {
336  NumOp = 2;
337  coef[0] = 0.5;
338  coef[1] = -0.5;
339  spin[0][0] = 0;
340  spin[0][1] = 0;
341  spin[1][0] = 1;
342  spin[1][1] = 1;
343  }
344  StdI->SpectrumBody = 2;
345  }
346  else if (strcmp(StdI->SpectrumType, "s+s-") == 0) {
347  if (strcmp(StdI->model, "spin") == 0 && StdI->S2 > 1) {
348  NumOp = StdI->S2;
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;
355  }
356  }
357  else {
358  NumOp = 1;
359  coef[0] = 1.0;
360  spin[0][0] = 0;
361  spin[0][1] = 1;
362  }
363  StdI->SpectrumBody = 2;
364  }
365  else if (strcmp(StdI->SpectrumType, "density") == 0) {
366  NumOp = 2;
367  coef[0] = 1,0;
368  coef[1] = 1.0;
369  spin[0][0] = 0;
370  spin[0][1] = 0;
371  spin[1][0] = 1;
372  spin[1][1] = 1;
373  StdI->SpectrumBody = 2;
374  }
375  else if (strcmp(StdI->SpectrumType, "up") == 0) {
376  NumOp = 1;
377  coef[0] = 1.0;
378  spin[0][0] = 0;
379  StdI->SpectrumBody = 1;
380  }
381  else if (strcmp(StdI->SpectrumType, "down") == 0) {
382  NumOp = 1;
383  coef[0] = 1.0;
384  spin[0][0] = 1;
385  StdI->SpectrumBody = 1;
386  }
387  else {
388  fprintf(stdout, "\n ERROR ! SpectrumType : %s\n", StdI->SpectrumType);
389  StdFace_exit(-1);
390  }
391  }
392 
393  isite = 0;
394  for (icell = 0; icell < StdI->NCell; icell++) {
395  for (itau = 0; itau < StdI->NsiteUC; itau++) {
396  Cphase = (StdI->Cell[icell][0] + StdI->tau[itau][0])*StdI->SpectrumQ[0]
397  + (StdI->Cell[icell][1] + StdI->tau[itau][1])*StdI->SpectrumQ[1]
398  + (StdI->Cell[icell][2] + StdI->tau[itau][2])*StdI->SpectrumQ[2];
399  fourier_r[isite] = cos(2.0*StdI->pi*Cphase);
400  fourier_i[isite] = sin(2.0*StdI->pi*Cphase);
401  isite += 1;
402  }
403  }
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];
408  }/*for (isite = 0; isite < StdI->nsite; isite++)*/
409  }/*if (strcmp(StdI->model, "kondo") == 0)*/
410 
411  if (StdI->SpectrumBody == 1) {
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);
416  }
417  else {
418  fprintf(fp, "NSingle %d\n", StdI->nsite * NumOp);
419  }
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]);
427  }/*for (isite = 0; isite < StdI->nsite; isite++)*/
428  }/*if (strcmp(StdI->model, "kondo") == 0)*/
429  else {
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]);
433  }/*for (isite = 0; isite < StdI->nsite; isite++)*/
434  }
435  fprintf(stdout, " single.def is written.\n\n");
436  }
437  else {
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]);
449  }
450  }
451  fprintf(stdout, " pair.def is written.\n\n");
452  }
453  fflush(fp);
454  fclose(fp);
455 
456  free(fourier_r);
457  free(fourier_i);
458  if (strcmp(StdI->model, "spin") == 0)
459  for (ispin = 0; ispin < StdI->S2 + 1; ispin++) free(spin[ispin]);
460  else
461  for (ispin = 0; ispin < 2; ispin++) free(spin[ispin]);
462  free(spin);
463  free(coef);
464 
465 }/*static void PrintExcitation()*/
char SpectrumType[256]
The type of mode for spectrum, input from file.
Definition: StdFace_vals.h:286
int S2
Total spin |S| of a local spin, input from file.
Definition: StdFace_vals.h:236
int NsiteUC
Number of sites in the unit cell. Defined in the beginning of each lattice function.
Definition: StdFace_vals.h:53
char model[256]
Name of model, input parameter.
Definition: StdFace_vals.h:60
int ** Cell
[StdIntList][3] The cell position in the fractional coordinate. Malloc and Set in StdFace_InitSite()...
Definition: StdFace_vals.h:51
double SpectrumQ[3]
wavenumver (q-vector) in fractional coordinate
Definition: StdFace_vals.h:291
double pi
Definition: StdFace_vals.h:31
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 NCell
The number of the unit cell in the super-cell (determinant of StdIntList::box). Set in StdFace_InitSi...
Definition: StdFace_vals.h:49
int nsite
Number of sites, set in the each lattice file.
Definition: StdFace_vals.h:161
int SpectrumBody
one- or two-body excitation, defined from StdIntList::SpectrumType
Definition: StdFace_vals.h:292
double ** tau
Cell-internal site position in the fractional coordinate. Defined in the beginning of each lattice fu...
Definition: StdFace_vals.h:55
void StdFace_exit(int errorcode)
MPI Abortation wrapper.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ PrintInteractions()

static void PrintInteractions ( struct StdIntList StdI)
static

Output .def file for Specific interaction.

Author
Mitsuaki Kawamura (The University of Tokyo)

Definition at line 1832 of file StdFace_main.c.

References StdIntList::Cinter, StdIntList::CinterIndx, StdIntList::Cintra, StdIntList::CintraIndx, StdIntList::Ex, StdIntList::ExIndx, StdIntList::Hund, StdIntList::HundIndx, StdIntList::intr, StdIntList::intrindx, StdIntList::lBoost, StdIntList::LCinter, StdIntList::LCintra, StdIntList::LEx, StdIntList::LHund, StdIntList::Lintr, StdIntList::LPairHopp, StdIntList::LPairLift, StdIntList::NCinter, StdIntList::NCintra, StdIntList::NEx, StdIntList::NHund, StdIntList::nintr, StdIntList::NPairHopp, StdIntList::NPairLift, StdIntList::PairHopp, StdIntList::PairLift, StdIntList::PHIndx, and StdIntList::PLIndx.

Referenced by StdFace_main().

1833 {
1834  FILE *fp;
1835  int nintr0, kintr, jintr;
1836  /*
1837  Coulomb INTRA
1838  */
1839  for (kintr = 0; kintr < StdI->NCintra; kintr++) {
1840  for (jintr = kintr + 1; jintr < StdI->NCintra; jintr++)
1841  if(StdI->CintraIndx[jintr][0] == StdI->CintraIndx[kintr][0])
1842  {
1843  StdI->Cintra[kintr] += StdI->Cintra[jintr];
1844  StdI->Cintra[jintr] = 0.0;
1845  }
1846  }
1847  nintr0 = 0;
1848  for (kintr = 0; kintr < StdI->NCintra; kintr++) {
1849  if (fabs(StdI->Cintra[kintr]) > 0.000001) nintr0 = nintr0 + 1;
1850  }
1851  if (nintr0 == 0 || StdI->lBoost == 1) StdI->LCintra = 0;
1852  else StdI->LCintra = 1;
1853 
1854  if (StdI->LCintra == 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",
1864  StdI->CintraIndx[kintr][0], StdI->Cintra[kintr]);
1865  }
1866  fflush(fp);
1867  fclose(fp);
1868  fprintf(stdout, " coulombintra.def is written.\n");
1869  }/*if (StdI->LCintra == 1)*/
1870  /*
1871  Coulomb INTER
1872  */
1873  for (kintr = 0; kintr < StdI->NCinter; kintr++) {
1874  for (jintr = kintr + 1; jintr < StdI->NCinter; jintr++)
1875  if (
1876  ( StdI->CinterIndx[jintr][0] == StdI->CinterIndx[kintr][0]
1877  && StdI->CinterIndx[jintr][1] == StdI->CinterIndx[kintr][1])
1878  ||
1879  ( StdI->CinterIndx[jintr][0] == StdI->CinterIndx[kintr][1]
1880  && StdI->CinterIndx[jintr][1] == StdI->CinterIndx[kintr][0])
1881  )
1882  {
1883  StdI->Cinter[kintr] += StdI->Cinter[jintr];
1884  StdI->Cinter[jintr] = 0.0;
1885  }
1886  }/*for (kintr = 0; kintr < StdI->NCinter; kintr++)*/
1887  nintr0 = 0;
1888  for (kintr = 0; kintr < StdI->NCinter; kintr++) {
1889  if (fabs(StdI->Cinter[kintr]) > 0.000001) nintr0 = nintr0 + 1;
1890  }
1891  if (nintr0 == 0 || StdI->lBoost == 1) StdI->LCinter = 0;
1892  else StdI->LCinter = 1;
1893 
1894  if (StdI->LCinter == 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",
1904  StdI->CinterIndx[kintr][0], StdI->CinterIndx[kintr][1], StdI->Cinter[kintr]);
1905  }
1906  fflush(fp);
1907  fclose(fp);
1908  fprintf(stdout, " coulombinter.def is written.\n");
1909  }/*if (StdI->LCinter == 1)*/
1910  /*
1911  Hund
1912  */
1913  for (kintr = 0; kintr < StdI->NHund; kintr++) {
1914  for (jintr = kintr + 1; jintr < StdI->NHund; jintr++)
1915  if (
1916  (StdI->HundIndx[jintr][0] == StdI->HundIndx[kintr][0]
1917  && StdI->HundIndx[jintr][1] == StdI->HundIndx[kintr][1])
1918  ||
1919  (StdI->HundIndx[jintr][0] == StdI->HundIndx[kintr][1]
1920  && StdI->HundIndx[jintr][1] == StdI->HundIndx[kintr][0])
1921  )
1922  {
1923  StdI->Hund[kintr] += StdI->Hund[jintr];
1924  StdI->Hund[jintr] = 0.0;
1925  }
1926  }/*for (kintr = 0; kintr < StdI->NHund; kintr++)*/
1927  nintr0 = 0;
1928  for (kintr = 0; kintr < StdI->NHund; kintr++) {
1929  if (fabs(StdI->Hund[kintr]) > 0.000001) nintr0 = nintr0 + 1;
1930  }
1931  if (nintr0 == 0 || StdI->lBoost == 1) StdI->LHund = 0;
1932  else StdI->LHund = 1;
1933 
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",
1944  StdI->HundIndx[kintr][0], StdI->HundIndx[kintr][1], StdI->Hund[kintr]);
1945  }
1946  fflush(fp);
1947  fclose(fp);
1948  fprintf(stdout, " hund.def is written.\n");
1949  }/*if (StdI->LHund == 1)*/
1950  /*
1951  Exchange
1952  */
1953  for (kintr = 0; kintr < StdI->NEx; kintr++) {
1954  for (jintr = kintr + 1; jintr < StdI->NEx; jintr++)
1955  if (
1956  (StdI->ExIndx[jintr][0] == StdI->ExIndx[kintr][0]
1957  && StdI->ExIndx[jintr][1] == StdI->ExIndx[kintr][1])
1958  ||
1959  (StdI->ExIndx[jintr][0] == StdI->ExIndx[kintr][1]
1960  && StdI->ExIndx[jintr][1] == StdI->ExIndx[kintr][0])
1961  )
1962  {
1963  StdI->Ex[kintr] += StdI->Ex[jintr];
1964  StdI->Ex[jintr] = 0.0;
1965  }
1966  }/*for (kintr = 0; kintr < StdI->NEx; kintr++)*/
1967  nintr0 = 0;
1968  for (kintr = 0; kintr < StdI->NEx; kintr++) {
1969  if (fabs(StdI->Ex[kintr]) > 0.000001) nintr0 = nintr0 + 1;
1970  }
1971  if (nintr0 == 0 || StdI->lBoost == 1) StdI->LEx = 0;
1972  else StdI->LEx = 1;
1973 
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]);
1985  }
1986  fflush(fp);
1987  fclose(fp);
1988  fprintf(stdout, " exchange.def is written.\n");
1989  }
1990  /*
1991  PairLift
1992  */
1993  for (kintr = 0; kintr < StdI->NPairLift; kintr++) {
1994  for (jintr = kintr + 1; jintr < StdI->NPairLift; jintr++)
1995  if (
1996  (StdI->PLIndx[jintr][0] == StdI->PLIndx[kintr][0]
1997  && StdI->PLIndx[jintr][1] == StdI->PLIndx[kintr][1])
1998  ||
1999  (StdI->PLIndx[jintr][0] == StdI->PLIndx[kintr][1]
2000  && StdI->PLIndx[jintr][1] == StdI->PLIndx[kintr][0])
2001  )
2002  {
2003  StdI->PairLift[kintr] += StdI->PairLift[jintr];
2004  StdI->PairLift[jintr] = 0.0;
2005  }
2006  }/*for (kintr = 0; kintr < StdI->NPairLift; kintr++)*/
2007  nintr0 = 0;
2008  for (kintr = 0; kintr < StdI->NPairLift; kintr++) {
2009  if (fabs(StdI->PairLift[kintr]) > 0.000001) nintr0 = nintr0 + 1;
2010  }
2011  if (nintr0 == 0 || StdI->lBoost == 1) StdI->LPairLift = 0;
2012  else StdI->LPairLift = 1;
2013 
2014  if (StdI->LPairLift == 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",
2024  StdI->PLIndx[kintr][0], StdI->PLIndx[kintr][1], StdI->PairLift[kintr]);
2025  }
2026  fflush(fp);
2027  fclose(fp);
2028  fprintf(stdout, " pairlift.def is written.\n");
2029  }
2030  /*
2031  PairHopp
2032  */
2033  for (kintr = 0; kintr < StdI->NPairHopp; kintr++) {
2034  for (jintr = kintr + 1; jintr < StdI->NPairHopp; jintr++)
2035  if (
2036  (StdI->PHIndx[jintr][0] == StdI->PHIndx[kintr][0]
2037  && StdI->PHIndx[jintr][1] == StdI->PHIndx[kintr][1])
2038  ||
2039  (StdI->PHIndx[jintr][0] == StdI->PHIndx[kintr][1]
2040  && StdI->PHIndx[jintr][1] == StdI->PHIndx[kintr][0])
2041  )
2042  {
2043  StdI->PairHopp[kintr] += StdI->PairHopp[jintr];
2044  StdI->PairHopp[jintr] = 0.0;
2045  }
2046  }/*for (kintr = 0; kintr < StdI->NPairHopp; kintr++)*/
2047  nintr0 = 0;
2048  for (kintr = 0; kintr < StdI->NPairHopp; kintr++) {
2049  if (fabs(StdI->PairHopp[kintr]) > 0.000001) nintr0 = nintr0 + 1;
2050  }
2051  if (nintr0 == 0 || StdI->lBoost == 1) StdI->LPairHopp = 0;
2052  else StdI->LPairHopp = 1;
2053 
2054  if (StdI->LPairHopp == 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",
2064  StdI->PHIndx[kintr][0], StdI->PHIndx[kintr][1], StdI->PairHopp[kintr]);
2065  }
2066  fflush(fp);
2067  fclose(fp);
2068  fprintf(stdout, " pairhopp.def is written.\n");
2069  }
2070  /*
2071  InterAll
2072  */
2073  for (jintr = 0; jintr < StdI->nintr; jintr++) {
2074  for (kintr = jintr + 1; kintr < StdI->nintr; kintr++) {
2075  if (
2076  (StdI->intrindx[jintr][0] == StdI->intrindx[kintr][0]
2077  && StdI->intrindx[jintr][1] == StdI->intrindx[kintr][1]
2078  && StdI->intrindx[jintr][2] == StdI->intrindx[kintr][2]
2079  && StdI->intrindx[jintr][3] == StdI->intrindx[kintr][3]
2080  && StdI->intrindx[jintr][4] == StdI->intrindx[kintr][4]
2081  && StdI->intrindx[jintr][5] == StdI->intrindx[kintr][5]
2082  && StdI->intrindx[jintr][6] == StdI->intrindx[kintr][6]
2083  && StdI->intrindx[jintr][7] == StdI->intrindx[kintr][7])
2084  ||
2085  (StdI->intrindx[jintr][0] == StdI->intrindx[kintr][4]
2086  && StdI->intrindx[jintr][1] == StdI->intrindx[kintr][5]
2087  && StdI->intrindx[jintr][2] == StdI->intrindx[kintr][6]
2088  && StdI->intrindx[jintr][3] == StdI->intrindx[kintr][7]
2089  && StdI->intrindx[jintr][4] == StdI->intrindx[kintr][0]
2090  && StdI->intrindx[jintr][5] == StdI->intrindx[kintr][1]
2091  && StdI->intrindx[jintr][6] == StdI->intrindx[kintr][2]
2092  && StdI->intrindx[jintr][7] == StdI->intrindx[kintr][3])
2093  ) {
2094  StdI->intr[jintr] = StdI->intr[jintr] + StdI->intr[kintr];
2095  StdI->intr[kintr] = 0.0;
2096  }
2097  else if (
2098  (StdI->intrindx[jintr][0] == StdI->intrindx[kintr][4]
2099  && StdI->intrindx[jintr][1] == StdI->intrindx[kintr][5]
2100  && StdI->intrindx[jintr][2] == StdI->intrindx[kintr][2]
2101  && StdI->intrindx[jintr][3] == StdI->intrindx[kintr][3]
2102  && StdI->intrindx[jintr][4] == StdI->intrindx[kintr][0]
2103  && StdI->intrindx[jintr][5] == StdI->intrindx[kintr][1]
2104  && StdI->intrindx[jintr][6] == StdI->intrindx[kintr][6]
2105  && StdI->intrindx[jintr][7] == StdI->intrindx[kintr][7])
2106  ||
2107  (StdI->intrindx[jintr][0] == StdI->intrindx[kintr][0]
2108  && StdI->intrindx[jintr][1] == StdI->intrindx[kintr][1]
2109  && StdI->intrindx[jintr][2] == StdI->intrindx[kintr][6]
2110  && StdI->intrindx[jintr][3] == StdI->intrindx[kintr][7]
2111  && StdI->intrindx[jintr][4] == StdI->intrindx[kintr][4]
2112  && StdI->intrindx[jintr][5] == StdI->intrindx[kintr][5]
2113  && StdI->intrindx[jintr][6] == StdI->intrindx[kintr][2]
2114  && StdI->intrindx[jintr][7] == StdI->intrindx[kintr][3])
2115  ) {
2116  StdI->intr[jintr] = StdI->intr[jintr] - StdI->intr[kintr];
2117  StdI->intr[kintr] = 0.0;
2118  }
2119  }/*for (kintr = jintr + 1; kintr < StdI->nintr; kintr++)*/
2120  }/*for (jintr = 0; jintr < StdI->nintr; jintr++)*/
2121 
2122  for (jintr = 0; jintr < StdI->nintr; jintr++) {
2123  for (kintr = jintr + 1; kintr < StdI->nintr; kintr++) {
2124  if (StdI->intrindx[jintr][6] == StdI->intrindx[kintr][4]
2125  && StdI->intrindx[jintr][7] == StdI->intrindx[kintr][5]
2126  && StdI->intrindx[jintr][4] == StdI->intrindx[kintr][6]
2127  && StdI->intrindx[jintr][5] == StdI->intrindx[kintr][7]
2128  && StdI->intrindx[jintr][2] == StdI->intrindx[kintr][0]
2129  && StdI->intrindx[jintr][3] == StdI->intrindx[kintr][1]
2130  && StdI->intrindx[jintr][0] == StdI->intrindx[kintr][2]
2131  && StdI->intrindx[jintr][1] == StdI->intrindx[kintr][3]
2132  ) {
2133  StdI->intrindx[kintr][0] = StdI->intrindx[jintr][6];
2134  StdI->intrindx[kintr][1] = StdI->intrindx[jintr][7];
2135  StdI->intrindx[kintr][2] = StdI->intrindx[jintr][4];
2136  StdI->intrindx[kintr][3] = StdI->intrindx[jintr][5];
2137  StdI->intrindx[kintr][4] = StdI->intrindx[jintr][2];
2138  StdI->intrindx[kintr][5] = StdI->intrindx[jintr][3];
2139  StdI->intrindx[kintr][6] = StdI->intrindx[jintr][0];
2140  StdI->intrindx[kintr][7] = StdI->intrindx[jintr][1];
2141  }
2142  else if (
2143  (StdI->intrindx[jintr][6] == StdI->intrindx[kintr][4]
2144  && StdI->intrindx[jintr][7] == StdI->intrindx[kintr][5]
2145  && StdI->intrindx[jintr][4] == StdI->intrindx[kintr][2]
2146  && StdI->intrindx[jintr][5] == StdI->intrindx[kintr][3]
2147  && StdI->intrindx[jintr][2] == StdI->intrindx[kintr][0]
2148  && StdI->intrindx[jintr][3] == StdI->intrindx[kintr][1]
2149  && StdI->intrindx[jintr][0] == StdI->intrindx[kintr][6]
2150  && StdI->intrindx[jintr][1] == StdI->intrindx[kintr][7])
2151  ||
2152  (StdI->intrindx[jintr][6] == StdI->intrindx[kintr][0]
2153  && StdI->intrindx[jintr][7] == StdI->intrindx[kintr][1]
2154  && StdI->intrindx[jintr][4] == StdI->intrindx[kintr][6]
2155  && StdI->intrindx[jintr][5] == StdI->intrindx[kintr][7]
2156  && StdI->intrindx[jintr][2] == StdI->intrindx[kintr][4]
2157  && StdI->intrindx[jintr][3] == StdI->intrindx[kintr][5]
2158  && StdI->intrindx[jintr][0] == StdI->intrindx[kintr][2]
2159  && StdI->intrindx[jintr][1] == StdI->intrindx[kintr][3])
2160  ) {
2161  StdI->intrindx[kintr][0] = StdI->intrindx[jintr][6];
2162  StdI->intrindx[kintr][1] = StdI->intrindx[jintr][7];
2163  StdI->intrindx[kintr][2] = StdI->intrindx[jintr][4];
2164  StdI->intrindx[kintr][3] = StdI->intrindx[jintr][5];
2165  StdI->intrindx[kintr][4] = StdI->intrindx[jintr][2];
2166  StdI->intrindx[kintr][5] = StdI->intrindx[jintr][3];
2167  StdI->intrindx[kintr][6] = StdI->intrindx[jintr][0];
2168  StdI->intrindx[kintr][7] = StdI->intrindx[jintr][1];
2169 
2170  StdI->intr[kintr] = -StdI->intr[kintr];
2171  }
2172  }/*for (kintr = jintr + 1; kintr < StdI->nintr; kintr++)*/
2173  }/*for (jintr = 0; jintr < StdI->nintr; jintr++)*/
2174 
2175  for (jintr = 0; jintr < StdI->nintr; jintr++) {
2176 
2177  if (
2178  (StdI->intrindx[jintr][0] == StdI->intrindx[jintr][4]
2179  && StdI->intrindx[jintr][1] == StdI->intrindx[jintr][5]) ||
2180  (StdI->intrindx[jintr][2] == StdI->intrindx[jintr][6]
2181  && StdI->intrindx[jintr][3] == StdI->intrindx[jintr][7])
2182  ) {
2183 
2184  if (!(
2185  (StdI->intrindx[jintr][0] == StdI->intrindx[jintr][2]
2186  && StdI->intrindx[jintr][1] == StdI->intrindx[jintr][3])
2187  ||
2188  (StdI->intrindx[jintr][0] == StdI->intrindx[jintr][6]
2189  && StdI->intrindx[jintr][1] == StdI->intrindx[jintr][7])
2190  ||
2191  (StdI->intrindx[jintr][4] == StdI->intrindx[jintr][2]
2192  && StdI->intrindx[jintr][5] == StdI->intrindx[jintr][3])
2193  ||
2194  (StdI->intrindx[jintr][4] == StdI->intrindx[jintr][6]
2195  && StdI->intrindx[jintr][5] == StdI->intrindx[jintr][7])
2196  ))
2197  StdI->intr[jintr] = 0.0;
2198  }
2199  }/*for (jintr = 0; jintr < StdI->nintr; jintr++)*/
2200 
2201  nintr0 = 0;
2202  for (kintr = 0; kintr < StdI->nintr; kintr++) {
2203  if (cabs(StdI->intr[kintr]) > 0.000001) nintr0 = nintr0 + 1;
2204  }
2205  if (nintr0 == 0 || StdI->lBoost == 1) StdI->Lintr = 0;
2206  else StdI->Lintr = 1;
2207 
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");
2215 
2216  if (StdI->lBoost == 0) {
2217  nintr0 = 0;
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",
2221  StdI->intrindx[kintr][0], StdI->intrindx[kintr][1],
2222  StdI->intrindx[kintr][2], StdI->intrindx[kintr][3],
2223  StdI->intrindx[kintr][4], StdI->intrindx[kintr][5],
2224  StdI->intrindx[kintr][6], StdI->intrindx[kintr][7],
2225  creal(StdI->intr[kintr]), cimag(StdI->intr[kintr]));
2226  }/*for (kintr = 0; kintr < StdI->nintr; kintr++)*/
2227  }/* if (StdI->lBoost == 0)*/
2228 
2229  fflush(fp);
2230  fclose(fp);
2231  fprintf(stdout, " interall.def is written.\n");
2232  }
2233 }/*static void PrintInteractions*/
int NPairHopp
Number of pair-hopping term, counted in each lattice file.
Definition: StdFace_vals.h:221
int LEx
Print exchange.def or not, set in PrintInteractions().
Definition: StdFace_vals.h:206
int NHund
Number of Hund term, counted in each lattice file.
Definition: StdFace_vals.h:197
double complex * intr
[StdIntList::nintr] Coefficient of general two-body term, malloc in StdFace_MallocInteractions() and ...
Definition: StdFace_vals.h:176
int LCinter
Print coulombinter.def or not, set in PrintInteractions().
Definition: StdFace_vals.h:190
double * Ex
[StdIntList::NEx] Coefficient of exchange term, malloc in StdFace_MallocInteractions() and set in Std...
Definition: StdFace_vals.h:210
int LCintra
Print coulombintra.def or not, set in PrintInteractions().
Definition: StdFace_vals.h:181
int ** PLIndx
[StdIntList::NPairLift][2] Site indices of pair-lift term, malloc in StdFace_MallocInteractions() and...
Definition: StdFace_vals.h:215
int ** ExIndx
[StdIntList::NEx][2] Site indices of exchange term, malloc in StdFace_MallocInteractions() and set in...
Definition: StdFace_vals.h:207
int ** CintraIndx
[StdIntList::NCintra][1] Site indices of intra-site Coulomb term, malloc in StdFace_MallocInteraction...
Definition: StdFace_vals.h:182
int NCinter
Number of inter-site Coulomb interaction, counted in each lattice file.
Definition: StdFace_vals.h:188
int NCintra
Number of intra-site Coulomb interaction, counted in each lattice file.
Definition: StdFace_vals.h:179
int LPairLift
Print pairlift.def or not, set in PrintInteractions().
Definition: StdFace_vals.h:214
int Lintr
Print interall.def or not, set in PrintInteractions().
Definition: StdFace_vals.h:172
double * Hund
[StdIntList::NHund] Coefficient of Hund term, malloc in StdFace_MallocInteractions() and set in StdFa...
Definition: StdFace_vals.h:202
double * PairLift
[StdIntList::NPairLift] Coefficient of pair-lift term, malloc in StdFace_MallocInteractions() and set...
Definition: StdFace_vals.h:218
int NPairLift
Number of pair-lift term, counted in each lattice file.
Definition: StdFace_vals.h:213
int ** HundIndx
[StdIntList::NHund][2] Site indices of Hund term, malloc in StdFace_MallocInteractions() and set in S...
Definition: StdFace_vals.h:199
int LHund
Print hund.def or not, set in PrintInteractions().
Definition: StdFace_vals.h:198
int NEx
Number of exchange term, counted in each lattice file.
Definition: StdFace_vals.h:205
int ** intrindx
[StdIntList::nintr][8] Site/spin indices of two-body term, malloc in StdFace_MallocInteractions() and...
Definition: StdFace_vals.h:173
double * PairHopp
[StdIntList::NPairLift] Coefficient of pair-hopping term, malloc in StdFace_MallocInteractions() and ...
Definition: StdFace_vals.h:226
double * Cintra
[StdIntList::NCintra] Coefficient of intra-site Coulomb term, malloc in StdFace_MallocInteractions() ...
Definition: StdFace_vals.h:185
int nintr
Number of InterAll, counted in each lattice file.
Definition: StdFace_vals.h:171
int ** PHIndx
[StdIntList::NPairLift][2] Site indices of pair-hopping term, malloc in StdFace_MallocInteractions() ...
Definition: StdFace_vals.h:223
double * Cinter
[StdIntList::NCinter] Coefficient of inter-site Coulomb term, malloc in StdFace_MallocInteractions() ...
Definition: StdFace_vals.h:194
int LPairHopp
Print pairhopp.def or not, set in PrintInteractions().
Definition: StdFace_vals.h:222
int ** CinterIndx
[StdIntList::NCinter][2] Site indices of inter-site Coulomb term, malloc in StdFace_MallocInteraction...
Definition: StdFace_vals.h:191
+ Here is the caller graph for this function:

◆ PrintLocSpin()

static void PrintLocSpin ( struct StdIntList StdI)
static

Print the locspin file.

Author
Mitsuaki Kawamura (The University of Tokyo)

Definition at line 1185 of file StdFace_main.c.

References StdIntList::locspinflag, and StdIntList::nsite.

Referenced by StdFace_main().

1185  {
1186  FILE *fp;
1187  int isite, nlocspin;
1188 
1189  nlocspin = 0;
1190  for (isite = 0; isite < StdI->nsite; isite++)
1191  if (StdI->locspinflag[isite] != 0) nlocspin = nlocspin + 1;
1192 
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");
1199 
1200  for (isite = 0; isite < StdI->nsite; isite++)
1201  fprintf(fp, "%5d %5d\n", isite, StdI->locspinflag[isite]);
1202 
1203  fflush(fp);
1204  fclose(fp);
1205  fprintf(stdout, " locspn.def is written.\n");
1206 }/*static void PrintLocSpin*/
int * locspinflag
[StdIntList::nsite] LocSpin in Expert mode, malloc and set in each lattice file.
Definition: StdFace_vals.h:162
int nsite
Number of sites, set in the each lattice file.
Definition: StdFace_vals.h:161
+ Here is the caller graph for this function:

◆ PrintModPara()

static void PrintModPara ( struct StdIntList StdI)
static

Print modpara.def.

Author
Mitsuaki Kawamura (The University of Tokyo)

Definition at line 1305 of file StdFace_main.c.

References StdIntList::CDataFileHead, StdIntList::exct, StdIntList::ExpandCoef, StdIntList::ExpecInterval, StdIntList::initial_iv, StdIntList::Lanczos_max, StdIntList::LanczosEps, StdIntList::LanczosTarget, StdIntList::LargeValue, StdIntList::method, StdIntList::NaN_i, StdIntList::nelec, StdIntList::Nomega, StdIntList::nsite, StdIntList::NumAve, StdIntList::nvec, StdIntList::OmegaIm, StdIntList::OmegaMax, StdIntList::OmegaMin, and StdIntList::Sz2.

Referenced by StdFace_main().

1306 {
1307  FILE *fp;
1308 
1309  fp = fopen("modpara.def", "w");
1310  fprintf(fp, "--------------------\n");
1311  fprintf(fp, "Model_Parameters 0\n");
1312  fprintf(fp, "--------------------\n");
1313 #if defined(_HPhi)
1314  fprintf(fp, "HPhi_Cal_Parameters\n");
1315  fprintf(fp, "--------------------\n");
1316  fprintf(fp, "CDataFileHead %s\n", StdI->CDataFileHead);
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);
1327  fprintf(fp, "LanczosTarget %-5d\n", StdI->LanczosTarget);
1328  fprintf(fp, "LargeValue %-25.15e\n", StdI->LargeValue);
1329  fprintf(fp, "NumAve %-5d\n", StdI->NumAve);
1330  fprintf(fp, "ExpecInterval %-5d\n", StdI->ExpecInterval);
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");
1340  fprintf(fp, "CDataFileHead %s\n", StdI->CDataFileHead);
1341  fprintf(fp, "CParaFileHead %s\n", StdI->CParaFileHead);
1342  fprintf(fp, "--------------------\n");
1343  fprintf(fp, "NVMCCalMode %d\n", StdI->NVMCCalMode);
1344  /*fprintf(fp, "NLanczosMode %d\n", StdI->NLanczosMode);*/
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);
1351  if (StdI->Sz2 != StdI->NaN_i)
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);
1371 #endif
1372 
1373  fflush(fp);
1374  fclose(fp);
1375  fprintf(stdout, " modpara.def is written.\n");
1376 }/*static void PrintModPara*/
double OmegaIm
Imaginary part of frequency.
Definition: StdFace_vals.h:290
int ExpandCoef
The number of Hamiltonian-vector operation for the time-evolution.
Definition: StdFace_vals.h:315
int initial_iv
the number for generating random number, input from file.
Definition: StdFace_vals.h:266
int NumAve
Number of trials for TPQ calculation.
Definition: StdFace_vals.h:271
int Nomega
Number of frequencies, input from file.
Definition: StdFace_vals.h:287
double OmegaMax
Maximum of frequency for spectrum, input from file.
Definition: StdFace_vals.h:288
int exct
The number of eigenvectors to be computed. input from file.
Definition: StdFace_vals.h:268
double OmegaMin
Minimum of frequency for spectrum, input from file.
Definition: StdFace_vals.h:289
int LanczosTarget
Which eigenvector is used for the convergence check.
Definition: StdFace_vals.h:270
int LanczosEps
Convergence threshold for the Lanczos method.
Definition: StdFace_vals.h:269
int Lanczos_max
The maxixmum number of iterations, input from file.
Definition: StdFace_vals.h:265
char method[256]
The name of method, input from file.
Definition: StdFace_vals.h:259
double LargeValue
The shift parameter for the TPQ calculation.
Definition: StdFace_vals.h:274
int Sz2
Total Sz, input from file.
Definition: StdFace_vals.h:241
int nsite
Number of sites, set in the each lattice file.
Definition: StdFace_vals.h:161
int nelec
Number of electrons, input from file.
Definition: StdFace_vals.h:235
int NaN_i
It is used for initializing input parameter. This means that a parameter wich is not specified in inp...
Definition: StdFace_vals.h:28
int ExpecInterval
Interval for the iteration when the expectation value is computed.
Definition: StdFace_vals.h:272
char CDataFileHead[256]
Header of the output files. Input from file.
Definition: StdFace_vals.h:239
+ Here is the caller graph for this function:

◆ PrintNamelist()

static void PrintNamelist ( struct StdIntList StdI)
static

Print namelist.def.

Author
Mitsuaki Kawamura (The University of Tokyo)

Definition at line 1256 of file StdFace_main.c.

References StdIntList::CDataFileHead, StdIntList::ioutputmode, StdIntList::lBoost, StdIntList::LCinter, StdIntList::LCintra, StdIntList::LEx, StdIntList::lGC, StdIntList::LHund, StdIntList::Lintr, StdIntList::LPairHopp, StdIntList::LPairLift, StdIntList::method, StdIntList::NaN_i, StdIntList::PumpBody, StdIntList::SpectrumBody, and StdIntList::Sz2.

Referenced by StdFace_main().

1256  {
1257  FILE *fp;
1258 
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");
1270  if (StdI->ioutputmode != 0) {
1271  fprintf( fp, " OneBodyG greenone.def\n");
1272  fprintf( fp, " TwoBodyG greentwo.def\n");
1273  }
1274 #if defined(_HPhi)
1275  fprintf( fp, " CalcMod calcmod.def\n");
1276  if(StdI->SpectrumBody == 1)
1277  fprintf( fp, "SingleExcitation single.def\n");
1278  else fprintf( fp, " PairExcitation pair.def\n");
1279  if (strcmp(StdI->method, "timeevolution") == 0) {
1280  if (StdI->PumpBody == 1)
1281  fprintf(fp, " TEOneBody teone.def\n");
1282  else if (StdI->PumpBody == 2)
1283  fprintf(fp, " TETwoBody tetwo.def\n");
1284  }/*if (strcmp(StdI->method, "timeevolution") == 0)*/
1285  fprintf( fp, " SpectrumVec %s_eigenvec_0\n",
1286  StdI->CDataFileHead);
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");
1295 #endif
1296 
1297  fflush(fp);
1298  fclose(fp);
1299  fprintf(stdout, " namelist.def is written.\n");
1300 }/*static void PrintNamelist*/
int LEx
Print exchange.def or not, set in PrintInteractions().
Definition: StdFace_vals.h:206
int LCinter
Print coulombinter.def or not, set in PrintInteractions().
Definition: StdFace_vals.h:190
int LCintra
Print coulombintra.def or not, set in PrintInteractions().
Definition: StdFace_vals.h:181
int ioutputmode
Switch associated to StdIntList::outputmode.
Definition: StdFace_vals.h:242
int LPairLift
Print pairlift.def or not, set in PrintInteractions().
Definition: StdFace_vals.h:214
int Lintr
Print interall.def or not, set in PrintInteractions().
Definition: StdFace_vals.h:172
int PumpBody
one- or two-body pumping, defined from StdIntList::PumpType
Definition: StdFace_vals.h:305
int LHund
Print hund.def or not, set in PrintInteractions().
Definition: StdFace_vals.h:198
char method[256]
The name of method, input from file.
Definition: StdFace_vals.h:259
int lGC
Switch for computing Grandcanonical ensemble(== 1). Setted in StdFace_main() after all keywords are r...
Definition: StdFace_vals.h:233
int Sz2
Total Sz, input from file.
Definition: StdFace_vals.h:241
int SpectrumBody
one- or two-body excitation, defined from StdIntList::SpectrumType
Definition: StdFace_vals.h:292
int NaN_i
It is used for initializing input parameter. This means that a parameter wich is not specified in inp...
Definition: StdFace_vals.h:28
char CDataFileHead[256]
Header of the output files. Input from file.
Definition: StdFace_vals.h:239
int LPairHopp
Print pairhopp.def or not, set in PrintInteractions().
Definition: StdFace_vals.h:222
+ Here is the caller graph for this function:

◆ PrintPump()

static void PrintPump ( struct StdIntList StdI)
static

Print single.def or pair.def.

Author
Mitsuaki Kawamura (The University of Tokyo)

Definition at line 566 of file StdFace_main.c.

References StdIntList::AntiPeriod, StdIntList::dt, StdIntList::Lanczos_max, StdIntList::locspinflag, StdIntList::model, StdIntList::NaN_i, StdIntList::NCell, StdIntList::npump, StdIntList::nsite, StdIntList::NsiteUC, StdIntList::pump, StdIntList::PumpBody, StdIntList::pumpindx, and StdIntList::Uquench.

Referenced by StdFace_main().

566  {
567  FILE *fp;
568  int it, ii, isite, ipump, jpump, npump0;
569 
570  if (StdI->PumpBody == 1) {
571 
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");
578  for (it = 0; it < StdI->Lanczos_max; it++) {
579  /*
580  Sum equivalent pumping
581  */
582  for (ipump = 0; ipump < StdI->npump[it]; ipump++) {
583  for (jpump = ipump + 1; jpump < StdI->npump[it]; jpump++) {
584  if (StdI->pumpindx[it][ipump][0] == StdI->pumpindx[it][jpump][0]
585  && StdI->pumpindx[it][ipump][1] == StdI->pumpindx[it][jpump][1]
586  && StdI->pumpindx[it][ipump][2] == StdI->pumpindx[it][jpump][2]
587  && StdI->pumpindx[it][ipump][3] == StdI->pumpindx[it][jpump][3]) {
588  StdI->pump[it][ipump] = StdI->pump[it][ipump] + StdI->pump[it][jpump];
589  StdI->pump[it][jpump] = 0.0;
590  }
591  }/*for (ktrans = jtrans + 1; ktrans < StdI->ntrans; ktrans++)*/
592  }/*for (jtrans = 0; jtrans < StdI->ntrans; jtrans++)*/
593  /*
594  Count the number of finite pumping
595  */
596  npump0 = 0;
597  for (ipump = 0; ipump < StdI->npump[it]; ipump++)
598  if (cabs(StdI->pump[it][ipump]) > 0.000001) npump0 += 1;
599 
600  fprintf(fp, "%f %d\n", StdI->dt*(double)it, npump0);
601  for (ipump = 0; ipump < StdI->npump[it]; ipump++) {
602 
603  if (cabs(StdI->pump[it][ipump]) <= 0.000001) continue;
604 
605  fprintf(fp, "%5d %5d %5d %5d %25.15f %25.15f\n",
606  StdI->pumpindx[it][ipump][0], StdI->pumpindx[it][ipump][1],
607  StdI->pumpindx[it][ipump][2], StdI->pumpindx[it][ipump][3],
608  creal(StdI->pump[it][ipump]), cimag(StdI->pump[it][ipump]));
609  }/*for (itrans = 0; itrans < StdI->ntrans; itrans++)*/
610  }/*for (it = 0; it < StdI->Lanczos_max; it++)*/
611  fprintf(stdout, " teone.def is written.\n\n");
612  }
613  else {
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");
620  for (it = 0; it < StdI->Lanczos_max; it++) {
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);
625  }/*for (isite = 0; isite < StdI->nsite; isite++)*/
626  }/*for (it = 0; it < StdI->Lanczos_max; it++)*/
627  fprintf(stdout, " tetwo.def is written.\n\n");
628  }
629  fflush(fp);
630  fclose(fp);
631 }/*tatic void PrintPump*/
double dt
Time step.
Definition: StdFace_vals.h:298
int *** pumpindx
[StdIntList::nt][StdIntList::npump][4] Site/spin indices of one-body term, malloc in StdFace_MallocIn...
Definition: StdFace_vals.h:308
int PumpBody
one- or two-body pumping, defined from StdIntList::PumpType
Definition: StdFace_vals.h:305
int * npump
[StdIntList::nt] Number of transfer, counted in each lattice file.
Definition: StdFace_vals.h:307
int Lanczos_max
The maxixmum number of iterations, input from file.
Definition: StdFace_vals.h:265
double complex ** pump
[StdIntList::nt][StdIntList::npump] Coefficient of one-body term, malloc in StdFace_MallocInteraction...
Definition: StdFace_vals.h:311
int nsite
Number of sites, set in the each lattice file.
Definition: StdFace_vals.h:161
double Uquench
Quenched on-site potential.
Definition: StdFace_vals.h:302
+ Here is the caller graph for this function:

◆ PrintTrans()

static void PrintTrans ( struct StdIntList StdI)
static

Print the transfer file.

Author
Mitsuaki Kawamura (The University of Tokyo)

Definition at line 1211 of file StdFace_main.c.

References StdIntList::ntrans, StdIntList::trans, and StdIntList::transindx.

Referenced by StdFace_main().

1211  {
1212  FILE *fp;
1213  int jtrans, ktrans, ntrans0;
1214 
1215  for (jtrans = 0; jtrans < StdI->ntrans; jtrans++){
1216  for (ktrans = jtrans + 1; ktrans < StdI->ntrans; ktrans++){
1217  if (StdI->transindx[jtrans][0] == StdI->transindx[ktrans][0]
1218  && StdI->transindx[jtrans][1] == StdI->transindx[ktrans][1]
1219  && StdI->transindx[jtrans][2] == StdI->transindx[ktrans][2]
1220  && StdI->transindx[jtrans][3] == StdI->transindx[ktrans][3]){
1221  StdI->trans[jtrans] = StdI->trans[jtrans] + StdI->trans[ktrans];
1222  StdI->trans[ktrans] = 0.0;
1223  }
1224  }/*for (ktrans = jtrans + 1; ktrans < StdI->ntrans; ktrans++)*/
1225  }/*for (jtrans = 0; jtrans < StdI->ntrans; jtrans++)*/
1226 
1227  ntrans0 = 0;
1228  for (ktrans = 0; ktrans < StdI->ntrans; ktrans++){
1229  if (cabs(StdI->trans[ktrans]) > 0.000001) ntrans0 = ntrans0 + 1;
1230  }
1231 
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");
1238 
1239  ntrans0 = 0;
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",
1243  StdI->transindx[ktrans][0], StdI->transindx[ktrans][1],
1244  StdI->transindx[ktrans][2], StdI->transindx[ktrans][3],
1245  creal(StdI->trans[ktrans]), cimag(StdI->trans[ktrans]));
1246  }
1247 
1248  fflush(fp);
1249  fclose(fp);
1250  fprintf(stdout, " trans.def is written.\n");
1251 }/*static void PrintTrans*/
double complex * trans
[StdIntList::ntrans] Coefficient of one-body term, malloc in StdFace_MallocInteractions() and set in ...
Definition: StdFace_vals.h:168
int ntrans
Number of transfer, counted in each lattice file.
Definition: StdFace_vals.h:164
int ** transindx
[StdIntList::ntrans][4] Site/spin indices of one-body term, malloc in StdFace_MallocInteractions() an...
Definition: StdFace_vals.h:165
+ Here is the caller graph for this function:

◆ StdFace_LargeValue()

static void StdFace_LargeValue ( struct StdIntList StdI)
static

Set Largevalue (StdIntList::LargeValue) for TPQ. Sum absolute-value of all one- and two- body terms.

Definition at line 49 of file StdFace_main.c.

References StdIntList::Cinter, StdIntList::Cintra, StdIntList::Ex, StdIntList::Hund, StdIntList::intr, StdIntList::LargeValue, StdIntList::NCinter, StdIntList::NCintra, StdIntList::NEx, StdIntList::NHund, StdIntList::nintr, StdIntList::NPairLift, StdIntList::nsite, StdIntList::ntrans, StdIntList::PairLift, StdFace_PrintVal_d(), and StdIntList::trans.

Referenced by StdFace_main().

49  {
50  int ktrans, kintr;
51  double LargeValue0;
52 
53  LargeValue0 = 0.0;
54  for (ktrans = 0; ktrans < StdI->ntrans; ktrans++) {
55  LargeValue0 += cabs(StdI->trans[ktrans]);
56  }
57  for (kintr = 0; kintr < StdI->nintr; kintr++) {
58  LargeValue0 += cabs(StdI->intr[kintr]);
59  }
60  for (kintr = 0; kintr < StdI->NCintra; kintr++) {
61  LargeValue0 += fabs(StdI->Cintra[kintr]);
62  }
63  for (kintr = 0; kintr < StdI->NCinter; kintr++) {
64  LargeValue0 += fabs(StdI->Cinter[kintr]);
65  }
66  for (kintr = 0; kintr < StdI->NEx; kintr++) {
67  LargeValue0 += 2.0 * fabs(StdI->Ex[kintr]);
68  }
69  for (kintr = 0; kintr < StdI->NPairLift; kintr++) {
70  LargeValue0 += 2.0 * fabs(StdI->PairLift[kintr]);
71  }
72  for (kintr = 0; kintr < StdI->NHund; kintr++) {
73  LargeValue0 += 2.0 * fabs(StdI->Hund[kintr]);
74  }
75  LargeValue0 /= (double)StdI->nsite;
76  StdFace_PrintVal_d("LargeValue", &StdI->LargeValue, LargeValue0);
77 }/*static void StdFace_LargeValue*/
int NHund
Number of Hund term, counted in each lattice file.
Definition: StdFace_vals.h:197
double complex * intr
[StdIntList::nintr] Coefficient of general two-body term, malloc in StdFace_MallocInteractions() and ...
Definition: StdFace_vals.h:176
double * Ex
[StdIntList::NEx] Coefficient of exchange term, malloc in StdFace_MallocInteractions() and set in Std...
Definition: StdFace_vals.h:210
double complex * trans
[StdIntList::ntrans] Coefficient of one-body term, malloc in StdFace_MallocInteractions() and set in ...
Definition: StdFace_vals.h:168
int ntrans
Number of transfer, counted in each lattice file.
Definition: StdFace_vals.h:164
int NCinter
Number of inter-site Coulomb interaction, counted in each lattice file.
Definition: StdFace_vals.h:188
int NCintra
Number of intra-site Coulomb interaction, counted in each lattice file.
Definition: StdFace_vals.h:179
double * Hund
[StdIntList::NHund] Coefficient of Hund term, malloc in StdFace_MallocInteractions() and set in StdFa...
Definition: StdFace_vals.h:202
double * PairLift
[StdIntList::NPairLift] Coefficient of pair-lift term, malloc in StdFace_MallocInteractions() and set...
Definition: StdFace_vals.h:218
int NPairLift
Number of pair-lift term, counted in each lattice file.
Definition: StdFace_vals.h:213
int NEx
Number of exchange term, counted in each lattice file.
Definition: StdFace_vals.h:205
double LargeValue
The shift parameter for the TPQ calculation.
Definition: StdFace_vals.h:274
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 nsite
Number of sites, set in the each lattice file.
Definition: StdFace_vals.h:161
double * Cintra
[StdIntList::NCintra] Coefficient of intra-site Coulomb term, malloc in StdFace_MallocInteractions() ...
Definition: StdFace_vals.h:185
int nintr
Number of InterAll, counted in each lattice file.
Definition: StdFace_vals.h:171
double * Cinter
[StdIntList::NCinter] Coefficient of inter-site Coulomb term, malloc in StdFace_MallocInteractions() ...
Definition: StdFace_vals.h:194
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ StdFace_main()

void StdFace_main ( char *  fname)

Main routine for the standard mode.

Author
Mitsuaki Kawamura (The University of Tokyo)
Parameters
[in]fnameInput file name for the standard mode

Definition at line 2238 of file StdFace_main.c.

References StdIntList::a, StdIntList::box, StdIntList::CalcSpec, StdIntList::CDataFileHead, CheckModPara(), CheckOutputMode(), StdIntList::cutoff_j, StdIntList::cutoff_JR, StdIntList::cutoff_length_J, StdIntList::cutoff_length_t, StdIntList::cutoff_length_U, StdIntList::cutoff_t, StdIntList::cutoff_tR, StdIntList::cutoff_u, StdIntList::cutoff_UR, StdIntList::D, StdIntList::direct, StdIntList::dt, StdIntList::EigenVecIO, StdIntList::exct, StdIntList::ExpandCoef, StdIntList::ExpecInterval, StdIntList::FlgTemp, StdIntList::freq, StdIntList::Gamma, StdIntList::h, StdIntList::HamIO, StdIntList::Height, StdIntList::initial_iv, StdIntList::InitialVecType, StdIntList::intr, StdIntList::intrindx, StdIntList::J, StdIntList::J0, StdIntList::J0All, StdIntList::J0p, StdIntList::J0pAll, StdIntList::J0pp, StdIntList::J0ppAll, StdIntList::J1, StdIntList::J1All, StdIntList::J1p, StdIntList::J1pAll, StdIntList::J1pp, StdIntList::J1ppAll, StdIntList::J2, StdIntList::J2All, StdIntList::J2p, StdIntList::J2pAll, StdIntList::J2pp, StdIntList::J2ppAll, StdIntList::JAll, StdIntList::Jp, StdIntList::JpAll, StdIntList::Jpp, StdIntList::JppAll, StdIntList::K, StdIntList::L, StdIntList::Lanczos_max, StdIntList::LanczosEps, StdIntList::LanczosTarget, StdIntList::LargeValue, StdIntList::lattice, StdIntList::lBoost, StdIntList::length, StdIntList::lGC, StdIntList::locspinflag, StdIntList::method, StdIntList::model, StdIntList::mu, StdIntList::NaN_i, StdIntList::nelec, StdIntList::nintr, StdIntList::Nomega, StdIntList::ntrans, StdIntList::NumAve, StdIntList::nvec, StdIntList::OmegaIm, StdIntList::OmegaMax, StdIntList::OmegaMin, StdIntList::OutputExVec, StdIntList::outputmode, StdIntList::phase, Print1Green(), Print2Green(), PrintCalcMod(), PrintExcitation(), PrintInteractions(), PrintLocSpin(), PrintModPara(), PrintNamelist(), PrintPump(), PrintTrans(), StdIntList::PumpType, StdIntList::Restart, StdIntList::S2, StdIntList::SpectrumQ, StdIntList::SpectrumType, StdFace_Chain(), StdFace_Chain_Boost(), StdFace_exit(), StdFace_FCOrtho(), StdFace_Honeycomb(), StdFace_Honeycomb_Boost(), StdFace_Kagome(), StdFace_Kagome_Boost(), StdFace_Ladder(), StdFace_Ladder_Boost(), StdFace_LargeValue(), StdFace_Orthorhombic(), StdFace_PrintVal_i(), StdFace_Pyrochlore(), StdFace_ResetVals(), StdFace_Tetragonal(), StdFace_Triangular(), StdFace_Wannier90(), StoreWithCheckDup_c(), StoreWithCheckDup_d(), StoreWithCheckDup_i(), StoreWithCheckDup_s(), StoreWithCheckDup_sl(), StdIntList::Sz2, StdIntList::t, StdIntList::t0, StdIntList::t0p, StdIntList::t0pp, StdIntList::t1, StdIntList::t1p, StdIntList::t1pp, StdIntList::t2, StdIntList::t2p, StdIntList::t2pp, StdIntList::tdump, Text2Lower(), StdIntList::tp, StdIntList::tpp, StdIntList::trans, StdIntList::transindx, TrimSpaceQuote(), StdIntList::tshift, StdIntList::U, UnsupportedSystem(), StdIntList::Uquench, StdIntList::V, StdIntList::V0, StdIntList::V0p, StdIntList::V0pp, StdIntList::V1, StdIntList::V1p, StdIntList::V1pp, StdIntList::V2, StdIntList::V2p, StdIntList::V2pp, StdIntList::VecPot, VectorPotential(), StdIntList::Vp, StdIntList::Vpp, and StdIntList::W.

Referenced by main().

2241 {
2242  struct StdIntList *StdI;
2243  FILE *fp;
2244  int ktrans, kintr;
2245  char ctmpline[256];
2246  char *keyword, *value;
2247 
2248  StdI = (struct StdIntList *)malloc(sizeof(struct StdIntList));
2249 
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);
2253  StdFace_exit(-1);
2254  }
2255  else {
2256  fprintf(stdout, "\n Open Standard-Mode Inputfile %s \n\n", fname);
2257  }
2258 
2259  StdFace_ResetVals(StdI);
2260 
2261  while (fgets(ctmpline, 256, fp) != NULL) {
2262 
2263  TrimSpaceQuote(ctmpline);
2264  if (strncmp(ctmpline, "//", 2) == 0) {
2265  fprintf(stdout, " Skipping a line.\n");
2266  continue;
2267  }
2268  else if (ctmpline[0] == '\0') {
2269  fprintf(stdout, " Skipping a line.\n");
2270  continue;
2271  }
2272  keyword = strtok(ctmpline, "=");
2273  value = strtok(NULL, "=");
2274  if (value == NULL) {
2275  fprintf(stdout, "\n ERROR ! \"=\" is NOT found !\n\n");
2276  StdFace_exit(-1);
2277  }
2278  Text2Lower(keyword);
2279  fprintf(stdout, " KEYWORD : %-20s | VALUE : %s \n", keyword, value);
2280 
2281  if (strcmp(keyword, "a") == 0) StoreWithCheckDup_d(keyword, value, &StdI->a);
2282  else if (strcmp(keyword, "a0h") == 0) StoreWithCheckDup_i(keyword, value, &StdI->box[0][2]);
2283  else if (strcmp(keyword, "a0l") == 0) StoreWithCheckDup_i(keyword, value, &StdI->box[0][1]);
2284  else if (strcmp(keyword, "a0w") == 0) StoreWithCheckDup_i(keyword, value, &StdI->box[0][0]);
2285  else if (strcmp(keyword, "a1h") == 0) StoreWithCheckDup_i(keyword, value, &StdI->box[1][2]);
2286  else if (strcmp(keyword, "a1l") == 0) StoreWithCheckDup_i(keyword, value, &StdI->box[1][1]);
2287  else if (strcmp(keyword, "a1w") == 0) StoreWithCheckDup_i(keyword, value, &StdI->box[1][0]);
2288  else if (strcmp(keyword, "a2h") == 0) StoreWithCheckDup_i(keyword, value, &StdI->box[2][2]);
2289  else if (strcmp(keyword, "a2l") == 0) StoreWithCheckDup_i(keyword, value, &StdI->box[2][1]);
2290  else if (strcmp(keyword, "a2w") == 0) StoreWithCheckDup_i(keyword, value, &StdI->box[2][0]);
2291  else if (strcmp(keyword, "cutoff_j") == 0) StoreWithCheckDup_d(keyword, value, &StdI->cutoff_j);
2292  else if (strcmp(keyword, "cutoff_jh") == 0) StoreWithCheckDup_i(keyword, value, &StdI->cutoff_JR[2]);
2293  else if (strcmp(keyword, "cutoff_jl") == 0) StoreWithCheckDup_i(keyword, value, &StdI->cutoff_JR[1]);
2294  else if (strcmp(keyword, "cutoff_jw") == 0) StoreWithCheckDup_i(keyword, value, &StdI->cutoff_JR[0]);
2295  else if (strcmp(keyword, "cutoff_length_j") == 0) StoreWithCheckDup_d(keyword, value, &StdI->cutoff_length_J);
2296  else if (strcmp(keyword, "cutoff_length_u") == 0) StoreWithCheckDup_d(keyword, value, &StdI->cutoff_length_U);
2297  else if (strcmp(keyword, "cutoff_length_t") == 0) StoreWithCheckDup_d(keyword, value, &StdI->cutoff_length_t);
2298  else if (strcmp(keyword, "cutoff_t") == 0) StoreWithCheckDup_d(keyword, value, &StdI->cutoff_t);
2299  else if (strcmp(keyword, "cutoff_th") == 0) StoreWithCheckDup_i(keyword, value, &StdI->cutoff_tR[2]);
2300  else if (strcmp(keyword, "cutoff_tl") == 0) StoreWithCheckDup_i(keyword, value, &StdI->cutoff_tR[1]);
2301  else if (strcmp(keyword, "cutoff_tw") == 0) StoreWithCheckDup_i(keyword, value, &StdI->cutoff_tR[0]);
2302  else if (strcmp(keyword, "cutoff_u") == 0) StoreWithCheckDup_d(keyword, value, &StdI->cutoff_u);
2303  else if (strcmp(keyword, "cutoff_uh") == 0) StoreWithCheckDup_i(keyword, value, &StdI->cutoff_UR[2]);
2304  else if (strcmp(keyword, "cutoff_ul") == 0) StoreWithCheckDup_i(keyword, value, &StdI->cutoff_UR[1]);
2305  else if (strcmp(keyword, "cutoff_uw") == 0) StoreWithCheckDup_i(keyword, value, &StdI->cutoff_UR[0]);
2306  else if (strcmp(keyword, "d") == 0) StoreWithCheckDup_d(keyword, value, &StdI->D[2][2]);
2307  else if (strcmp(keyword, "gamma") == 0) StoreWithCheckDup_d(keyword, value, &StdI->Gamma);
2308  else if (strcmp(keyword, "h") == 0) StoreWithCheckDup_d(keyword, value, &StdI->h);
2309  else if (strcmp(keyword, "height") == 0) StoreWithCheckDup_i(keyword, value, &StdI->Height);
2310  else if (strcmp(keyword, "hlength") == 0) StoreWithCheckDup_d(keyword, value, &StdI->length[2]);
2311  else if (strcmp(keyword, "hx") == 0) StoreWithCheckDup_d(keyword, value, &StdI->direct[2][0]);
2312  else if (strcmp(keyword, "hy") == 0) StoreWithCheckDup_d(keyword, value, &StdI->direct[2][1]);
2313  else if (strcmp(keyword, "hz") == 0) StoreWithCheckDup_d(keyword, value, &StdI->direct[2][2]);
2314  else if (strcmp(keyword, "j") == 0) StoreWithCheckDup_d(keyword, value, &StdI->JAll);
2315  else if (strcmp(keyword, "jx") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J[0][0]);
2316  else if (strcmp(keyword, "jxy") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J[0][1]);
2317  else if (strcmp(keyword, "jxz") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J[0][2]);
2318  else if (strcmp(keyword, "jy") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J[1][1]);
2319  else if (strcmp(keyword, "jyx") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J[1][0]);
2320  else if (strcmp(keyword, "jyz") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J[1][2]);
2321  else if (strcmp(keyword, "jz") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J[2][2]);
2322  else if (strcmp(keyword, "jzx") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J[2][0]);
2323  else if (strcmp(keyword, "jzy") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J[2][1]);
2324  else if (strcmp(keyword, "j0") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J0All);
2325  else if (strcmp(keyword, "j0x") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J0[0][0]);
2326  else if (strcmp(keyword, "j0xy") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J0[0][1]);
2327  else if (strcmp(keyword, "j0xz") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J0[0][2]);
2328  else if (strcmp(keyword, "j0y") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J0[1][1]);
2329  else if (strcmp(keyword, "j0yx") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J0[1][0]);
2330  else if (strcmp(keyword, "j0yz") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J0[1][2]);
2331  else if (strcmp(keyword, "j0z") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J0[2][2]);
2332  else if (strcmp(keyword, "j0zx") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J0[2][0]);
2333  else if (strcmp(keyword, "j0zy") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J0[2][1]);
2334  else if (strcmp(keyword, "j0'") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J0pAll);
2335  else if (strcmp(keyword, "j0'x") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J0p[0][0]);
2336  else if (strcmp(keyword, "j0'xy") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J0p[0][1]);
2337  else if (strcmp(keyword, "j0'xz") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J0p[0][2]);
2338  else if (strcmp(keyword, "j0'y") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J0p[1][1]);
2339  else if (strcmp(keyword, "j0'yx") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J0p[1][0]);
2340  else if (strcmp(keyword, "j0'yz") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J0p[1][2]);
2341  else if (strcmp(keyword, "j0'z") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J0p[2][2]);
2342  else if (strcmp(keyword, "j0'zx") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J0p[2][0]);
2343  else if (strcmp(keyword, "j0'zy") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J0p[2][1]);
2344  else if (strcmp(keyword, "j0''") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J0ppAll);
2345  else if (strcmp(keyword, "j0''x") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J0pp[0][0]);
2346  else if (strcmp(keyword, "j0''xy") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J0pp[0][1]);
2347  else if (strcmp(keyword, "j0''xz") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J0pp[0][2]);
2348  else if (strcmp(keyword, "j0''y") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J0pp[1][1]);
2349  else if (strcmp(keyword, "j0''yx") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J0pp[1][0]);
2350  else if (strcmp(keyword, "j0''yz") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J0pp[1][2]);
2351  else if (strcmp(keyword, "j0''z") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J0pp[2][2]);
2352  else if (strcmp(keyword, "j0''zx") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J0pp[2][0]);
2353  else if (strcmp(keyword, "j0''zy") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J0pp[2][1]);
2354  else if (strcmp(keyword, "j1") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J1All);
2355  else if (strcmp(keyword, "j1x") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J1[0][0]);
2356  else if (strcmp(keyword, "j1xy") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J1[0][1]);
2357  else if (strcmp(keyword, "j1xz") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J1[0][2]);
2358  else if (strcmp(keyword, "j1y") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J1[1][1]);
2359  else if (strcmp(keyword, "j1yx") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J1[1][0]);
2360  else if (strcmp(keyword, "j1yz") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J1[1][2]);
2361  else if (strcmp(keyword, "j1z") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J1[2][2]);
2362  else if (strcmp(keyword, "j1zx") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J1[2][0]);
2363  else if (strcmp(keyword, "j1zy") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J1[2][1]);
2364  else if (strcmp(keyword, "j1'") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J1pAll);
2365  else if (strcmp(keyword, "j1'x") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J1p[0][0]);
2366  else if (strcmp(keyword, "j1'xy") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J1p[0][1]);
2367  else if (strcmp(keyword, "j1'xz") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J1p[0][2]);
2368  else if (strcmp(keyword, "j1'y") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J1p[1][1]);
2369  else if (strcmp(keyword, "j1'yx") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J1p[1][0]);
2370  else if (strcmp(keyword, "j1'yz") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J1p[1][2]);
2371  else if (strcmp(keyword, "j1'z") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J1p[2][2]);
2372  else if (strcmp(keyword, "j1'zx") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J1p[2][0]);
2373  else if (strcmp(keyword, "j1'zy") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J1p[2][1]);
2374  else if (strcmp(keyword, "j1''") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J1ppAll);
2375  else if (strcmp(keyword, "j1''x") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J1pp[0][0]);
2376  else if (strcmp(keyword, "j1''xy") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J1pp[0][1]);
2377  else if (strcmp(keyword, "j1''xz") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J1pp[0][2]);
2378  else if (strcmp(keyword, "j1''y") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J1pp[1][1]);
2379  else if (strcmp(keyword, "j1''yx") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J1pp[1][0]);
2380  else if (strcmp(keyword, "j1''yz") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J1pp[1][2]);
2381  else if (strcmp(keyword, "j1''z") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J1pp[2][2]);
2382  else if (strcmp(keyword, "j1''zx") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J1pp[2][0]);
2383  else if (strcmp(keyword, "j1''zy") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J1pp[2][1]);
2384  else if (strcmp(keyword, "j2") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J2All);
2385  else if (strcmp(keyword, "j2x") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J2[0][0]);
2386  else if (strcmp(keyword, "j2xy") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J2[0][1]);
2387  else if (strcmp(keyword, "j2xz") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J2[0][2]);
2388  else if (strcmp(keyword, "j2y") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J2[1][1]);
2389  else if (strcmp(keyword, "j2yx") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J2[1][0]);
2390  else if (strcmp(keyword, "j2yz") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J2[1][2]);
2391  else if (strcmp(keyword, "j2z") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J2[2][2]);
2392  else if (strcmp(keyword, "j2zx") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J2[2][0]);
2393  else if (strcmp(keyword, "j2zy") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J2[2][1]);
2394  else if (strcmp(keyword, "j2'") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J2pAll);
2395  else if (strcmp(keyword, "j2'x") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J2p[0][0]);
2396  else if (strcmp(keyword, "j2'xy") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J2p[0][1]);
2397  else if (strcmp(keyword, "j2'xz") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J2p[0][2]);
2398  else if (strcmp(keyword, "j2'y") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J2p[1][1]);
2399  else if (strcmp(keyword, "j2'yx") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J2p[1][0]);
2400  else if (strcmp(keyword, "j2'yz") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J2p[1][2]);
2401  else if (strcmp(keyword, "j2'z") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J2p[2][2]);
2402  else if (strcmp(keyword, "j2'zx") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J2p[2][0]);
2403  else if (strcmp(keyword, "j2'zy") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J2p[2][1]);
2404  else if (strcmp(keyword, "j2''") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J2ppAll);
2405  else if (strcmp(keyword, "j2''x") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J2pp[0][0]);
2406  else if (strcmp(keyword, "j2''xy") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J2pp[0][1]);
2407  else if (strcmp(keyword, "j2''xz") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J2pp[0][2]);
2408  else if (strcmp(keyword, "j2''y") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J2pp[1][1]);
2409  else if (strcmp(keyword, "j2''yx") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J2pp[1][0]);
2410  else if (strcmp(keyword, "j2''yz") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J2pp[1][2]);
2411  else if (strcmp(keyword, "j2''z") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J2pp[2][2]);
2412  else if (strcmp(keyword, "j2''zx") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J2pp[2][0]);
2413  else if (strcmp(keyword, "j2''zy") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J2pp[2][1]);
2414  else if (strcmp(keyword, "j'") == 0) StoreWithCheckDup_d(keyword, value, &StdI->JpAll);
2415  else if (strcmp(keyword, "j'x") == 0) StoreWithCheckDup_d(keyword, value, &StdI->Jp[0][0]);
2416  else if (strcmp(keyword, "j'xy") == 0) StoreWithCheckDup_d(keyword, value, &StdI->Jp[0][1]);
2417  else if (strcmp(keyword, "j'xz") == 0) StoreWithCheckDup_d(keyword, value, &StdI->Jp[0][2]);
2418  else if (strcmp(keyword, "j'y") == 0) StoreWithCheckDup_d(keyword, value, &StdI->Jp[1][1]);
2419  else if (strcmp(keyword, "j'yx") == 0) StoreWithCheckDup_d(keyword, value, &StdI->Jp[1][0]);
2420  else if (strcmp(keyword, "j'yz") == 0) StoreWithCheckDup_d(keyword, value, &StdI->Jp[1][2]);
2421  else if (strcmp(keyword, "j'z") == 0) StoreWithCheckDup_d(keyword, value, &StdI->Jp[2][2]);
2422  else if (strcmp(keyword, "j'zx") == 0) StoreWithCheckDup_d(keyword, value, &StdI->Jp[2][0]);
2423  else if (strcmp(keyword, "j'zy") == 0) StoreWithCheckDup_d(keyword, value, &StdI->Jp[2][1]);
2424  else if (strcmp(keyword, "j''") == 0) StoreWithCheckDup_d(keyword, value, &StdI->JppAll);
2425  else if (strcmp(keyword, "j''x") == 0) StoreWithCheckDup_d(keyword, value, &StdI->Jpp[0][0]);
2426  else if (strcmp(keyword, "j''xy") == 0) StoreWithCheckDup_d(keyword, value, &StdI->Jpp[0][1]);
2427  else if (strcmp(keyword, "j''xz") == 0) StoreWithCheckDup_d(keyword, value, &StdI->Jpp[0][2]);
2428  else if (strcmp(keyword, "j''y") == 0) StoreWithCheckDup_d(keyword, value, &StdI->Jpp[1][1]);
2429  else if (strcmp(keyword, "j''yx") == 0) StoreWithCheckDup_d(keyword, value, &StdI->Jpp[1][0]);
2430  else if (strcmp(keyword, "j''yz") == 0) StoreWithCheckDup_d(keyword, value, &StdI->Jpp[1][2]);
2431  else if (strcmp(keyword, "j''z") == 0) StoreWithCheckDup_d(keyword, value, &StdI->Jpp[2][2]);
2432  else if (strcmp(keyword, "j''zx") == 0) StoreWithCheckDup_d(keyword, value, &StdI->Jpp[2][0]);
2433  else if (strcmp(keyword, "j''zy") == 0) StoreWithCheckDup_d(keyword, value, &StdI->Jpp[2][1]);
2434  else if (strcmp(keyword, "k") == 0) StoreWithCheckDup_d(keyword, value, &StdI->K);
2435  else if (strcmp(keyword, "l") == 0) StoreWithCheckDup_i(keyword, value, &StdI->L);
2436  else if (strcmp(keyword, "lattice") == 0) StoreWithCheckDup_sl(keyword, value, StdI->lattice);
2437  else if (strcmp(keyword, "llength") == 0) StoreWithCheckDup_d(keyword, value, &StdI->length[1]);
2438  else if (strcmp(keyword, "lx") == 0) StoreWithCheckDup_d(keyword, value, &StdI->direct[1][0]);
2439  else if (strcmp(keyword, "ly") == 0) StoreWithCheckDup_d(keyword, value, &StdI->direct[1][1]);
2440  else if (strcmp(keyword, "lz") == 0) StoreWithCheckDup_d(keyword, value, &StdI->direct[1][2]);
2441  else if (strcmp(keyword, "model") == 0) StoreWithCheckDup_sl(keyword, value, StdI->model);
2442  else if (strcmp(keyword, "mu") == 0) StoreWithCheckDup_d(keyword, value, &StdI->mu);
2443  else if (strcmp(keyword, "nelec") == 0) StoreWithCheckDup_i(keyword, value, &StdI->nelec);
2444  else if (strcmp(keyword, "outputmode") == 0) StoreWithCheckDup_sl(keyword, value, StdI->outputmode);
2445  else if (strcmp(keyword, "phase0") == 0) StoreWithCheckDup_d(keyword, value, &StdI->phase[0]);
2446  else if (strcmp(keyword, "phase1") == 0) StoreWithCheckDup_d(keyword, value, &StdI->phase[1]);
2447  else if (strcmp(keyword, "phase2") == 0) StoreWithCheckDup_d(keyword, value, &StdI->phase[2]);
2448  else if (strcmp(keyword, "t") == 0) StoreWithCheckDup_c(keyword, value, &StdI->t);
2449  else if (strcmp(keyword, "t0") == 0) StoreWithCheckDup_c(keyword, value, &StdI->t0);
2450  else if (strcmp(keyword, "t0'") == 0) StoreWithCheckDup_c(keyword, value, &StdI->t0p);
2451  else if (strcmp(keyword, "t0''") == 0) StoreWithCheckDup_c(keyword, value, &StdI->t0pp);
2452  else if (strcmp(keyword, "t1") == 0) StoreWithCheckDup_c(keyword, value, &StdI->t1);
2453  else if (strcmp(keyword, "t1'") == 0) StoreWithCheckDup_c(keyword, value, &StdI->t1p);
2454  else if (strcmp(keyword, "t1''") == 0) StoreWithCheckDup_c(keyword, value, &StdI->t1pp);
2455  else if (strcmp(keyword, "t2") == 0) StoreWithCheckDup_c(keyword, value, &StdI->t2);
2456  else if (strcmp(keyword, "t2'") == 0) StoreWithCheckDup_c(keyword, value, &StdI->t2p);
2457  else if (strcmp(keyword, "t2''") == 0) StoreWithCheckDup_c(keyword, value, &StdI->t2pp);
2458  else if (strcmp(keyword, "t'") == 0) StoreWithCheckDup_c(keyword, value, &StdI->tp);
2459  else if (strcmp(keyword, "t''") == 0) StoreWithCheckDup_c(keyword, value, &StdI->tpp);
2460  else if (strcmp(keyword, "u") == 0) StoreWithCheckDup_d(keyword, value, &StdI->U);
2461  else if (strcmp(keyword, "v") == 0) StoreWithCheckDup_d(keyword, value, &StdI->V);
2462  else if (strcmp(keyword, "v0") == 0) StoreWithCheckDup_d(keyword, value, &StdI->V0);
2463  else if (strcmp(keyword, "v0'") == 0) StoreWithCheckDup_d(keyword, value, &StdI->V0p);
2464  else if (strcmp(keyword, "v0''") == 0) StoreWithCheckDup_d(keyword, value, &StdI->V0pp);
2465  else if (strcmp(keyword, "v1") == 0) StoreWithCheckDup_d(keyword, value, &StdI->V1);
2466  else if (strcmp(keyword, "v1'") == 0) StoreWithCheckDup_d(keyword, value, &StdI->V1p);
2467  else if (strcmp(keyword, "v1''") == 0) StoreWithCheckDup_d(keyword, value, &StdI->V1pp);
2468  else if (strcmp(keyword, "v2") == 0) StoreWithCheckDup_d(keyword, value, &StdI->V2);
2469  else if (strcmp(keyword, "v2'") == 0) StoreWithCheckDup_d(keyword, value, &StdI->V2p);
2470  else if (strcmp(keyword, "v2''") == 0) StoreWithCheckDup_d(keyword, value, &StdI->V2pp);
2471  else if (strcmp(keyword, "v'") == 0) StoreWithCheckDup_d(keyword, value, &StdI->Vp);
2472  else if (strcmp(keyword, "v''") == 0) StoreWithCheckDup_d(keyword, value, &StdI->Vpp);
2473  else if (strcmp(keyword, "w") == 0) StoreWithCheckDup_i(keyword, value, &StdI->W);
2474  else if (strcmp(keyword, "wlength") == 0) StoreWithCheckDup_d(keyword, value, &StdI->length[0]);
2475  else if (strcmp(keyword, "wx") == 0) StoreWithCheckDup_d(keyword, value, &StdI->direct[0][0]);
2476  else if (strcmp(keyword, "wy") == 0) StoreWithCheckDup_d(keyword, value, &StdI->direct[0][1]);
2477  else if (strcmp(keyword, "wz") == 0) StoreWithCheckDup_d(keyword, value, &StdI->direct[0][2]);
2478  else if (strcmp(keyword, "2sz") == 0) StoreWithCheckDup_i(keyword, value, &StdI->Sz2);
2479 
2480 #if defined(_HPhi)
2481  else if (strcmp(keyword, "calcspec") == 0) StoreWithCheckDup_sl(keyword, value, StdI->CalcSpec);
2482  else if (strcmp(keyword, "exct") == 0) StoreWithCheckDup_i(keyword, value, &StdI->exct);
2483  else if (strcmp(keyword, "eigenvecio") == 0) StoreWithCheckDup_sl(keyword, value, StdI->EigenVecIO);
2484  else if (strcmp(keyword, "expandcoef") == 0) StoreWithCheckDup_i(keyword, value, &StdI->ExpandCoef);
2485  else if (strcmp(keyword, "expecinterval") == 0) StoreWithCheckDup_i(keyword, value, &StdI->ExpecInterval);
2486  else if (strcmp(keyword, "cdatafilehead") == 0) StoreWithCheckDup_s(keyword, value, StdI->CDataFileHead);
2487  else if (strcmp(keyword, "dt") == 0) StoreWithCheckDup_d(keyword, value, &StdI->dt);
2488  else if (strcmp(keyword, "flgtemp") == 0) StoreWithCheckDup_i(keyword, value, &StdI->FlgTemp);
2489  else if (strcmp(keyword, "freq") == 0) StoreWithCheckDup_d(keyword, value, &StdI->freq);
2490  else if (strcmp(keyword, "hamio") == 0) StoreWithCheckDup_sl(keyword, value, StdI->HamIO);
2491  else if (strcmp(keyword, "initialvectype") == 0) StoreWithCheckDup_sl(keyword, value, StdI->InitialVecType);
2492  else if (strcmp(keyword, "initial_iv") == 0) StoreWithCheckDup_i(keyword, value, &StdI->initial_iv);
2493  else if (strcmp(keyword, "lanczoseps") == 0) StoreWithCheckDup_i(keyword, value, &StdI->LanczosEps);
2494  else if (strcmp(keyword, "lanczostarget") == 0) StoreWithCheckDup_i(keyword, value, &StdI->LanczosTarget);
2495  else if (strcmp(keyword, "lanczos_max") == 0) StoreWithCheckDup_i(keyword, value, &StdI->Lanczos_max);
2496  else if (strcmp(keyword, "largevalue") == 0) StoreWithCheckDup_d(keyword, value, &StdI->LargeValue);
2497  else if (strcmp(keyword, "method") == 0) StoreWithCheckDup_sl(keyword, value, StdI->method);
2498  else if (strcmp(keyword, "nomega") == 0) StoreWithCheckDup_i(keyword, value, &StdI->Nomega);
2499  else if (strcmp(keyword, "numave") == 0) StoreWithCheckDup_i(keyword, value, &StdI->NumAve);
2500  else if (strcmp(keyword, "nvec") == 0) StoreWithCheckDup_i(keyword, value, &StdI->nvec);
2501  else if (strcmp(keyword, "omegamax") == 0) StoreWithCheckDup_d(keyword, value, &StdI->OmegaMax);
2502  else if (strcmp(keyword, "omegamin") == 0) StoreWithCheckDup_d(keyword, value, &StdI->OmegaMin);
2503  else if (strcmp(keyword, "omegaim") == 0) StoreWithCheckDup_d(keyword, value, &StdI->OmegaIm);
2504  else if (strcmp(keyword, "outputexcitedvec") == 0) StoreWithCheckDup_sl(keyword, value, StdI->OutputExVec);
2505  else if (strcmp(keyword, "pumptype") == 0) StoreWithCheckDup_sl(keyword, value, StdI->PumpType);
2506  else if (strcmp(keyword, "restart") == 0) StoreWithCheckDup_sl(keyword, value, StdI->Restart);
2507  else if (strcmp(keyword, "spectrumqh") == 0) StoreWithCheckDup_d(keyword, value, &StdI->SpectrumQ[2]);
2508  else if (strcmp(keyword, "spectrumql") == 0) StoreWithCheckDup_d(keyword, value, &StdI->SpectrumQ[1]);
2509  else if (strcmp(keyword, "spectrumqw") == 0) StoreWithCheckDup_d(keyword, value, &StdI->SpectrumQ[0]);
2510  else if (strcmp(keyword, "spectrumtype") == 0) StoreWithCheckDup_sl(keyword, value, StdI->SpectrumType);
2511  else if (strcmp(keyword, "tdump") == 0) StoreWithCheckDup_d(keyword, value, &StdI->tdump);
2512  else if (strcmp(keyword, "tshift") == 0) StoreWithCheckDup_d(keyword, value, &StdI->tshift);
2513  else if (strcmp(keyword, "uquench") == 0) StoreWithCheckDup_d(keyword, value, &StdI->Uquench);
2514  else if (strcmp(keyword, "vecpoth") == 0) StoreWithCheckDup_d(keyword, value, &StdI->VecPot[2]);
2515  else if (strcmp(keyword, "vecpotl") == 0) StoreWithCheckDup_d(keyword, value, &StdI->VecPot[1]);
2516  else if (strcmp(keyword, "vecpotw") == 0) StoreWithCheckDup_d(keyword, value, &StdI->VecPot[0]);
2517  else if (strcmp(keyword, "2s") == 0) StoreWithCheckDup_i(keyword, value, &StdI->S2);
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);
2533  else if (strcmp(keyword, "hsub") == 0) StoreWithCheckDup_i(keyword, value, &StdI->Hsub);
2534  else if (strcmp(keyword, "lsub") == 0) StoreWithCheckDup_i(keyword, value, &StdI->Lsub);
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);
2551  else if (strcmp(keyword, "wsub") == 0) StoreWithCheckDup_i(keyword, value, &StdI->Wsub);
2552 #endif
2553  else {
2554  fprintf(stdout, "ERROR ! Unsupported Keyword in Standard mode!\n");
2555  StdFace_exit(-1);
2556  }
2557  }
2558  fflush(fp);
2559  fclose(fp);
2560  fprintf(stdout, "\n");
2561  fprintf(stdout, "####### Construct Model #######\n");
2562  fprintf(stdout, "\n");
2563  /*
2564  Check the model
2565  */
2566  if (strcmp(StdI->CDataFileHead, "****") == 0) {
2567  strcpy(StdI->CDataFileHead, "zvo\0");
2568  fprintf(stdout, " CDataFileHead = %-12s###### DEFAULT VALUE IS USED ######\n", StdI->CDataFileHead);
2569  }
2570  else fprintf(stdout, " CDataFileHead = %-s\n", StdI->CDataFileHead);
2571 
2572  StdI->lGC = 0;
2573  StdI->lBoost = 0;
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");
2580  StdI->lGC = 1;
2581  }
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");
2586  StdI->lGC = 1;
2587  }
2588 #if defined(_HPhi)
2589  else if(strcmp(StdI->model, "spingcboost") == 0 ||
2590  strcmp(StdI->model, "spingccma") == 0) {
2591  strcpy(StdI->model, "spin\0");
2592  StdI->lGC = 1;
2593  StdI->lBoost = 1;
2594  }
2595 #endif
2596  else if (strcmp(StdI->model, "kondolattice") == 0
2597  || strcmp(StdI->model, "kondo") == 0) {
2598  strcpy(StdI->model, "kondo\0");
2599  }
2600  else if(strcmp(StdI->model, "kondolatticegc") == 0
2601  || strcmp(StdI->model, "kondogc") == 0) {
2602  strcpy(StdI->model, "kondo\0");
2603  StdI->lGC = 1;
2604  }
2605  else UnsupportedSystem(StdI->model, StdI->lattice);
2606 #if defined(_HPhi)
2607  /*
2608  Check the method
2609  */
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");
2616  }
2617  /*
2618  Compute vector potential and electrical field
2619  */
2620  if (strcmp(StdI->method, "timeevolution") == 0) VectorPotential(StdI);
2621 #endif
2622  /*>>
2623  Generate Hamiltonian definition files
2624  */
2625  if (strcmp(StdI->lattice, "chain") == 0
2626  || strcmp(StdI->lattice, "chainlattice") == 0) StdFace_Chain(StdI);
2627  else if (strcmp(StdI->lattice, "face-centeredorthorhombic") == 0
2628  || strcmp(StdI->lattice, "fcorthorhombic") == 0
2629  || strcmp(StdI->lattice, "fco") == 0) StdFace_FCOrtho(StdI);
2630  else if (strcmp(StdI->lattice, "honeycomb") == 0
2631  || strcmp(StdI->lattice, "honeycomblattice") == 0) StdFace_Honeycomb(StdI);
2632  else if (strcmp(StdI->lattice, "kagome") == 0
2633  || strcmp(StdI->lattice, "kagomelattice") == 0) StdFace_Kagome(StdI);
2634  else if (strcmp(StdI->lattice, "ladder") == 0
2635  || strcmp(StdI->lattice, "ladderlattice") == 0) StdFace_Ladder(StdI);
2636  else if (strcmp(StdI->lattice, "orthorhombic") == 0
2637  || strcmp(StdI->lattice, "simpleorthorhombic") == 0) StdFace_Orthorhombic(StdI);
2638  else if (strcmp(StdI->lattice, "pyrochlore") == 0) StdFace_Pyrochlore(StdI);
2639  else if (strcmp(StdI->lattice, "tetragonal") == 0
2640  || strcmp(StdI->lattice, "tetragonallattice") == 0
2641  || strcmp(StdI->lattice, "square") == 0
2642  || strcmp(StdI->lattice, "squarelattice") == 0) StdFace_Tetragonal(StdI);
2643  else if (strcmp(StdI->lattice, "triangular") == 0
2644  || strcmp(StdI->lattice, "triangularlattice") == 0) StdFace_Triangular(StdI);
2645  else if (strcmp(StdI->lattice, "wannier90") == 0) StdFace_Wannier90(StdI);
2646  else UnsupportedSystem(StdI->model, StdI->lattice);//<<
2647 
2648 #if defined(_HPhi)
2649  StdFace_LargeValue(StdI);
2650  /*
2651  Generate Hamiltonian for Boost
2652  */
2653  if (StdI->lBoost == 1) {
2654  if (strcmp(StdI->lattice, "chain") == 0
2655  || strcmp(StdI->lattice, "chainlattice") == 0) StdFace_Chain_Boost(StdI);
2656  else if (strcmp(StdI->lattice, "honeycomb") == 0
2657  || strcmp(StdI->lattice, "honeycomblattice") == 0) StdFace_Honeycomb_Boost(StdI);
2658  else if (strcmp(StdI->lattice, "kagome") == 0
2659  || strcmp(StdI->lattice, "kagomelattice") == 0) StdFace_Kagome_Boost(StdI);
2660  else if (strcmp(StdI->lattice, "ladder") == 0
2661  || strcmp(StdI->lattice, "ladderlattice") == 0) StdFace_Ladder_Boost(StdI);
2662  else UnsupportedSystem(StdI->model, StdI->lattice);
2663  }
2664 #endif
2665 
2666  fprintf(stdout, "\n");
2667  fprintf(stdout, "###### Print Expert input files ######\n");
2668  fprintf(stdout, "\n");
2669  PrintLocSpin(StdI);
2670  PrintTrans(StdI);
2671  PrintInteractions(StdI);
2672  CheckModPara(StdI);
2673  PrintModPara(StdI);
2674 #if defined(_HPhi)
2675  PrintExcitation(StdI);
2676  if (strcmp(StdI->method, "timeevolution") == 0) PrintPump(StdI);
2677  PrintCalcMod(StdI);
2678 #elif defined(_mVMC)
2679 
2680  if(StdI->lGC == 0 && (StdI->Sz2 == 0 || StdI->Sz2 == StdI->NaN_i))
2681  StdFace_PrintVal_i("ComplexType", &StdI->ComplexType, 0);
2682  else StdFace_PrintVal_i("ComplexType", &StdI->ComplexType, 1);
2683 
2684  StdFace_generate_orb(StdI);
2685  StdFace_Proj(StdI);
2686  PrintJastrow(StdI);
2687  if(StdI->lGC == 1 || (StdI->Sz2 != 0 && StdI->Sz2 != StdI->NaN_i) )
2688  PrintOrbPara(StdI);
2689  PrintGutzwiller(StdI);
2690  PrintOrb(StdI);
2691 #endif
2692  CheckOutputMode(StdI);
2693  Print1Green(StdI);
2694  Print2Green(StdI);
2695  PrintNamelist(StdI);
2696  /*
2697  Finalize All
2698  */
2699  free(StdI->locspinflag);
2700  for (ktrans = 0; ktrans < StdI->ntrans; ktrans++) {
2701  free(StdI->transindx[ktrans]);
2702  }
2703  free(StdI->transindx);
2704  free(StdI->trans);
2705  for (kintr = 0; kintr < StdI->nintr; kintr++) {
2706  free(StdI->intrindx[kintr]);
2707  }
2708  free(StdI->intrindx);
2709  free(StdI->intr);
2710 
2711  fprintf(stdout, "\n###### Input files are generated. ######\n\n");
2712  free(StdI);
2713 }/*void StdFace_main*/
static void StdFace_ResetVals(struct StdIntList *StdI)
Clear grobal variables in the standard mode All variables refered in this function is modified...
Definition: StdFace_main.c:845
void StdFace_Triangular(struct StdIntList *StdI)
Setup a Hamiltonian for the Triangular lattice.
double OmegaIm
Imaginary part of frequency.
Definition: StdFace_vals.h:290
static void PrintCalcMod(struct StdIntList *StdI)
Print calcmod.def.
Definition: StdFace_main.c:82
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...
char Restart[256]
The name of restart mode, input from file.
Definition: StdFace_vals.h:260
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.
Definition: StdFace_vals.h:83
double J0pp[3][3]
Isotropic, diagonal/off-diagonal spin coupling (3rd Near.), input parameter J0&#39;&#39;x, J0&#39;&#39;y, J0&#39;&#39;z, J0&#39;&#39;xy, etc. or set in StdFace_InputSpin().
Definition: StdFace_vals.h:122
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.
Definition: StdFace_vals.h:299
double Jp[3][3]
Isotropic, diagonal/off-diagonal spin coupling (2nd Near.), input parameter J&#39;x, J&#39;y, J&#39;z, J&#39;xy, etc.
Definition: StdFace_vals.h:114
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().
Definition: StdFace_vals.h:44
double complex t2p
Anisotropic hopping (2nd), input parameter.
Definition: StdFace_vals.h:71
double cutoff_t
Cutoof for the hopping in wannier90, input from file.
Definition: StdFace_vals.h:246
double J[3][3]
Isotropic, diagonal/off-diagonal spin coupling (1st Near.), input parameter Jx, Jy, Jz, Jxy, etc.
Definition: StdFace_vals.h:112
int L
Number of sites along the 2nd axis, input parameter.
Definition: StdFace_vals.h:40
static void CheckOutputMode(struct StdIntList *StdI)
Verify outputmode.
int ExpandCoef
The number of Hamiltonian-vector operation for the time-evolution.
Definition: StdFace_vals.h:315
double complex * intr
[StdIntList::nintr] Coefficient of general two-body term, malloc in StdFace_MallocInteractions() and ...
Definition: StdFace_vals.h:176
double D[3][3]
Coefficient for input parameter D. Only D[2][2] is used.
Definition: StdFace_vals.h:145
double J1p[3][3]
Isotropic, diagonal/off-diagonal spin coupling (2nd Near.), input parameter J1&#39;x, J1&#39;y...
Definition: StdFace_vals.h:128
void StdFace_Ladder_Boost(struct StdIntList *StdI)
Definition: Ladder.c:291
double J1ppAll
Anisotropic, diagonal spin coupling (3rd Near), input parameter J1&#39;&#39;.
Definition: StdFace_vals.h:102
int initial_iv
the number for generating random number, input from file.
Definition: StdFace_vals.h:266
double J2pp[3][3]
Isotropic, diagonal/off-diagonal spin coupling (3rd Near.), input parameter J2&#39;&#39;x, J2&#39;&#39;y, J2&#39;&#39;z, J2&#39;&#39;xy, etc. or set in StdFace_InputSpin().
Definition: StdFace_vals.h:140
int NumAve
Number of trials for TPQ calculation.
Definition: StdFace_vals.h:271
double JpAll
Isotropic, diagonal spin coupling (2nd Near), input parameter Jp.
Definition: StdFace_vals.h:90
void StdFace_Chain(struct StdIntList *StdI)
Setup a Hamiltonian for the Hubbard model on a Chain lattice.
Definition: ChainLattice.c:33
double J1[3][3]
Isotropic, diagonal/off-diagonal spin coupling (1st Near.), input parameter J1x, J1y, J1z, J1xy, etc. or set in StdFace_InputSpinNN().
Definition: StdFace_vals.h:125
double J2p[3][3]
Isotropic, diagonal/off-diagonal spin coupling (2nd Near.), input parameter J2&#39;x, J2&#39;y...
Definition: StdFace_vals.h:137
double complex * trans
[StdIntList::ntrans] Coefficient of one-body term, malloc in StdFace_MallocInteractions() and set in ...
Definition: StdFace_vals.h:168
char SpectrumType[256]
The type of mode for spectrum, input from file.
Definition: StdFace_vals.h:286
static void Text2Lower(char *value)
int cutoff_UR[3]
Definition: StdFace_vals.h:253
double complex t
Nearest-neighbor hopping, input parameter.
Definition: StdFace_vals.h:62
double JAll
Isotropic, diagonal spin coupling (1st Near.), input parameter J.
Definition: StdFace_vals.h:88
double dt
Time step.
Definition: StdFace_vals.h:298
static void PrintPump(struct StdIntList *StdI)
Print single.def or pair.def.
Definition: StdFace_main.c:566
int S2
Total spin |S| of a local spin, input from file.
Definition: StdFace_vals.h:236
int Nomega
Number of frequencies, input from file.
Definition: StdFace_vals.h:287
char CalcSpec[256]
The name of mode for spectrum, input from file.
Definition: StdFace_vals.h:285
double cutoff_j
Cutoof for the Hund in wannier90, input from file.
Definition: StdFace_vals.h:248
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.
Definition: StdFace_vals.h:98
void StdFace_Chain_Boost(struct StdIntList *StdI)
Setup a Hamiltonian for the generalized Heisenberg model on a Chain lattice.
Definition: ChainLattice.c:237
double V0p
Anisotropic Coulomb potential (2nd), input parameter.
Definition: StdFace_vals.h:78
double J1pp[3][3]
Isotropic, diagonal/off-diagonal spin coupling (3rd Near.), input parameter J1&#39;&#39;x, J1&#39;&#39;y, J1&#39;&#39;z, J1&#39;&#39;xy, etc. or set in StdFace_InputSpin().
Definition: StdFace_vals.h:131
double OmegaMax
Maximum of frequency for spectrum, input from file.
Definition: StdFace_vals.h:288
int W
Number of sites along the 1st axis, input parameter.
Definition: StdFace_vals.h:39
double VecPot[3]
Vector potential.
Definition: StdFace_vals.h:303
double V2p
Anisotropic Coulomb potential (2nd), input parameter.
Definition: StdFace_vals.h:84
double V2pp
Anisotropic Coulomb potential (3rd), input parameter.
Definition: StdFace_vals.h:85
double J2ppAll
Anisotropic, diagonal spin coupling (3rd Near), input parameter J2&#39;&#39;.
Definition: StdFace_vals.h:108
double complex tpp
3rd-nearest hopping, input parameter
Definition: StdFace_vals.h:73
int ntrans
Number of transfer, counted in each lattice file.
Definition: StdFace_vals.h:164
char model[256]
Name of model, input parameter.
Definition: StdFace_vals.h:60
static void PrintExcitation(struct StdIntList *StdI)
Print single.def or pair.def.
Definition: StdFace_main.c:274
double Gamma
Transvars magnetic field, input parameter.
Definition: StdFace_vals.h:148
char OutputExVec[256]
The name of output mode for the excited vector, input from file.
Definition: StdFace_vals.h:294
static void PrintModPara(struct StdIntList *StdI)
Print modpara.def.
double cutoff_length_J
Cutoof for R in wannier90, input from file.
Definition: StdFace_vals.h:251
double JppAll
Isotropic, diagonal spin coupling (3rd Near), input parameter J&#39;&#39;.
Definition: StdFace_vals.h:110
double complex t1pp
Anisotropic hopping (3rd), input parameter.
Definition: StdFace_vals.h:69
double V1
Anisotropic Coulomb potential (1st), input parameter.
Definition: StdFace_vals.h:80
double J0All
Anisotropic, diagonal spin coupling (1st Near), input parameter J0.
Definition: StdFace_vals.h:92
double J0[3][3]
Isotropic, diagonal/off-diagonal spin coupling (1st Near.), input parameter J0x, J0y, J0z, J0xy, etc. or set in StdFace_InputSpinNN().
Definition: StdFace_vals.h:116
double J0ppAll
Anisotropic, diagonal spin coupling (3rd Near), input parameter J0&#39;&#39;.
Definition: StdFace_vals.h:96
double U
On-site Coulomb potential, input parameter.
Definition: StdFace_vals.h:74
double complex t0p
Anisotropic hopping (2nd), input parameter.
Definition: StdFace_vals.h:65
char InitialVecType[256]
The name of initialguess-type, input from file.
Definition: StdFace_vals.h:261
double complex t2pp
Anisotropic hopping (3rd), input parameter.
Definition: StdFace_vals.h:72
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
Definition: StdFace_vals.h:291
double phase[3]
Boundary phase, input parameter phase0, etc.
Definition: StdFace_vals.h:154
int exct
The number of eigenvectors to be computed. input from file.
Definition: StdFace_vals.h:268
double V1pp
Anisotropic Coulomb potential (3rd), input parameter.
Definition: StdFace_vals.h:82
double tdump
Time scale of dumping.
Definition: StdFace_vals.h:300
double J0pAll
Anisotropic, diagonal spin coupling (2nd Near), input parameter J0&#39;.
Definition: StdFace_vals.h:94
double length[3]
Anisotropic lattice constant, input parameter wlength, llength, hlength.
Definition: StdFace_vals.h:37
int * locspinflag
[StdIntList::nsite] LocSpin in Expert mode, malloc and set in each lattice file.
Definition: StdFace_vals.h:162
double OmegaMin
Minimum of frequency for spectrum, input from file.
Definition: StdFace_vals.h:289
int LanczosTarget
Which eigenvector is used for the convergence check.
Definition: StdFace_vals.h:270
int cutoff_JR[3]
Definition: StdFace_vals.h:254
int LanczosEps
Convergence threshold for the Lanczos method.
Definition: StdFace_vals.h:269
double complex tp
2nd-nearest hopping, input parameter
Definition: StdFace_vals.h:63
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.
Definition: StdFace_vals.h:262
double Jpp[3][3]
Isotropic, diagonal/off-diagonal spin coupling (3rd Near.), input parameter J&#39;&#39;x, J&#39;&#39;y...
Definition: StdFace_vals.h:143
int Lanczos_max
The maxixmum number of iterations, input from file.
Definition: StdFace_vals.h:265
double complex t1
Anisotropic hopping (1st), input parameter.
Definition: StdFace_vals.h:67
double V
Off-site Coulomb potential (1st), input parameter.
Definition: StdFace_vals.h:75
double complex t0
Anisotropic hopping (1st), input parameter.
Definition: StdFace_vals.h:64
double direct[3][3]
The unit direct lattice vector. Set in StdFace_InitSite().
Definition: StdFace_vals.h:42
char HamIO[256]
The name of I/O mode for Hamiltonian, input from file.
Definition: StdFace_vals.h:263
static void PrintTrans(struct StdIntList *StdI)
Print the transfer file.
double complex t0pp
Anisotropic hopping (3rd), input parameter.
Definition: StdFace_vals.h:66
double V0
Anisotropic Coulomb potential (1st), input parameter.
Definition: StdFace_vals.h:77
double cutoff_length_t
Cutoof for R in wannier90, input from file.
Definition: StdFace_vals.h:249
void StdFace_Kagome_Boost(struct StdIntList *StdI)
Definition: Kagome.c:367
double Vpp
Off-site Coulomb potential (3rd), input parameter.
Definition: StdFace_vals.h:86
double complex t1p
Anisotropic hopping (2nd), input parameter.
Definition: StdFace_vals.h:68
void StdFace_Kagome(struct StdIntList *StdI)
Setup a Hamiltonian for the Kagome lattice.
Definition: Kagome.c:33
char method[256]
The name of method, input from file.
Definition: StdFace_vals.h:259
double complex t2
Anisotropic hopping (1st), input parameter.
Definition: StdFace_vals.h:70
int lGC
Switch for computing Grandcanonical ensemble(== 1). Setted in StdFace_main() after all keywords are r...
Definition: StdFace_vals.h:233
double LargeValue
The shift parameter for the TPQ calculation.
Definition: StdFace_vals.h:274
char PumpType[256]
The type of pump.
Definition: StdFace_vals.h:304
void StdFace_Honeycomb_Boost(struct StdIntList *StdI)
void StdFace_Orthorhombic(struct StdIntList *StdI)
Setup a Hamiltonian for the Simple Orthorhombic lattice.
Definition: Orthorhombic.c:33
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...
Definition: StdFace_vals.h:173
double mu
Chemical potential, input parameter.
Definition: StdFace_vals.h:61
int Sz2
Total Sz, input from file.
Definition: StdFace_vals.h:241
double cutoff_length_U
Cutoof for R in wannier90, input from file.
Definition: StdFace_vals.h:250
double Vp
Off-site Coulomb potential (2nd), input parameter.
Definition: StdFace_vals.h:76
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&#39;.
Definition: StdFace_vals.h:100
static void Print1Green(struct StdIntList *StdI)
Print greenone.def.
void StdFace_Tetragonal(struct StdIntList *StdI)
Setup a Hamiltonian for the square lattice.
Definition: SquareLattice.c:33
int ** transindx
[StdIntList::ntrans][4] Site/spin indices of one-body term, malloc in StdFace_MallocInteractions() an...
Definition: StdFace_vals.h:165
double J2All
Anisotropic, diagonal spin coupling (1st Near), input parameter J2.
Definition: StdFace_vals.h:104
int Height
Number of sites along the 3rd axis, input parameter.
Definition: StdFace_vals.h:41
static void CheckModPara(struct StdIntList *StdI)
Summary numerical parameter check the combination of the number of sites, total spin, the number of electrons.
int cutoff_tR[3]
Definition: StdFace_vals.h:252
double V0pp
Anisotropic Coulomb potential (3rd), input parameter.
Definition: StdFace_vals.h:79
static void StdFace_LargeValue(struct StdIntList *StdI)
Set Largevalue (StdIntList::LargeValue) for TPQ. Sum absolute-value of all one- and two- body terms...
Definition: StdFace_main.c:49
static void PrintLocSpin(struct StdIntList *StdI)
Print the locspin file.
char lattice[256]
Name of lattice. Input parameter.
Definition: StdFace_vals.h:35
int nintr
Number of InterAll, counted in each lattice file.
Definition: StdFace_vals.h:171
char outputmode[256]
Select amount of correlation function, input from file.
Definition: StdFace_vals.h:237
double Uquench
Quenched on-site potential.
Definition: StdFace_vals.h:302
double h
Longitudinal magnetic field, input parameter.
Definition: StdFace_vals.h:147
double a
The lattice constant. Input parameter.
Definition: StdFace_vals.h:36
void StdFace_Pyrochlore(struct StdIntList *StdI)
Setup a Hamiltonian for the Pyrochlore structure.
Definition: Pyrochlore.c:33
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().
Definition: StdFace_vals.h:134
void StdFace_FCOrtho(struct StdIntList *StdI)
Setup a Hamiltonian for the Face-Centered Orthorhombic lattice.
Definition: FCOrtho.c:33
void StdFace_Ladder(struct StdIntList *StdI)
Setup a Hamiltonian for the generalized Heisenberg model on a square lattice.
Definition: Ladder.c:33
int nelec
Number of electrons, input from file.
Definition: StdFace_vals.h:235
double freq
Frequency of laser.
Definition: StdFace_vals.h:301
int NaN_i
It is used for initializing input parameter. This means that a parameter wich is not specified in inp...
Definition: StdFace_vals.h:28
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.
Definition: Wannier90.c:342
int ExpecInterval
Interval for the iteration when the expectation value is computed.
Definition: StdFace_vals.h:272
double J2pAll
Anisotropic, diagonal spin coupling (2nd Near), input parameter J2&#39;.
Definition: StdFace_vals.h:106
double J0p[3][3]
Isotropic, diagonal/off-diagonal spin coupling (2nd Near.), input parameter J0&#39;x, J0&#39;y...
Definition: StdFace_vals.h:119
void StdFace_exit(int errorcode)
MPI Abortation wrapper.
char CDataFileHead[256]
Header of the output files. Input from file.
Definition: StdFace_vals.h:239
double cutoff_u
Cutoof for the Coulomb in wannier90, input from file.
Definition: StdFace_vals.h:247
static void VectorPotential(struct StdIntList *StdI)
Definition: StdFace_main.c:469
double V1p
Anisotropic Coulomb potential (2nd), input parameter.
Definition: StdFace_vals.h:81
double K
4-spin term. Not used.
Definition: StdFace_vals.h:149
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ StdFace_ResetVals()

static void StdFace_ResetVals ( struct StdIntList StdI)
static

Clear grobal variables in the standard mode All variables refered in this function is modified.

Author
Mitsuaki Kawamura (The University of Tokyo)

Definition at line 845 of file StdFace_main.c.

References StdIntList::a, StdIntList::box, StdIntList::CalcSpec, StdIntList::CDataFileHead, StdIntList::cutoff_j, StdIntList::cutoff_JR, StdIntList::cutoff_length_J, StdIntList::cutoff_length_t, StdIntList::cutoff_length_U, StdIntList::cutoff_t, StdIntList::cutoff_tR, StdIntList::cutoff_u, StdIntList::cutoff_UR, StdIntList::D, StdIntList::direct, StdIntList::dt, StdIntList::EigenVecIO, StdIntList::exct, StdIntList::ExpandCoef, StdIntList::ExpecInterval, StdIntList::FlgTemp, StdIntList::freq, StdIntList::Gamma, StdIntList::h, StdIntList::HamIO, StdIntList::Height, StdIntList::initial_iv, StdIntList::InitialVecType, StdIntList::J, StdIntList::J0, StdIntList::J0All, StdIntList::J0p, StdIntList::J0pAll, StdIntList::J0pp, StdIntList::J0ppAll, StdIntList::J1, StdIntList::J1All, StdIntList::J1p, StdIntList::J1pAll, StdIntList::J1pp, StdIntList::J1ppAll, StdIntList::J2, StdIntList::J2All, StdIntList::J2p, StdIntList::J2pAll, StdIntList::J2pp, StdIntList::J2ppAll, StdIntList::JAll, StdIntList::Jp, StdIntList::JpAll, StdIntList::Jpp, StdIntList::JppAll, StdIntList::K, StdIntList::L, StdIntList::Lanczos_max, StdIntList::LanczosEps, StdIntList::LanczosTarget, StdIntList::LargeValue, StdIntList::lattice, StdIntList::length, StdIntList::method, StdIntList::model, StdIntList::mu, StdIntList::NaN_i, StdIntList::nelec, StdIntList::Nomega, StdIntList::NumAve, StdIntList::nvec, StdIntList::OmegaIm, StdIntList::OmegaMax, StdIntList::OmegaMin, StdIntList::OutputExVec, StdIntList::outputmode, StdIntList::phase, StdIntList::pi, StdIntList::pi180, StdIntList::PumpType, StdIntList::Restart, StdIntList::S2, StdIntList::SpectrumQ, StdIntList::SpectrumType, StdIntList::Sz2, StdIntList::t, StdIntList::t0, StdIntList::t0p, StdIntList::t0pp, StdIntList::t1, StdIntList::t1p, StdIntList::t1pp, StdIntList::t2, StdIntList::t2p, StdIntList::t2pp, StdIntList::tdump, StdIntList::tp, StdIntList::tpp, StdIntList::tshift, StdIntList::U, StdIntList::Uquench, StdIntList::V, StdIntList::V0, StdIntList::V0p, StdIntList::V0pp, StdIntList::V1, StdIntList::V1p, StdIntList::V1pp, StdIntList::V2, StdIntList::V2p, StdIntList::V2pp, StdIntList::VecPot, StdIntList::Vp, StdIntList::Vpp, and StdIntList::W.

Referenced by StdFace_main().

845  {
846  int i, j;
847  double NaN_d;
848  /*
849  NaN is used for not inputed variable
850  */
851  NaN_d = 0.0 / 0.0;
852  StdI->NaN_i = 2147483647;
853  StdI->pi = acos(-1.0);
854 
855  StdI->a = NaN_d;
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++)
859  StdI->box[i][j] = StdI->NaN_i;
860  StdI->Gamma = NaN_d;
861  StdI->h = NaN_d;
862  StdI->Height = StdI->NaN_i;
863  StdI->JAll = NaN_d;
864  StdI->JpAll = NaN_d;
865  StdI->JpAll = NaN_d;
866  StdI->JppAll = NaN_d;
867  StdI->J0All = NaN_d;
868  StdI->J0pAll = NaN_d;
869  StdI->J0ppAll = NaN_d;
870  StdI->J1All = NaN_d;
871  StdI->J1pAll = NaN_d;
872  StdI->J1ppAll = NaN_d;
873  StdI->J2All = NaN_d;
874  StdI->J2pAll = NaN_d;
875  StdI->J2ppAll = NaN_d;
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;
890  StdI->D[i][j] = 0.0;
891  }
892  }
893  StdI->D[2][2] = NaN_d;
894  StdI->K = NaN_d;
895  StdI->L = StdI->NaN_i;
896  for (i = 0; i < 3; i++)
897  for (j = 0; j < 3; j++)
898  StdI->direct[i][j] = NaN_d;
899  StdI->mu = NaN_d;
900  StdI->S2 = StdI->NaN_i;
901  StdI->t = NaN_d;
902  StdI->tp = NaN_d;
903  StdI->tpp = NaN_d;
904  StdI->t0 = NaN_d;
905  StdI->t0p = NaN_d;
906  StdI->t0pp = NaN_d;
907  StdI->t1 = NaN_d;
908  StdI->t1p = NaN_d;
909  StdI->t1pp = NaN_d;
910  StdI->t2 = NaN_d;
911  StdI->t2p = NaN_d;
912  StdI->t2pp = NaN_d;
913  StdI->U = NaN_d;
914  StdI->V = NaN_d;
915  StdI->Vp = NaN_d;
916  StdI->Vpp = NaN_d;
917  StdI->V0 = NaN_d;
918  StdI->V0p = NaN_d;
919  StdI->V0pp = NaN_d;
920  StdI->V1 = NaN_d;
921  StdI->V1p = NaN_d;
922  StdI->V1pp = NaN_d;
923  StdI->V2 = NaN_d;
924  StdI->V2p = NaN_d;
925  StdI->V2pp = NaN_d;
926  StdI->W = StdI->NaN_i;
927  for (i = 0; i < 3; i++)StdI->phase[i] = NaN_d;
928  StdI->pi180 = StdI->pi / 180.0;
929 
930  StdI->nelec = StdI->NaN_i;
931  StdI->Sz2 = StdI->NaN_i;
932  strcpy(StdI->model, "****\0");
933  strcpy(StdI->lattice, "****\0");
934  strcpy(StdI->outputmode, "****\0");
935  strcpy(StdI->CDataFileHead, "****\0");
936  StdI->cutoff_t = NaN_d;
937  StdI->cutoff_u = NaN_d;
938  StdI->cutoff_j = NaN_d;
939  StdI->cutoff_length_t = NaN_d;
940  StdI->cutoff_length_U = NaN_d;
941  StdI->cutoff_length_J = NaN_d;
942  for (i = 0; i < 3; i++)StdI->cutoff_tR[i] = StdI->NaN_i;
943  for (i = 0; i < 3; i++)StdI->cutoff_UR[i] = StdI->NaN_i;
944  for (i = 0; i < 3; i++)StdI->cutoff_JR[i] = StdI->NaN_i;
945 #if defined(_HPhi)
946  StdI->LargeValue = NaN_d;
947  StdI->OmegaMax = NaN_d;
948  StdI->OmegaMin = NaN_d;
949  StdI->OmegaIm = NaN_d;
950  StdI->Nomega = StdI->NaN_i;
951  for (i = 0; i < 3; i++)StdI->SpectrumQ[i] = NaN_d;
952  strcpy(StdI->method, "****\0");
953  strcpy(StdI->Restart, "****\0");
954  strcpy(StdI->EigenVecIO, "****\0");
955  strcpy(StdI->InitialVecType, "****\0");
956  strcpy(StdI->HamIO, "****\0");
957  strcpy(StdI->CalcSpec, "****\0");
958  strcpy(StdI->SpectrumType, "****\0");
959  strcpy(StdI->OutputExVec, "****\0");
960  StdI->FlgTemp = 1;
961  StdI->Lanczos_max = StdI->NaN_i;
962  StdI->initial_iv = StdI->NaN_i;
963  StdI->nvec = StdI->NaN_i;
964  StdI->exct = StdI->NaN_i;
965  StdI->LanczosEps = StdI->NaN_i;
966  StdI->LanczosTarget = StdI->NaN_i;
967  StdI->NumAve = StdI->NaN_i;
968  StdI->ExpecInterval = StdI->NaN_i;
969  StdI->dt = NaN_d;
970  StdI->tdump = NaN_d;
971  StdI->tshift = NaN_d;
972  StdI->freq = NaN_d;
973  StdI->Uquench = NaN_d;
974  for (i = 0; i < 3; i++)StdI->VecPot[i] = NaN_d;;
975  strcpy(StdI->PumpType, "****\0");
976  StdI->ExpandCoef = StdI->NaN_i;
977 #elif defined(_mVMC)
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;
1006 #endif
1007 }/*static void StdFace_ResetVals*/
double OmegaIm
Imaginary part of frequency.
Definition: StdFace_vals.h:290
char Restart[256]
The name of restart mode, input from file.
Definition: StdFace_vals.h:260
double V2
Anisotropic Coulomb potential (1st), input parameter.
Definition: StdFace_vals.h:83
double J0pp[3][3]
Isotropic, diagonal/off-diagonal spin coupling (3rd Near.), input parameter J0&#39;&#39;x, J0&#39;&#39;y, J0&#39;&#39;z, J0&#39;&#39;xy, etc. or set in StdFace_InputSpin().
Definition: StdFace_vals.h:122
double tshift
Shift of time-step of laser.
Definition: StdFace_vals.h:299
double Jp[3][3]
Isotropic, diagonal/off-diagonal spin coupling (2nd Near.), input parameter J&#39;x, J&#39;y, J&#39;z, J&#39;xy, etc.
Definition: StdFace_vals.h:114
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().
Definition: StdFace_vals.h:44
double complex t2p
Anisotropic hopping (2nd), input parameter.
Definition: StdFace_vals.h:71
double cutoff_t
Cutoof for the hopping in wannier90, input from file.
Definition: StdFace_vals.h:246
double J[3][3]
Isotropic, diagonal/off-diagonal spin coupling (1st Near.), input parameter Jx, Jy, Jz, Jxy, etc.
Definition: StdFace_vals.h:112
int L
Number of sites along the 2nd axis, input parameter.
Definition: StdFace_vals.h:40
int ExpandCoef
The number of Hamiltonian-vector operation for the time-evolution.
Definition: StdFace_vals.h:315
double D[3][3]
Coefficient for input parameter D. Only D[2][2] is used.
Definition: StdFace_vals.h:145
double J1p[3][3]
Isotropic, diagonal/off-diagonal spin coupling (2nd Near.), input parameter J1&#39;x, J1&#39;y...
Definition: StdFace_vals.h:128
double pi180
, set in StdFace_ResetVals().
Definition: StdFace_vals.h:153
double J1ppAll
Anisotropic, diagonal spin coupling (3rd Near), input parameter J1&#39;&#39;.
Definition: StdFace_vals.h:102
int initial_iv
the number for generating random number, input from file.
Definition: StdFace_vals.h:266
double J2pp[3][3]
Isotropic, diagonal/off-diagonal spin coupling (3rd Near.), input parameter J2&#39;&#39;x, J2&#39;&#39;y, J2&#39;&#39;z, J2&#39;&#39;xy, etc. or set in StdFace_InputSpin().
Definition: StdFace_vals.h:140
int NumAve
Number of trials for TPQ calculation.
Definition: StdFace_vals.h:271
double JpAll
Isotropic, diagonal spin coupling (2nd Near), input parameter Jp.
Definition: StdFace_vals.h:90
double J1[3][3]
Isotropic, diagonal/off-diagonal spin coupling (1st Near.), input parameter J1x, J1y, J1z, J1xy, etc. or set in StdFace_InputSpinNN().
Definition: StdFace_vals.h:125
double J2p[3][3]
Isotropic, diagonal/off-diagonal spin coupling (2nd Near.), input parameter J2&#39;x, J2&#39;y...
Definition: StdFace_vals.h:137
char SpectrumType[256]
The type of mode for spectrum, input from file.
Definition: StdFace_vals.h:286
int cutoff_UR[3]
Definition: StdFace_vals.h:253
double complex t
Nearest-neighbor hopping, input parameter.
Definition: StdFace_vals.h:62
double JAll
Isotropic, diagonal spin coupling (1st Near.), input parameter J.
Definition: StdFace_vals.h:88
double dt
Time step.
Definition: StdFace_vals.h:298
int S2
Total spin |S| of a local spin, input from file.
Definition: StdFace_vals.h:236
int Nomega
Number of frequencies, input from file.
Definition: StdFace_vals.h:287
char CalcSpec[256]
The name of mode for spectrum, input from file.
Definition: StdFace_vals.h:285
double cutoff_j
Cutoof for the Hund in wannier90, input from file.
Definition: StdFace_vals.h:248
double J1All
Anisotropic, diagonal spin coupling (1st Near), input parameter J1.
Definition: StdFace_vals.h:98
double V0p
Anisotropic Coulomb potential (2nd), input parameter.
Definition: StdFace_vals.h:78
double J1pp[3][3]
Isotropic, diagonal/off-diagonal spin coupling (3rd Near.), input parameter J1&#39;&#39;x, J1&#39;&#39;y, J1&#39;&#39;z, J1&#39;&#39;xy, etc. or set in StdFace_InputSpin().
Definition: StdFace_vals.h:131
double OmegaMax
Maximum of frequency for spectrum, input from file.
Definition: StdFace_vals.h:288
int W
Number of sites along the 1st axis, input parameter.
Definition: StdFace_vals.h:39
double VecPot[3]
Vector potential.
Definition: StdFace_vals.h:303
double V2p
Anisotropic Coulomb potential (2nd), input parameter.
Definition: StdFace_vals.h:84
double V2pp
Anisotropic Coulomb potential (3rd), input parameter.
Definition: StdFace_vals.h:85
double J2ppAll
Anisotropic, diagonal spin coupling (3rd Near), input parameter J2&#39;&#39;.
Definition: StdFace_vals.h:108
double complex tpp
3rd-nearest hopping, input parameter
Definition: StdFace_vals.h:73
char model[256]
Name of model, input parameter.
Definition: StdFace_vals.h:60
double Gamma
Transvars magnetic field, input parameter.
Definition: StdFace_vals.h:148
char OutputExVec[256]
The name of output mode for the excited vector, input from file.
Definition: StdFace_vals.h:294
double cutoff_length_J
Cutoof for R in wannier90, input from file.
Definition: StdFace_vals.h:251
double JppAll
Isotropic, diagonal spin coupling (3rd Near), input parameter J&#39;&#39;.
Definition: StdFace_vals.h:110
double complex t1pp
Anisotropic hopping (3rd), input parameter.
Definition: StdFace_vals.h:69
double V1
Anisotropic Coulomb potential (1st), input parameter.
Definition: StdFace_vals.h:80
double J0All
Anisotropic, diagonal spin coupling (1st Near), input parameter J0.
Definition: StdFace_vals.h:92
double J0[3][3]
Isotropic, diagonal/off-diagonal spin coupling (1st Near.), input parameter J0x, J0y, J0z, J0xy, etc. or set in StdFace_InputSpinNN().
Definition: StdFace_vals.h:116
double J0ppAll
Anisotropic, diagonal spin coupling (3rd Near), input parameter J0&#39;&#39;.
Definition: StdFace_vals.h:96
double U
On-site Coulomb potential, input parameter.
Definition: StdFace_vals.h:74
double complex t0p
Anisotropic hopping (2nd), input parameter.
Definition: StdFace_vals.h:65
char InitialVecType[256]
The name of initialguess-type, input from file.
Definition: StdFace_vals.h:261
double complex t2pp
Anisotropic hopping (3rd), input parameter.
Definition: StdFace_vals.h:72
double SpectrumQ[3]
wavenumver (q-vector) in fractional coordinate
Definition: StdFace_vals.h:291
double phase[3]
Boundary phase, input parameter phase0, etc.
Definition: StdFace_vals.h:154
int exct
The number of eigenvectors to be computed. input from file.
Definition: StdFace_vals.h:268
double V1pp
Anisotropic Coulomb potential (3rd), input parameter.
Definition: StdFace_vals.h:82
double tdump
Time scale of dumping.
Definition: StdFace_vals.h:300
double J0pAll
Anisotropic, diagonal spin coupling (2nd Near), input parameter J0&#39;.
Definition: StdFace_vals.h:94
double length[3]
Anisotropic lattice constant, input parameter wlength, llength, hlength.
Definition: StdFace_vals.h:37
double OmegaMin
Minimum of frequency for spectrum, input from file.
Definition: StdFace_vals.h:289
int LanczosTarget
Which eigenvector is used for the convergence check.
Definition: StdFace_vals.h:270
int cutoff_JR[3]
Definition: StdFace_vals.h:254
int LanczosEps
Convergence threshold for the Lanczos method.
Definition: StdFace_vals.h:269
double complex tp
2nd-nearest hopping, input parameter
Definition: StdFace_vals.h:63
char EigenVecIO[256]
The name of I/O mode for eigenvector, input from file.
Definition: StdFace_vals.h:262
double Jpp[3][3]
Isotropic, diagonal/off-diagonal spin coupling (3rd Near.), input parameter J&#39;&#39;x, J&#39;&#39;y...
Definition: StdFace_vals.h:143
double pi
Definition: StdFace_vals.h:31
int Lanczos_max
The maxixmum number of iterations, input from file.
Definition: StdFace_vals.h:265
double complex t1
Anisotropic hopping (1st), input parameter.
Definition: StdFace_vals.h:67
double V
Off-site Coulomb potential (1st), input parameter.
Definition: StdFace_vals.h:75
double complex t0
Anisotropic hopping (1st), input parameter.
Definition: StdFace_vals.h:64
double direct[3][3]
The unit direct lattice vector. Set in StdFace_InitSite().
Definition: StdFace_vals.h:42
char HamIO[256]
The name of I/O mode for Hamiltonian, input from file.
Definition: StdFace_vals.h:263
double complex t0pp
Anisotropic hopping (3rd), input parameter.
Definition: StdFace_vals.h:66
double V0
Anisotropic Coulomb potential (1st), input parameter.
Definition: StdFace_vals.h:77
double cutoff_length_t
Cutoof for R in wannier90, input from file.
Definition: StdFace_vals.h:249
double Vpp
Off-site Coulomb potential (3rd), input parameter.
Definition: StdFace_vals.h:86
double complex t1p
Anisotropic hopping (2nd), input parameter.
Definition: StdFace_vals.h:68
char method[256]
The name of method, input from file.
Definition: StdFace_vals.h:259
double complex t2
Anisotropic hopping (1st), input parameter.
Definition: StdFace_vals.h:70
double LargeValue
The shift parameter for the TPQ calculation.
Definition: StdFace_vals.h:274
char PumpType[256]
The type of pump.
Definition: StdFace_vals.h:304
double mu
Chemical potential, input parameter.
Definition: StdFace_vals.h:61
int Sz2
Total Sz, input from file.
Definition: StdFace_vals.h:241
double cutoff_length_U
Cutoof for R in wannier90, input from file.
Definition: StdFace_vals.h:250
double Vp
Off-site Coulomb potential (2nd), input parameter.
Definition: StdFace_vals.h:76
double J1pAll
Anisotropic, diagonal spin coupling (2nd Near), input parameter J1&#39;.
Definition: StdFace_vals.h:100
double J2All
Anisotropic, diagonal spin coupling (1st Near), input parameter J2.
Definition: StdFace_vals.h:104
int Height
Number of sites along the 3rd axis, input parameter.
Definition: StdFace_vals.h:41
int cutoff_tR[3]
Definition: StdFace_vals.h:252
double V0pp
Anisotropic Coulomb potential (3rd), input parameter.
Definition: StdFace_vals.h:79
char lattice[256]
Name of lattice. Input parameter.
Definition: StdFace_vals.h:35
char outputmode[256]
Select amount of correlation function, input from file.
Definition: StdFace_vals.h:237
double Uquench
Quenched on-site potential.
Definition: StdFace_vals.h:302
double h
Longitudinal magnetic field, input parameter.
Definition: StdFace_vals.h:147
double a
The lattice constant. Input parameter.
Definition: StdFace_vals.h:36
double J2[3][3]
Isotropic, diagonal/off-diagonal spin coupling (1st Near.), input parameter J2x, J2y, J2z, J2xy, etc. or set in StdFace_InputSpinNN().
Definition: StdFace_vals.h:134
int nelec
Number of electrons, input from file.
Definition: StdFace_vals.h:235
double freq
Frequency of laser.
Definition: StdFace_vals.h:301
int NaN_i
It is used for initializing input parameter. This means that a parameter wich is not specified in inp...
Definition: StdFace_vals.h:28
int ExpecInterval
Interval for the iteration when the expectation value is computed.
Definition: StdFace_vals.h:272
double J2pAll
Anisotropic, diagonal spin coupling (2nd Near), input parameter J2&#39;.
Definition: StdFace_vals.h:106
double J0p[3][3]
Isotropic, diagonal/off-diagonal spin coupling (2nd Near.), input parameter J0&#39;x, J0&#39;y...
Definition: StdFace_vals.h:119
char CDataFileHead[256]
Header of the output files. Input from file.
Definition: StdFace_vals.h:239
double cutoff_u
Cutoof for the Coulomb in wannier90, input from file.
Definition: StdFace_vals.h:247
double V1p
Anisotropic Coulomb potential (2nd), input parameter.
Definition: StdFace_vals.h:81
double K
4-spin term. Not used.
Definition: StdFace_vals.h:149
+ Here is the caller graph for this function:

◆ StoreWithCheckDup_c()

static void StoreWithCheckDup_c ( char *  keyword,
char *  valuestring,
double complex *  value 
)
static

Store an input value into the valiable (Double complex) If duplicated, HPhi will stop.

Author
Mitsuaki Kawamura (The University of Tokyo)
Parameters
[in]keywordkeyword read from the input file
[in]valuestringvalue read from the input file
[out]value

Definition at line 1137 of file StdFace_main.c.

References StdFace_exit().

Referenced by StdFace_main().

1142 {
1143  int num;
1144  char *valuestring_r, *valuestring_i;
1145  double value_r, value_i;
1146 
1147  if (isnan(creal(*value)) == 0) {
1148  fprintf(stdout, "ERROR ! Keyword %s is duplicated ! \n", keyword);
1149  StdFace_exit(-1);
1150  }
1151  else {
1152 
1153  if (valuestring[0] == ',') {
1154  valuestring_r = NULL;
1155  valuestring_i = strtok(valuestring, ",");
1156  }
1157  else {
1158  valuestring_r = strtok(valuestring, ",");
1159  valuestring_i = strtok(NULL, ",");
1160  }
1161 
1162  if (valuestring_r == NULL) {
1163  *value = 0.0;
1164  }
1165  else {
1166  num = sscanf(valuestring_r, "%lf", &value_r);
1167  if (num == 1) *value = value_r;
1168  else *value = 0.0;
1169  }
1170 
1171  if (valuestring_i == NULL) {
1172  *value += I * 0.0;
1173  }
1174  else {
1175  num = sscanf(valuestring_i, "%lf", &value_i);
1176  if (num == 1) *value += I * value_i;
1177  else *value += I * 0.0;
1178  }
1179  }
1180 }/*static void StoreWithCheckDup_c*/
void StdFace_exit(int errorcode)
MPI Abortation wrapper.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ StoreWithCheckDup_d()

static void StoreWithCheckDup_d ( char *  keyword,
char *  valuestring,
double *  value 
)
static

Store an input value into the valiable (double) If duplicated, HPhi will stop.

Author
Mitsuaki Kawamura (The University of Tokyo)
Parameters
[in]keywordkeyword read from the input file
[in]valuestringvalue read from the input file
[out]value

Definition at line 1118 of file StdFace_main.c.

References StdFace_exit().

Referenced by StdFace_main().

1123 {
1124  if (isnan(*value) == 0){
1125  fprintf(stdout, "ERROR ! Keyword %s is duplicated ! \n", keyword);
1126  StdFace_exit(-1);
1127  }
1128  else{
1129  sscanf(valuestring, "%lf", value);
1130  }
1131 }/*static void StoreWithCheckDup_d*/
void StdFace_exit(int errorcode)
MPI Abortation wrapper.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ StoreWithCheckDup_i()

static void StoreWithCheckDup_i ( char *  keyword,
char *  valuestring,
int *  value 
)
static

Store an input value into the valiable (integer) If duplicated, HPhi will stop.

Author
Mitsuaki Kawamura (The University of Tokyo)
Parameters
[in]keywordkeyword read from the input file
[in]valuestringvalue read from the input file
[out]value

Definition at line 1097 of file StdFace_main.c.

References StdFace_exit().

Referenced by StdFace_main().

1102 {
1103  int NaN_i = 2147483647;
1104 
1105  if (*value != NaN_i){
1106  fprintf(stdout, "ERROR ! Keyword %s is duplicated ! \n", keyword);
1107  StdFace_exit(-1);
1108  }
1109  else{
1110  sscanf(valuestring, "%d", value);
1111  }
1112 }/*static void StoreWithCheckDup_i*/
int NaN_i
It is used for initializing input parameter. This means that a parameter wich is not specified in inp...
Definition: StdFace_vals.h:28
void StdFace_exit(int errorcode)
MPI Abortation wrapper.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ StoreWithCheckDup_s()

static void StoreWithCheckDup_s ( char *  keyword,
char *  valuestring,
char *  value 
)
static

Store an input value into the valiable (string) If duplicated, HPhi will stop.

Author
Mitsuaki Kawamura (The University of Tokyo)
Parameters
[in]keywordkeyword read from the input file
[in]valuestringvalue read from the input file
[out]value

Definition at line 1058 of file StdFace_main.c.

References StdFace_exit().

Referenced by StdFace_main().

1063 {
1064  if (strcmp(value, "****") != 0){
1065  fprintf(stdout, "ERROR ! Keyword %s is duplicated ! \n", keyword);
1066  StdFace_exit(-1);
1067  }
1068  else{
1069  strcpy(value, valuestring);
1070  }
1071 }/*static void StoreWithCheckDup_s*/
void StdFace_exit(int errorcode)
MPI Abortation wrapper.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ StoreWithCheckDup_sl()

static void StoreWithCheckDup_sl ( char *  keyword,
char *  valuestring,
char *  value 
)
static

Store an input value into the valiable (string) Force string lower. If duplicated, HPhi will stop.

Author
Mitsuaki Kawamura (The University of Tokyo)
Parameters
[in]keywordkeyword read from the input file
[in]valuestringvalue read from the input file
[out]value

Definition at line 1077 of file StdFace_main.c.

References StdFace_exit(), and Text2Lower().

Referenced by StdFace_main().

1082 {
1083  if (strcmp(value, "****") != 0) {
1084  fprintf(stdout, "ERROR ! Keyword %s is duplicated ! \n", keyword);
1085  StdFace_exit(-1);
1086  }
1087  else {
1088  strcpy(value, valuestring);
1089  Text2Lower(value);
1090  }
1091 }/*static void StoreWithCheckDup_sl*/
static void Text2Lower(char *value)
void StdFace_exit(int errorcode)
MPI Abortation wrapper.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Text2Lower()

static void Text2Lower ( char *  value)
static
Parameters
[in,out]value

Definition at line 1012 of file StdFace_main.c.

Referenced by StdFace_main(), and StoreWithCheckDup_sl().

1013  {
1014  char value2;
1015  int valuelen, ii;
1016 
1017  valuelen = strlen(value);
1018  for (ii = 0; ii < valuelen; ii++) {
1019  value2 = tolower(value[ii]);
1020  value[ii] = value2;
1021  }
1022 }/*static void Text2Lower*/
+ Here is the caller graph for this function:

◆ TrimSpaceQuote()

static void TrimSpaceQuote ( char *  value)
static

Remove : space etc. from keyword and value in an iput file.

Author
Mitsuaki Kawamura (The University of Tokyo)
Parameters
[in,out]value

Definition at line 1027 of file StdFace_main.c.

Referenced by StdFace_main().

1028  {
1029  char value2[256];
1030  int valuelen, valuelen2, ii;
1031 
1032  valuelen = strlen(value);
1033  valuelen2 = 0;
1034  for (ii = 0; ii < valuelen; ii++){
1035  if (value[ii] != ' ' &&
1036  value[ii] != ':' &&
1037  value[ii] != ';' &&
1038  value[ii] != '\"' &&
1039  value[ii] != '\b' &&
1040  value[ii] != '\\' &&
1041  value[ii] != '\v' &&
1042  value[ii] != '\n' &&
1043  value[ii] != '\0'){
1044  value2[valuelen2] = value[ii];
1045  valuelen2++;
1046  }
1047  }
1048 
1049  strncpy(value, value2, valuelen2);
1050  value[valuelen2] = '\0';
1051 
1052 }/*static void TrimSpaceQuote*/
+ Here is the caller graph for this function:

◆ UnsupportedSystem()

static void UnsupportedSystem ( char *  model,
char *  lattice 
)
static

Stop HPhi if unsupported model is read.

Author
Mitsuaki Kawamura (The University of Tokyo)
Parameters
[in]model
[in]lattice

Definition at line 1666 of file StdFace_main.c.

References StdFace_exit().

Referenced by StdFace_main().

1670 {
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");
1676  StdFace_exit(-1);
1677 }/*static void UnsupportedSystem*/
char model[256]
Name of model, input parameter.
Definition: StdFace_vals.h:60
char lattice[256]
Name of lattice. Input parameter.
Definition: StdFace_vals.h:35
void StdFace_exit(int errorcode)
MPI Abortation wrapper.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ VectorPotential()

static void VectorPotential ( struct StdIntList StdI)
static

Definition at line 469 of file StdFace_main.c.

References StdIntList::At, StdIntList::dt, StdIntList::ExpandCoef, StdIntList::freq, StdIntList::Lanczos_max, StdIntList::PumpBody, StdIntList::PumpType, StdFace_exit(), StdFace_PrintVal_d(), StdFace_PrintVal_i(), StdIntList::tdump, StdIntList::tshift, StdIntList::Uquench, and StdIntList::VecPot.

Referenced by StdFace_main().

469  {
470  FILE *fp;
471  int it, ii, isite, icell, itau, itrans, jsite, jcell, jtau, ntrans0;
472  double Cphase, time, dR[3];
473  double **Et;
474  double complex coef;
475 
476  fprintf(stdout, "\n @ Time-evolution\n\n");
477 
478  StdFace_PrintVal_d("VecPotW", &StdI->VecPot[0], 0.0);
479  StdFace_PrintVal_d("VecPotL", &StdI->VecPot[1], 0.0);
480  StdFace_PrintVal_d("VecPotH", &StdI->VecPot[2], 0.0);
481  StdFace_PrintVal_i("Lanczos_max", &StdI->Lanczos_max, 1000);
482  StdFace_PrintVal_d("dt", &StdI->dt, 0.1);
483  StdFace_PrintVal_d("freq", &StdI->freq, 0.1);
484  StdFace_PrintVal_d("tshift", &StdI->tshift, 0.0);
485  StdFace_PrintVal_d("tdump", &StdI->tdump, 0.1);
486  StdFace_PrintVal_d("Uquench", &StdI->Uquench, 0.0);
487  StdFace_PrintVal_i("ExpandCoef", &StdI->ExpandCoef, 10);
488  StdI->At = (double **)malloc(sizeof(double*) * StdI->Lanczos_max);
489  Et = (double **)malloc(sizeof(double*) * StdI->Lanczos_max);
490  for (it = 0; it < StdI->Lanczos_max; it++) {
491  StdI->At[it] = (double *)malloc(sizeof(double) * 3);
492  Et[it] = (double *)malloc(sizeof(double) * 3);
493  }
494 
495  if (strcmp(StdI->PumpType, "****") == 0) {
496  strcpy(StdI->PumpType, "quench\0");
497  fprintf(stdout, " PumpType = quench ###### DEFAULT VALUE IS USED ######\n");
498  StdI->PumpBody = 2;
499  }/*if (strcmp(StdI->PumpType, "****")*/
500  else {
501  fprintf(stdout, " PumpType = %s\n", StdI->PumpType);
502  if (strcmp(StdI->PumpType, "quench") == 0) {
503  StdI->PumpBody = 2;
504  }/*if (strcmp(StdI->PumpType, "quench")*/
505  else if (strcmp(StdI->PumpType, "pulselaser") == 0) {
506  for (it = 0; it < StdI->Lanczos_max; it++) {
507  time = StdI->dt*(double)it;
508  for (ii = 0; ii < 3; ii++) {
509  StdI->At[it][ii] = StdI->VecPot[ii] * cos(StdI->freq*(time - StdI->tshift))
510  * exp(-0.5* (time - StdI->tshift)*(time - StdI->tshift) / (StdI->tdump*StdI->tdump));
511  Et[it][ii] = -StdI->VecPot[ii]
512  * (
513  (StdI->tshift - time) / (StdI->tdump*StdI->tdump) * cos(StdI->freq*(time - StdI->tshift))
514  - StdI->freq* sin(StdI->freq*(time - StdI->tshift))
515  )
516  * exp(-0.5* (time - StdI->tshift)*(time - StdI->tshift) / (StdI->tdump*StdI->tdump));
517  }
518  }/*for (it = 0; it < StdI->Lanczos_max; it++)*/
519  StdI->PumpBody = 1;
520  }/*if (strcmp(StdI->PumpType, "pulselaser") == 0)*/
521  else if (strcmp(StdI->PumpType, "aclaser") == 0) {
522  for (it = 0; it < StdI->Lanczos_max; it++) {
523  time = StdI->dt*(double)it;
524  for (ii = 0; ii < 3; ii++) {
525  StdI->At[it][ii] = StdI->VecPot[ii] * sin(StdI->freq*(time - StdI->tshift));
526  Et[it][ii] = StdI->VecPot[ii] * cos(StdI->freq*(time - StdI->tshift)) * StdI->freq;
527  }
528  }/*for (it = 0; it < StdI->Lanczos_max; it++)*/
529  StdI->PumpBody = 1;
530  }/*if (strcmp(StdI->PumpType, "aclaser") == 0)*/
531  else if (strcmp(StdI->PumpType, "dclaser") == 0) {
532  for (it = 0; it < StdI->Lanczos_max; it++) {
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];
537  }
538  }/*for (it = 0; it < StdI->Lanczos_max; it++)*/
539  StdI->PumpBody = 1;
540  }/* if (strcmp(StdI->PumpType, "dclaser") == 0)*/
541  else {
542  fprintf(stdout, "\n ERROR ! PumpType : %s\n", StdI->PumpType);
543  StdFace_exit(-1);
544  }
545  }/*if (! strcmp(StdI->PumpType, "****"))*/
546 
547  if (StdI->PumpBody == 1) {
548  fp = fopen("potential.dat", "w");
549  fprintf(fp, "# Time A_W A_L A_H E_W E_L E_H\n");
550  for (it = 0; it < StdI->Lanczos_max; it++) {
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]);
554  }
555  fflush(fp);
556  fclose(fp);
557  }/*if (StdI->PumpBody == 1)*/
558 
559  for (it = 0; it < StdI->Lanczos_max; it++) free(Et[it]);
560  free(Et);
561 }/*static void VectorPotential(struct StdIntList *StdI)*/
void StdFace_PrintVal_i(char *valname, int *val, int val0)
Print a valiable (integer) read from the input file if it is not specified in the input file (=214748...
double tshift
Shift of time-step of laser.
Definition: StdFace_vals.h:299
int ExpandCoef
The number of Hamiltonian-vector operation for the time-evolution.
Definition: StdFace_vals.h:315
double ** At
[StdIntList::nt][3] Vector potential.
Definition: StdFace_vals.h:314
double dt
Time step.
Definition: StdFace_vals.h:298
double VecPot[3]
Vector potential.
Definition: StdFace_vals.h:303
double tdump
Time scale of dumping.
Definition: StdFace_vals.h:300
int PumpBody
one- or two-body pumping, defined from StdIntList::PumpType
Definition: StdFace_vals.h:305
int Lanczos_max
The maxixmum number of iterations, input from file.
Definition: StdFace_vals.h:265
char PumpType[256]
The type of pump.
Definition: StdFace_vals.h:304
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)...
double Uquench
Quenched on-site potential.
Definition: StdFace_vals.h:302
double freq
Frequency of laser.
Definition: StdFace_vals.h:301
void StdFace_exit(int errorcode)
MPI Abortation wrapper.
+ Here is the call graph for this function:
+ Here is the caller graph for this function: