HΦ  3.1.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>

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 1658 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().

1659 {
1660 
1661 
1662 #if defined(_HPhi)
1663  StdFace_PrintVal_i("Lanczos_max", &StdI->Lanczos_max, 2000);
1664  StdFace_PrintVal_i("initial_iv", &StdI->initial_iv, -1);
1665  /*StdFace_PrintVal_i("nvec", &StdI->nvec, 1);*/
1666  StdFace_PrintVal_i("exct", &StdI->exct, 1);
1667  StdFace_PrintVal_i("LanczosEps", &StdI->LanczosEps, 14);
1668  StdFace_PrintVal_i("LanczosTarget", &StdI->LanczosTarget, 2);
1669  if(StdI->LanczosTarget < StdI->exct) StdI->LanczosTarget = StdI->exct;
1670  StdFace_PrintVal_i("NumAve", &StdI->NumAve, 5);
1671  StdFace_PrintVal_i("ExpecInterval", &StdI->ExpecInterval, 20);
1672  StdFace_PrintVal_i("NOmega", &StdI->Nomega, 200);
1673  StdFace_PrintVal_d("OmegaMax", &StdI->OmegaMax, StdI->LargeValue*StdI->nsite);
1674  StdFace_PrintVal_d("OmegaMin", &StdI->OmegaMin, -StdI->LargeValue*StdI->nsite);
1675  StdFace_PrintVal_d("OmegaIm", &StdI->OmegaIm, 0.01* (int)StdI->LargeValue);
1676 #elif defined(_mVMC)
1677  if (strcmp(StdI->CParaFileHead, "****") == 0) {
1678  strcpy(StdI->CParaFileHead, "zqp\0");
1679  fprintf(stdout, " CParaFileHead = %-12s###### DEFAULT VALUE IS USED ######\n", StdI->CParaFileHead);
1680  }
1681  else fprintf(stdout, " CParaFileHead = %-s\n", StdI->CParaFileHead);
1682 
1683  StdFace_PrintVal_i("NVMCCalMode", &StdI->NVMCCalMode, 0);
1684  StdFace_PrintVal_i("NLanczosMode", &StdI->NLanczosMode, 0);
1685  StdFace_PrintVal_i("NDataIdxStart", &StdI->NDataIdxStart, 1);
1686 
1687  if (StdI->NVMCCalMode == 0) StdFace_NotUsed_i("NDataQtySmp", StdI->NDataQtySmp);
1688  /*else*/StdFace_PrintVal_i("NDataQtySmp", &StdI->NDataQtySmp, 1);
1689 
1690  if (StdI->lGC == 0 && (StdI->Sz2 == 0 || StdI->Sz2 == StdI->NaN_i)) {
1691  StdFace_PrintVal_i("NSPGaussLeg", &StdI->NSPGaussLeg, 8);
1692  StdFace_PrintVal_i("NSPStot", &StdI->NSPStot, 0);
1693  }
1694  else {
1695  StdFace_NotUsed_i("NSPGaussLeg", StdI->NSPGaussLeg);
1696  StdFace_NotUsed_i("NSPStot", StdI->NSPStot);
1697  }
1698 
1699  if (StdI->AntiPeriod[0] == 1 || StdI->AntiPeriod[1] == 1 || StdI->AntiPeriod[2] == 2)
1700  StdFace_PrintVal_i("NMPTrans", &StdI->NMPTrans, -1);
1701  else StdFace_PrintVal_i("NMPTrans", &StdI->NMPTrans, 1);
1702 
1703  StdFace_PrintVal_i("NSROptItrStep", &StdI->NSROptItrStep, 1000);
1704 
1705  if (StdI->NVMCCalMode == 1) StdFace_NotUsed_i("NSROptItrSmp", StdI->NSROptItrSmp);
1706  /*else*/ StdFace_PrintVal_i("NSROptItrSmp", &StdI->NSROptItrSmp, StdI->NSROptItrStep/10);
1707 
1708  StdFace_PrintVal_i("NVMCWarmUp", &StdI->NVMCWarmUp, 10);
1709  StdFace_PrintVal_i("NVMCInterval", &StdI->NVMCInterval, 1);
1710  StdFace_PrintVal_i("NVMCSample", &StdI->NVMCSample, 1000);
1711 
1712  if (strcmp(StdI->model, "hubbard") == 0) StdI->NExUpdatePath = 0;
1713  else if (strcmp(StdI->model, "spin") == 0) StdI->NExUpdatePath = 2;
1714  else if (strcmp(StdI->model, "kondo") == 0) {
1715  if(StdI->lGC==0) StdI->NExUpdatePath = 1;
1716  else StdI->NExUpdatePath = 3;
1717  }
1718  fprintf(stdout, " %15s = %-10d\n", "NExUpdatePath", StdI->NExUpdatePath);
1719 
1720  StdFace_PrintVal_i("RndSeed", &StdI->RndSeed, 123456789);
1721  StdFace_PrintVal_i("NSplitSize", &StdI->NSplitSize, 1);
1722  StdFace_PrintVal_i("NStore", &StdI->NStore, 1);
1723  StdFace_PrintVal_i("NSRCG", &StdI->NSRCG, 0);
1724 
1725  StdFace_PrintVal_d("DSROptRedCut", &StdI->DSROptRedCut, 0.001);
1726  StdFace_PrintVal_d("DSROptStaDel", &StdI->DSROptStaDel, 0.02);
1727  StdFace_PrintVal_d("DSROptStepDt", &StdI->DSROptStepDt, 0.02);
1728 #endif
1729  /*
1730  (Un)Conserved variables (Number of electrons, total Sz)
1731  */
1732  if (strcmp(StdI->model, "hubbard") == 0){
1733 #if defined(_HPhi)
1734  if (StdI->lGC == 0) StdFace_RequiredVal_i("nelec", StdI->nelec);
1735  else {
1736  StdFace_NotUsed_i("nelec", StdI->nelec);
1737  StdFace_NotUsed_i("2Sz", StdI->Sz2);
1738  }
1739 #else
1740  StdFace_RequiredVal_i("nelec", StdI->nelec);
1741  if (StdI->lGC == 0) StdFace_PrintVal_i("2Sz", &StdI->Sz2, 0);
1742  else StdFace_NotUsed_i("2Sz", StdI->Sz2);
1743 #endif
1744  }
1745  else if (strcmp(StdI->model, "spin") == 0) {
1746  StdFace_NotUsed_i("nelec", StdI->nelec);
1747 #if defined(_mVMC)
1748  StdI->nelec = 0;
1749 #endif
1750  if (StdI->lGC == 0) StdFace_RequiredVal_i("2Sz", StdI->Sz2);
1751  else StdFace_NotUsed_i("2Sz", StdI->Sz2);
1752  }/*else if (strcmp(StdI->model, "spin") == 0)*/
1753  else if (strcmp(StdI->model, "kondo") == 0) {
1754 #if defined(_HPhi)
1755  if (StdI->lGC == 0) StdFace_RequiredVal_i("nelec", StdI->nelec);
1756  else {
1757  StdFace_NotUsed_i("nelec", StdI->nelec);
1758  StdFace_NotUsed_i("2Sz", StdI->Sz2);
1759  }
1760 #else
1761  StdFace_RequiredVal_i("nelec", StdI->nelec);
1762  if (StdI->lGC == 0) StdFace_PrintVal_i("2Sz", &StdI->Sz2, 0);
1763  else StdFace_NotUsed_i("2Sz", StdI->Sz2);
1764 #endif
1765  }/*else if (strcmp(StdI->model, "kondo") == 0)*/
1766 }/*static void CheckModPara*/
double OmegaIm
Imaginary part of frequency.
Definition: StdFace_vals.h:262
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:238
int NumAve
Number of trials for TPQ calculation.
Definition: StdFace_vals.h:243
int Nomega
Number of frequencies, input from file.
Definition: StdFace_vals.h:259
double OmegaMax
Maximum of frequency for spectrum, input from file.
Definition: StdFace_vals.h:260
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:135
int exct
The number of eigenvectors to be computed. input from file.
Definition: StdFace_vals.h:240
double OmegaMin
Minimum of frequency for spectrum, input from file.
Definition: StdFace_vals.h:261
int LanczosTarget
Which eigenvector is used for the convergence check.
Definition: StdFace_vals.h:242
int LanczosEps
Convergence threshold for the Lanczos method.
Definition: StdFace_vals.h:241
int Lanczos_max
The maxixmum number of iterations, input from file.
Definition: StdFace_vals.h:237
int lGC
Switch for computing Grandcanonical ensemble(== 1). Setted in StdFace_main() after all keywords are r...
Definition: StdFace_vals.h:212
double LargeValue
The shift parameter for the TPQ calculation.
Definition: StdFace_vals.h:246
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:220
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:140
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:214
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:244

◆ CheckOutputMode()

static void CheckOutputMode ( struct StdIntList StdI)
static

Verify outputmode.

Author
Mitsuaki Kawamura (The University of Tokyo)

Definition at line 1621 of file StdFace_main.c.

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

Referenced by StdFace_main().

1622 {
1623  /*
1624  Form for Correlation function
1625  */
1626  if (strcmp(StdI->outputmode, "non") == 0
1627  || strcmp(StdI->outputmode, "none") == 0
1628  || strcmp(StdI->outputmode, "off") == 0) {
1629  StdI->ioutputmode = 0;
1630  fprintf(stdout, " ioutputmode = %-10d\n", StdI->ioutputmode);
1631  }
1632  else if (strcmp(StdI->outputmode, "cor") == 0
1633  || strcmp(StdI->outputmode, "corr") == 0
1634  || strcmp(StdI->outputmode, "correlation") == 0) {
1635  StdI->ioutputmode = 1;
1636  fprintf(stdout, " ioutputmode = %-10d\n", StdI->ioutputmode);
1637  }
1638  else if (strcmp(StdI->outputmode, "****") == 0) {
1639  StdI->ioutputmode = 1;
1640  fprintf(stdout, " ioutputmode = %-10d ###### DEFAULT VALUE IS USED ######\n", StdI->ioutputmode);
1641  }
1642  else if (strcmp(StdI->outputmode, "raw") == 0
1643  || strcmp(StdI->outputmode, "all") == 0
1644  || strcmp(StdI->outputmode, "full") == 0) {
1645  StdI->ioutputmode = 2;
1646  fprintf(stdout, " ioutputmode = %-10d\n", StdI->ioutputmode);
1647  }
1648  else{
1649  fprintf(stdout, "\n ERROR ! Unsupported OutPutMode : %s\n", StdI->outputmode);
1650  StdFace_exit(-1);
1651  }
1652 }/*static void CheckOutputMode*/
int ioutputmode
Switch associated to StdIntList::outputmode.
Definition: StdFace_vals.h:221
char outputmode[256]
Select amount of correlation function, input from file.
Definition: StdFace_vals.h:216
void StdFace_exit(int errorcode)
MPI Abortation wrapper.

◆ Print1Green()

static void Print1Green ( struct StdIntList StdI)
static

Print greenone.def.

Author
Mitsuaki Kawamura (The University of Tokyo)

Definition at line 1320 of file StdFace_main.c.

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

Referenced by StdFace_main().

1321 {
1322  FILE *fp;
1323  int ngreen, igreen, store, xkondo;
1324  int isite, jsite, ispin, jspin, SiMax, SjMax;
1325  int **greenindx;
1326  /*
1327  Set Indices of correlation functions
1328  */
1329  ngreen = 0;
1330  if (StdI->ioutputmode != 0) {
1331  for (store = 0; store < 2; store++) {
1332 
1333  if (store == 1) {
1334  greenindx = (int **)malloc(sizeof(int*) * (ngreen + 1));
1335  for (igreen = 0; igreen < ngreen; igreen++) {
1336  greenindx[igreen] = (int *)malloc(sizeof(int) * 4);
1337  }
1338  ngreen = 0;
1339  }/*if (store == 1)*/
1340 
1341  if (strcmp(StdI->model, "kondo") == 0) xkondo = 2;
1342  else xkondo = 1;
1343 
1344  if (StdI->ioutputmode == 1) {
1345  for (isite = 0; isite < StdI->NsiteUC*xkondo; isite++) {
1346 
1347  if (isite >= StdI->NsiteUC) isite += StdI->nsite / 2;
1348 
1349  if (StdI->locspinflag[isite] == 0) SiMax = 1;
1350  else SiMax = StdI->locspinflag[isite];
1351 
1352  for (ispin = 0; ispin <= SiMax; ispin++) {
1353  for (jsite = 0; jsite < StdI->nsite; jsite++) {
1354 
1355  if (StdI->locspinflag[jsite] == 0) SjMax = 1;
1356  else SjMax = StdI->locspinflag[jsite];
1357 
1358  for (jspin = 0; jspin <= SjMax; jspin++) {
1359 
1360  if (isite != jsite &&
1361  (StdI->locspinflag[isite] != 0 && StdI->locspinflag[jsite] != 0)) continue;
1362 
1363  if (ispin == jspin){
1364  if (store == 1) {
1365  greenindx[ngreen][0] = isite;
1366  greenindx[ngreen][1] = ispin;
1367  greenindx[ngreen][2] = jsite;
1368  greenindx[ngreen][3] = jspin;
1369  }
1370  ngreen++;
1371  }
1372 
1373  }/*for (jspin = 0; jspin <= SjMax; jspin++)*/
1374  }/*for (jsite = 0; jsite < StdI->nsite; jsite++)*/
1375  }/*for (ispin = 0; ispin <= SiMax; ispin++)*/
1376  }/*for (isite = 0; isite < StdI->nsite; isite++)*/
1377  }/*if (StdI->ioutputmode == 1)*/
1378  else {
1379  for (isite = 0; isite < StdI->nsite; isite++) {
1380 
1381  if (StdI->locspinflag[isite] == 0) SiMax = 1;
1382  else SiMax = StdI->locspinflag[isite];
1383 
1384  for (ispin = 0; ispin <= SiMax; ispin++) {
1385  for (jsite = 0; jsite < StdI->nsite; jsite++) {
1386 
1387  if (StdI->locspinflag[jsite] == 0) SjMax = 1;
1388  else SjMax = StdI->locspinflag[jsite];
1389 
1390  for (jspin = 0; jspin <= SjMax; jspin++) {
1391 
1392  if (isite != jsite &&
1393  (StdI->locspinflag[isite] != 0 && StdI->locspinflag[jsite] != 0)) continue;
1394 
1395  if (store == 1) {
1396  greenindx[ngreen][0] = isite;
1397  greenindx[ngreen][1] = ispin;
1398  greenindx[ngreen][2] = jsite;
1399  greenindx[ngreen][3] = jspin;
1400  }
1401  ngreen++;
1402 
1403  }/*for (jspin = 0; jspin <= SjMax; jspin++)*/
1404  }/*for (jsite = 0; jsite < StdI->nsite; jsite++)*/
1405  }/*for (ispin = 0; ispin <= SiMax; ispin++)*/
1406  }/*for (isite = 0; isite < StdI->nsite; isite++)*/
1407  }/*if (StdI->ioutputmode == 2)*/
1408  }/*if (StdI->ioutputmode != 0)*/
1409 
1410  fp = fopen("greenone.def", "w");
1411  fprintf(fp, "===============================\n");
1412  fprintf(fp, "NCisAjs %10d\n", ngreen);
1413  fprintf(fp, "===============================\n");
1414  fprintf(fp, "======== Green functions ======\n");
1415  fprintf(fp, "===============================\n");
1416  for (igreen = 0; igreen < ngreen; igreen++) {
1417  fprintf(fp, "%5d %5d %5d %5d\n",
1418  greenindx[igreen][0], greenindx[igreen][1], greenindx[igreen][2], greenindx[igreen][3]);
1419  }
1420  fflush(fp);
1421  fclose(fp);
1422 
1423  fprintf(stdout, " greenone.def is written.\n");
1424 
1425  for (igreen = 0; igreen < ngreen; igreen++) {
1426  free(greenindx[igreen]);
1427  }
1428  free(greenindx);
1429 
1430  }/*if (StdI->ioutputmode != 0) */
1431 }/*static void Print1Green*/
int ioutputmode
Switch associated to StdIntList::outputmode.
Definition: StdFace_vals.h:221
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:141
int nsite
Number of sites, set in the each lattice file.
Definition: StdFace_vals.h:140

◆ Print2Green()

static void Print2Green ( struct StdIntList StdI)
static

Print greentwo.def.

Author
Mitsuaki Kawamura (The University of Tokyo)

Definition at line 1436 of file StdFace_main.c.

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

Referenced by StdFace_main().

1436  {
1437  FILE *fp;
1438  int ngreen, store, igreen, xkondo;
1439  int site1, site2, site3, site4;
1440  int spin1, spin2, spin3, spin4;
1441  int S1Max, S2Max, S3Max, S4Max;
1442  int **greenindx;
1443  /*
1444  Set Indices of correlation functions
1445  */
1446  ngreen = 0;
1447  if (StdI->ioutputmode == 1) {
1448  for (store = 0; store < 2; store++) {
1449 
1450  if (store == 1) {
1451  greenindx = (int **)malloc(sizeof(int*) * (ngreen + 1));
1452  for (igreen = 0; igreen < ngreen; igreen++)
1453  greenindx[igreen] = (int *)malloc(sizeof(int) * 8);
1454  ngreen = 0;
1455  }/*if (store == 1)*/
1456 
1457  if (strcmp(StdI->model, "kondo") == 0) xkondo = 2;
1458  else xkondo = 1;
1459 
1460  for (site1 = 0; site1 < StdI->NsiteUC*xkondo; site1++) {
1461 
1462  if (site1 >= StdI->NsiteUC) site1 += StdI->nsite / 2;
1463 
1464  if (StdI->locspinflag[site1] == 0) S1Max = 1;
1465  else S1Max = StdI->locspinflag[site1];
1466  for (spin1 = 0; spin1 <= S1Max; spin1++) {
1467  for (spin2 = 0; spin2 <= S1Max; spin2++) {
1468 
1469  for (site3 = 0; site3 < StdI->nsite; site3++) {
1470 
1471  if (StdI->locspinflag[site3] == 0) S3Max = 1;
1472  else S3Max = StdI->locspinflag[site3];
1473  for (spin3 = 0; spin3 <= S3Max; spin3++) {
1474  for (spin4 = 0; spin4 <= S3Max; spin4++) {
1475 
1476  if (spin1 - spin2 + spin3 - spin4 == 0) {
1477  if (store == 1) {
1478 #if defined(_mVMC)
1479  if (spin1 != spin2 || spin3 != spin4)
1480  {
1481  greenindx[ngreen][0] = site1;
1482  greenindx[ngreen][1] = spin1;
1483  greenindx[ngreen][2] = site3;
1484  greenindx[ngreen][3] = spin4;
1485  greenindx[ngreen][4] = site3;
1486  greenindx[ngreen][5] = spin3;
1487  greenindx[ngreen][6] = site1;
1488  greenindx[ngreen][7] = spin2;
1489  }
1490  else
1491 #endif
1492  {
1493  greenindx[ngreen][0] = site1;
1494  greenindx[ngreen][1] = spin1;
1495  greenindx[ngreen][2] = site1;
1496  greenindx[ngreen][3] = spin2;
1497  greenindx[ngreen][4] = site3;
1498  greenindx[ngreen][5] = spin3;
1499  greenindx[ngreen][6] = site3;
1500  greenindx[ngreen][7] = spin4;
1501  }
1502  }/*if (store == 1)*/
1503  ngreen++;
1504  }/*if (spin1 - spin2 + spin3 - spin4 == 0)*/
1505 
1506  }/*for (spin4 = 0; spin4 <= S3Max; spin4++)*/
1507  }/*for (spin3 = 0; spin3 <= S3Max; spin3++*/
1508  }/*for (site3 = 0; site3 < StdI->nsite; site3++)*/
1509  }/*for (spin2 = 0; spin2 <= S1Max; spin2++)*/
1510  }/*for (spin1 = 0; spin1 <= S1Max; spin1++)*/
1511  }/*for (site1 = 0; site1 < StdI->nsite; site1++)*/
1512 
1513  }/*for (store = 0; store < 2; store++)*/
1514  }/*if (StdI->ioutputmode == 1)*/
1515  else if (StdI->ioutputmode == 2) {
1516  for (store = 0; store < 2; store++) {
1517 
1518  if (store == 1) {
1519  greenindx = (int **)malloc(sizeof(int*) * (ngreen + 1));
1520  for (igreen = 0; igreen < ngreen; igreen++)
1521  greenindx[igreen] = (int *)malloc(sizeof(int) * 8);
1522  ngreen = 0;
1523  }/*if (store == 1)*/
1524 
1525  for (site1 = 0; site1 < StdI->nsite; site1++) {
1526 
1527  if (StdI->locspinflag[site1] == 0) S1Max = 1;
1528  else S1Max = StdI->locspinflag[site1];
1529  for (spin1 = 0; spin1 <= S1Max; spin1++) {
1530 
1531  for (site2 = 0; site2 < StdI->nsite; site2++) {
1532 
1533  if (StdI->locspinflag[site1] != 0 && StdI->locspinflag[site2] != 0
1534  && site1 != site2) continue;
1535 
1536  if (StdI->locspinflag[site2] == 0) S2Max = 1;
1537  else S2Max = StdI->locspinflag[site2];
1538  for (spin2 = 0; spin2 <= S2Max; spin2++) {
1539 
1540  for (site3 = 0; site3 < StdI->nsite; site3++) {
1541 
1542  if (StdI->locspinflag[site3] == 0) S3Max = 1;
1543  else S3Max = StdI->locspinflag[site3];
1544  for (spin3 = 0; spin3 <= S3Max; spin3++) {
1545 
1546  for (site4 = 0; site4 < StdI->nsite; site4++) {
1547 
1548  if (StdI->locspinflag[site3] != 0 && StdI->locspinflag[site4] != 0
1549  && site3 != site4) continue;
1550 
1551  if (StdI->locspinflag[site4] == 0) S4Max = 1;
1552  else S4Max = StdI->locspinflag[site4];
1553  for (spin4 = 0; spin4 <= S4Max; spin4++) {
1554 
1555  if (store == 1) {
1556  greenindx[ngreen][0] = site1;
1557  greenindx[ngreen][1] = spin1;
1558  greenindx[ngreen][2] = site2;
1559  greenindx[ngreen][3] = spin2;
1560  greenindx[ngreen][4] = site3;
1561  greenindx[ngreen][5] = spin3;
1562  greenindx[ngreen][6] = site4;
1563  greenindx[ngreen][7] = spin4;
1564  }/*if (store == 1)*/
1565  ngreen++;
1566 
1567  }/*for (spin4 = 0; spin4 <= S4Max; spin4++)*/
1568  }/*for (site4 = 0; site4 < StdI->nsite; site4++)*/
1569  }/*for (spin3 = 0; spin3 <= S3Max; spin3++*/
1570  }/*for (site3 = 0; site3 < StdI->nsite; site3++)*/
1571  }/*for (spin2 = 0; spin2 <= S2Max; spin2++)*/
1572  }/*for (site2 = 0; site2 < StdI->nsite; site2++)*/
1573  }/*for (spin1 = 0; spin1 <= S1Max; spin1++)*/
1574  }/*for (site1 = 0; site1 < StdI->nsite; site1++)*/
1575 
1576  }/*for (store = 0; store < 2; store++)*/
1577  }/*if (StdI->ioutputmode == 2)*/
1578  if (StdI->ioutputmode != 0) {
1579  fp = fopen("greentwo.def", "w");
1580  fprintf(fp, "=============================================\n");
1581  fprintf(fp, "NCisAjsCktAltDC %10d\n", ngreen);
1582  fprintf(fp, "=============================================\n");
1583  fprintf(fp, "======== Green functions for Sq AND Nq ======\n");
1584  fprintf(fp, "=============================================\n");
1585  for (igreen = 0; igreen < ngreen; igreen++) {
1586  fprintf(fp, "%5d %5d %5d %5d %5d %5d %5d %5d\n",
1587  greenindx[igreen][0], greenindx[igreen][1], greenindx[igreen][2], greenindx[igreen][3],
1588  greenindx[igreen][4], greenindx[igreen][5], greenindx[igreen][6], greenindx[igreen][7]);
1589  }
1590  fflush(fp);
1591  fclose(fp);
1592 
1593  fprintf(stdout, " greentwo.def is written.\n");
1594 
1595  for (igreen = 0; igreen < ngreen; igreen++) {
1596  free(greenindx[igreen]);
1597  }
1598  free(greenindx);
1599  }/*if (StdI->ioutputmode != 0)*/
1600 }/*static void Print2Green(struct StdIntList *StdI)*/
int ioutputmode
Switch associated to StdIntList::outputmode.
Definition: StdFace_vals.h:221
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:141
int nsite
Number of sites, set in the each lattice file.
Definition: StdFace_vals.h:140

◆ 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::InitialVecType, StdIntList::lGC, StdIntList::method, StdIntList::model, 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  /*
88  First, check all parameters and exit if invalid parameters
89  */
90  fprintf(stdout, "\n @ CalcMod\n\n");
91  /*
92  Method
93  */
94  iCalcEigenvec = 0;
95  if (strcmp(StdI->method, "****") == 0){
96  fprintf(stdout, "ERROR ! Method is NOT specified !\n");
97  StdFace_exit(-1);
98  }
99  else if (strcmp(StdI->method, "lanczos") == 0) iCalcType = 0;
100  else if (strcmp(StdI->method, "lanczosenergy") == 0) {
101  iCalcType = 0;
102  iCalcEigenvec = 1;
103  }
104  else if (strcmp(StdI->method, "tpq") == 0) iCalcType = 1;
105  else if (strcmp(StdI->method, "fulldiag") == 0 ) iCalcType = 2;
106  else if (strcmp(StdI->method, "cg") == 0) iCalcType = 3;
107  else if (strcmp(StdI->method, "timeevolution") == 0) iCalcType = 4;
108  else{
109  fprintf(stdout, "\n ERROR ! Unsupported Solver : %s\n", StdI->method);
110  StdFace_exit(-1);
111  }/*if (strcmp(StdI->method, METHODS) != 0*/
112  if (iCalcType != 4) StdI->PumpBody = 0;
113  /*
114  Model
115  */
116  if (strcmp(StdI->model, "hubbard") == 0) {
117  if (StdI->lGC == 0)iCalcModel = 0;
118  else iCalcModel = 3;
119  }/*if (strcmp(StdI->model, "hubbard") == 0)*/
120  else if (strcmp(StdI->model, "spin") == 0) {
121  if (StdI->lGC == 0)iCalcModel = 1;
122  else iCalcModel = 4;
123  }/*if (strcmp(StdI->model, "spin") == 0)*/
124  else if (strcmp(StdI->model, "kondo") == 0) {
125  if (StdI->lGC == 0)iCalcModel = 2;
126  else iCalcModel = 5;
127  }/*if (strcmp(StdI->model, "kondo") == 0)*/
128  /*
129  Restart
130  */
131  if (strcmp(StdI->Restart, "****") == 0) {
132  strcpy(StdI->Restart, "none\0");
133  fprintf(stdout, " Restart = none ###### DEFAULT VALUE IS USED ######\n");
134  iRestart = 0;
135  }/*if (strcmp(StdI->Restart, "****") == 0)*/
136  else {
137  fprintf(stdout, " Restart = %s\n", StdI->Restart);
138  if (strcmp(StdI->Restart, "none") == 0) iRestart = 0;
139  else if (strcmp(StdI->Restart, "restart_out") == 0 ||
140  strcmp(StdI->Restart, "save") == 0) iRestart = 1;
141  else if (strcmp(StdI->Restart, "restartsave") == 0 ||
142  strcmp(StdI->Restart, "restart") == 0) iRestart = 2;
143  else if (strcmp(StdI->Restart, "restart_in") == 0) iRestart = 3;
144  else {
145  fprintf(stdout, "\n ERROR ! Restart Mode : %s\n", StdI->Restart);
146  StdFace_exit(-1);
147  }
148  }/*if (strcmp(StdI->Restart, "****") != 0)*/
149  /*
150  InitialVecType
151  */
152  if (strcmp(StdI->InitialVecType, "****") == 0) {
153  strcpy(StdI->InitialVecType, "c\0");
154  fprintf(stdout, " InitialVecType = c ###### DEFAULT VALUE IS USED ######\n");
155  iInitialVecTpye = 0;
156  }/*if (strcmp(StdI->InitialVecType, "****") == 0)*/
157  else {
158  fprintf(stdout, " InitialVecType = %s\n", StdI->InitialVecType);
159  if (strcmp(StdI->InitialVecType, "c") == 0) iInitialVecTpye = 0;
160  else if (strcmp(StdI->InitialVecType, "r") == 0) iInitialVecTpye = 1;
161  else {
162  fprintf(stdout, "\n ERROR ! Restart Mode : %s\n", StdI->Restart);
163  StdFace_exit(-1);
164  }
165  }/*if (strcmp(StdI->InitialVecType, "****") != 0)*/
166  /*
167  EigenVecIO
168  */
169  InputEigenVec = 0;
170  OutputEigenVec = 0;
171  if (strcmp(StdI->EigenVecIO, "****") == 0) {
172  strcpy(StdI->EigenVecIO, "none\0");
173  fprintf(stdout, " EigenVecIO = none ###### DEFAULT VALUE IS USED ######\n");
174  }/*if (strcmp(StdI->EigenVecIO, "****") == 0)*/
175  else {
176  fprintf(stdout, " EigenVecIO = %s\n", StdI->EigenVecIO);
177  if (strcmp(StdI->EigenVecIO, "none") == 0) InputEigenVec = 0;
178  else if (strcmp(StdI->EigenVecIO, "in") == 0) InputEigenVec = 1;
179  else if (strcmp(StdI->EigenVecIO, "out") == 0) OutputEigenVec = 1;
180  else if (strcmp(StdI->EigenVecIO, "inout") == 0) {
181  InputEigenVec = 1;
182  OutputEigenVec = 1;
183  }/*if (strcmp(StdI->EigenVecIO, "inout") == 0)*/
184  else {
185  fprintf(stdout, "\n ERROR ! EigenVecIO Mode : %s\n", StdI->Restart);
186  StdFace_exit(-1);
187  }
188  }/*if (strcmp(StdI->EigenVecIO, "****") != 0)*/
189  if (strcmp(StdI->method, "timeevolution") == 0) InputEigenVec = 1;
190  /*
191  CalcSpec
192  */
193  if (strcmp(StdI->CalcSpec, "****") == 0) {
194  strcpy(StdI->CalcSpec, "none\0");
195  fprintf(stdout, " CalcSpec = none ###### DEFAULT VALUE IS USED ######\n");
196  iCalcSpec = 0;
197  }/*if (strcmp(StdI->CalcSpec, "****") == 0)*/
198  else {
199  fprintf(stdout, " CalcSpec = %s\n", StdI->CalcSpec);
200  if (strcmp(StdI->CalcSpec, "none") == 0) iCalcSpec = 0;
201  else if (strcmp(StdI->CalcSpec, "normal") == 0) iCalcSpec = 1;
202  else if (strcmp(StdI->CalcSpec, "noiteration") == 0) iCalcSpec = 2;
203  else if (strcmp(StdI->CalcSpec, "restart_out") == 0) iCalcSpec = 3;
204  else if (strcmp(StdI->CalcSpec, "restart_in") == 0) iCalcSpec = 4;
205  else if (strcmp(StdI->CalcSpec, "restartsave") == 0 ||
206  strcmp(StdI->CalcSpec, "restart") == 0) iCalcSpec = 5;
207  else {
208  fprintf(stdout, "\n ERROR ! CalcSpec : %s\n", StdI->CalcSpec);
209  StdFace_exit(-1);
210  }
211  }/*if (strcmp(StdI->CalcSpec, "****") != 0)*/
212 
213  fp = fopen("calcmod.def", "w");
214  fprintf(fp, "#CalcType = 0:Lanczos, 1:TPQCalc, 2:FullDiag, 3:CG, 4:Time-evolution\n");
215  fprintf(fp, "#CalcModel = 0:Hubbard, 1:Spin, 2:Kondo, 3:HubbardGC, 4:SpinGC, 5:KondoGC\n");
216  fprintf(fp, "#Restart = 0:None, 1:Save, 2:Restart&Save, 3:Restart\n");
217  fprintf(fp, "#CalcSpec = 0:None, 1:Normal, 2:No H*Phi, 3:Save, 4:Restart, 5:Restart&Save\n");
218  fprintf(fp, "CalcType %3d\n", iCalcType);
219  fprintf(fp, "CalcModel %3d\n", iCalcModel);
220  fprintf(fp, "ReStart %3d\n", iRestart);
221  fprintf(fp, "CalcSpec %3d\n", iCalcSpec);
222  fprintf(fp, "CalcEigenVec %3d\n", iCalcEigenvec);
223  fprintf(fp, "InitialVecType %3d\n", iInitialVecTpye);
224  fprintf(fp, "InputEigenVec %3d\n", InputEigenVec);
225  fprintf(fp, "OutputEigenVec %3d\n", OutputEigenVec);
226  fflush(fp);
227  fclose(fp);
228  fprintf(stdout, " calcmod.def is written.\n\n");
229 }/*static void PrintCalcMod*/
char Restart[256]
The name of restart mode, input from file.
Definition: StdFace_vals.h:233
char CalcSpec[256]
The name of mode for spectrum, input from file.
Definition: StdFace_vals.h:257
char model[256]
Name of model, input parameter.
Definition: StdFace_vals.h:60
char InitialVecType[256]
The name of initialguess-type, input from file.
Definition: StdFace_vals.h:234
int PumpBody
one- or two-body pumping, defined from StdIntList::PumpType
Definition: StdFace_vals.h:276
char EigenVecIO[256]
The name of I/O mode for eigenvector, input from file.
Definition: StdFace_vals.h:235
char method[256]
The name of method, input from file.
Definition: StdFace_vals.h:232
int lGC
Switch for computing Grandcanonical ensemble(== 1). Setted in StdFace_main() after all keywords are r...
Definition: StdFace_vals.h:212
void StdFace_exit(int errorcode)
MPI Abortation wrapper.

◆ PrintExcitation()

static void PrintExcitation ( struct StdIntList StdI)
static

Print single.def or pair.def.

Author
Mitsuaki Kawamura (The University of Tokyo)

Definition at line 234 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().

234  {
235  FILE *fp;
236  int NumOp, **spin, isite, ispin, icell, itau;
237  double *coef, pi, Cphase, S, Sz;
238  double *fourier_r, *fourier_i;
239 
240  if (strcmp(StdI->model, "spin") == 0 && StdI->S2 > 1) {
241  coef = (double *)malloc(sizeof(double) * (StdI->S2 + 1));
242  spin = (int **)malloc(sizeof(int*) * (StdI->S2 + 1));
243  for (ispin = 0; ispin < StdI->S2 + 1; ispin++) spin[ispin] = (int *)malloc(sizeof(int) * 2);
244  }
245  else {
246  coef = (double *)malloc(sizeof(double) * 2);
247  spin = (int **)malloc(sizeof(int*) * 2);
248  for (ispin = 0; ispin < 2; ispin++) spin[ispin] = (int *)malloc(sizeof(int) * 2);
249  }
250 
251  fourier_r = (double *)malloc(sizeof(double) * StdI->nsite);
252  fourier_i = (double *)malloc(sizeof(double) * StdI->nsite);
253 
254  fprintf(stdout, "\n @ Spectrum\n\n");
255 
256  StdFace_PrintVal_d("SpectrumQW", &StdI->SpectrumQ[0], 0.0);
257  StdFace_PrintVal_d("SpectrumQL", &StdI->SpectrumQ[1], 0.0);
258  StdFace_PrintVal_d("SpectrumQH", &StdI->SpectrumQ[2], 0.0);
259 
260  if (strcmp(StdI->SpectrumType, "****") == 0) {
261  strcpy(StdI->SpectrumType, "szsz\0");
262  fprintf(stdout, " SpectrumType = szsz ###### DEFAULT VALUE IS USED ######\n");
263  if (strcmp(StdI->model, "spin") == 0) {
264  NumOp = StdI->S2 + 1;
265  for (ispin = 0; ispin <= StdI->S2; ispin++) {
266  Sz = (double)ispin - (double)StdI->S2 * 0.5;
267  coef[ispin] = Sz;
268  spin[ispin][0] = ispin;
269  spin[ispin][1] = ispin;
270  }
271  }
272  else {
273  NumOp = 2;
274  coef[0] = 0.5;
275  coef[1] = -0.5;
276  spin[0][0] = 0;
277  spin[0][1] = 0;
278  spin[1][0] = 1;
279  spin[1][1] = 1;
280  }
281  StdI->SpectrumBody = 2;
282  }
283  else {
284  fprintf(stdout, " SpectrumType = %s\n", StdI->SpectrumType);
285  if (strcmp(StdI->SpectrumType, "szsz") == 0) {
286  if (strcmp(StdI->model, "spin") == 0) {
287  NumOp = StdI->S2 + 1;
288  for (ispin = 0; ispin <= StdI->S2; ispin++) {
289  Sz = (double)ispin - (double)StdI->S2 * 0.5;
290  coef[ispin] = Sz;
291  spin[ispin][0] = ispin;
292  spin[ispin][1] = ispin;
293  }
294  }
295  else {
296  NumOp = 2;
297  coef[0] = 0.5;
298  coef[1] = -0.5;
299  spin[0][0] = 0;
300  spin[0][1] = 0;
301  spin[1][0] = 1;
302  spin[1][1] = 1;
303  }
304  StdI->SpectrumBody = 2;
305  }
306  else if (strcmp(StdI->SpectrumType, "s+s-") == 0) {
307  if (strcmp(StdI->model, "spin") == 0 && StdI->S2 > 1) {
308  NumOp = StdI->S2;
309  S = (double)StdI->S2 * 0.5;
310  for (ispin = 0; ispin < StdI->S2; ispin++) {
311  Sz = (double)ispin - (double)StdI->S2 * 0.5;
312  coef[ispin] = sqrt(S*(S + 1.0) - Sz*(Sz + 1.0));
313  spin[ispin][0] = ispin;
314  spin[ispin][1] = ispin + 1;
315  }
316  }
317  else {
318  NumOp = 1;
319  coef[0] = 1.0;
320  spin[0][0] = 0;
321  spin[0][1] = 1;
322  }
323  StdI->SpectrumBody = 2;
324  }
325  else if (strcmp(StdI->SpectrumType, "density") == 0) {
326  NumOp = 2;
327  coef[0] = 1,0;
328  coef[1] = 1.0;
329  spin[0][0] = 0;
330  spin[0][1] = 0;
331  spin[1][0] = 1;
332  spin[1][1] = 1;
333  StdI->SpectrumBody = 2;
334  }
335  else if (strcmp(StdI->SpectrumType, "up") == 0) {
336  NumOp = 1;
337  coef[0] = 1.0;
338  spin[0][0] = 0;
339  StdI->SpectrumBody = 1;
340  }
341  else if (strcmp(StdI->SpectrumType, "down") == 0) {
342  NumOp = 1;
343  coef[0] = 1.0;
344  spin[0][0] = 1;
345  StdI->SpectrumBody = 1;
346  }
347  else {
348  fprintf(stdout, "\n ERROR ! SpectrumType : %s\n", StdI->SpectrumType);
349  StdFace_exit(-1);
350  }
351  }
352 
353  isite = 0;
354  for (icell = 0; icell < StdI->NCell; icell++) {
355  for (itau = 0; itau < StdI->NsiteUC; itau++) {
356  Cphase = (StdI->Cell[icell][0] + StdI->tau[itau][0])*StdI->SpectrumQ[0]
357  + (StdI->Cell[icell][1] + StdI->tau[itau][1])*StdI->SpectrumQ[1]
358  + (StdI->Cell[icell][2] + StdI->tau[itau][2])*StdI->SpectrumQ[2];
359  fourier_r[isite] = cos(2.0*StdI->pi*Cphase);
360  fourier_i[isite] = sin(2.0*StdI->pi*Cphase);
361  isite += 1;
362  }
363  }
364  if (strcmp(StdI->model, "kondo") == 0) {
365  for (isite = 0; isite < StdI->nsite / 2; isite++) {
366  fourier_r[isite + StdI->nsite / 2] = fourier_r[isite];
367  fourier_i[isite + StdI->nsite / 2] = fourier_i[isite];
368  }/*for (isite = 0; isite < StdI->nsite; isite++)*/
369  }/*if (strcmp(StdI->model, "kondo") == 0)*/
370 
371  if (StdI->SpectrumBody == 1) {
372  fp = fopen("single.def", "w");
373  fprintf(fp, "=============================================\n");
374  if (strcmp(StdI->model, "kondo") == 0) {
375  fprintf(fp, "NSingle %d\n", StdI->nsite / 2 * NumOp);
376  }
377  else {
378  fprintf(fp, "NSingle %d\n", StdI->nsite * NumOp);
379  }
380  fprintf(fp, "=============================================\n");
381  fprintf(fp, "============== Single Excitation ============\n");
382  fprintf(fp, "=============================================\n");
383  if (strcmp(StdI->model, "kondo") == 0) {
384  for (isite = StdI->nsite / 2; isite < StdI->nsite; isite++) {
385  fprintf(fp, "%d %d 0 %25.15f %25.15f\n", isite, spin[0][0],
386  fourier_r[isite] * coef[0], fourier_i[isite] * coef[0]);
387  }/*for (isite = 0; isite < StdI->nsite; isite++)*/
388  }/*if (strcmp(StdI->model, "kondo") == 0)*/
389  else {
390  for (isite = 0; isite < StdI->nsite; isite++) {
391  fprintf(fp, "%d %d 0 %25.15f %25.15f\n", isite, spin[0][0],
392  fourier_r[isite] * coef[0], fourier_i[isite] * coef[0]);
393  }/*for (isite = 0; isite < StdI->nsite; isite++)*/
394  }
395  fprintf(stdout, " single.def is written.\n\n");
396  }
397  else {
398  fp = fopen("pair.def", "w");
399  fprintf(fp, "=============================================\n");
400  fprintf(fp, "NPair %d\n", StdI->nsite * NumOp);
401  fprintf(fp, "=============================================\n");
402  fprintf(fp, "=============== Pair Excitation =============\n");
403  fprintf(fp, "=============================================\n");
404  for (isite = 0; isite < StdI->nsite; isite++) {
405  for (ispin = 0; ispin < NumOp; ispin++) {
406  fprintf(fp, "%d %d %d %d 0 %25.15f %25.15f\n",
407  isite, spin[ispin][0], isite, spin[ispin][1],
408  fourier_r[isite] * coef[ispin], fourier_i[isite] * coef[ispin]);
409  }
410  }
411  fprintf(stdout, " pair.def is written.\n\n");
412  }
413  fflush(fp);
414  fclose(fp);
415 
416  free(fourier_r);
417  free(fourier_i);
418  if (strcmp(StdI->model, "spin") == 0)
419  for (ispin = 0; ispin < StdI->S2 + 1; ispin++) free(spin[ispin]);
420  else
421  for (ispin = 0; ispin < 2; ispin++) free(spin[ispin]);
422  free(spin);
423  free(coef);
424 
425 }/*static void PrintExcitation()*/
char SpectrumType[256]
The type of mode for spectrum, input from file.
Definition: StdFace_vals.h:258
int S2
Total spin |S| of a local spin, input from file.
Definition: StdFace_vals.h:215
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:263
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:140
int SpectrumBody
one- or two-body excitation, defined from StdIntList::SpectrumType
Definition: StdFace_vals.h:264
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.

◆ PrintInteractions()

static void PrintInteractions ( struct StdIntList StdI)
static

Output .def file for Specific interaction.

Author
Mitsuaki Kawamura (The University of Tokyo)

Definition at line 1771 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().

1772 {
1773  FILE *fp;
1774  int nintr0, kintr, jintr;
1775  /*
1776  Coulomb INTRA
1777  */
1778  for (kintr = 0; kintr < StdI->NCintra; kintr++) {
1779  for (jintr = kintr + 1; jintr < StdI->NCintra; jintr++)
1780  if(StdI->CintraIndx[jintr][0] == StdI->CintraIndx[kintr][0])
1781  {
1782  StdI->Cintra[kintr] += StdI->Cintra[jintr];
1783  StdI->Cintra[jintr] = 0.0;
1784  }
1785  }
1786  nintr0 = 0;
1787  for (kintr = 0; kintr < StdI->NCintra; kintr++) {
1788  if (fabs(StdI->Cintra[kintr]) > 0.000001) nintr0 = nintr0 + 1;
1789  }
1790  if (nintr0 == 0 || StdI->lBoost == 1) StdI->LCintra = 0;
1791  else StdI->LCintra = 1;
1792 
1793  if (StdI->LCintra == 1) {
1794  fp = fopen("coulombintra.def", "w");
1795  fprintf(fp, "=============================================\n");
1796  fprintf(fp, "NCoulombIntra %10d\n", nintr0);
1797  fprintf(fp, "=============================================\n");
1798  fprintf(fp, "================== CoulombIntra ================\n");
1799  fprintf(fp, "=============================================\n");
1800  for (kintr = 0; kintr < StdI->NCintra; kintr++) {
1801  if (fabs(StdI->Cintra[kintr]) > 0.000001)
1802  fprintf(fp, "%5d %25.15f\n",
1803  StdI->CintraIndx[kintr][0], StdI->Cintra[kintr]);
1804  }
1805  fflush(fp);
1806  fclose(fp);
1807  fprintf(stdout, " coulombintra.def is written.\n");
1808  }/*if (StdI->LCintra == 1)*/
1809  /*
1810  Coulomb INTER
1811  */
1812  for (kintr = 0; kintr < StdI->NCinter; kintr++) {
1813  for (jintr = kintr + 1; jintr < StdI->NCinter; jintr++)
1814  if (
1815  ( StdI->CinterIndx[jintr][0] == StdI->CinterIndx[kintr][0]
1816  && StdI->CinterIndx[jintr][1] == StdI->CinterIndx[kintr][1])
1817  ||
1818  ( StdI->CinterIndx[jintr][0] == StdI->CinterIndx[kintr][1]
1819  && StdI->CinterIndx[jintr][1] == StdI->CinterIndx[kintr][0])
1820  )
1821  {
1822  StdI->Cinter[kintr] += StdI->Cinter[jintr];
1823  StdI->Cinter[jintr] = 0.0;
1824  }
1825  }/*for (kintr = 0; kintr < StdI->NCinter; kintr++)*/
1826  nintr0 = 0;
1827  for (kintr = 0; kintr < StdI->NCinter; kintr++) {
1828  if (fabs(StdI->Cinter[kintr]) > 0.000001) nintr0 = nintr0 + 1;
1829  }
1830  if (nintr0 == 0 || StdI->lBoost == 1) StdI->LCinter = 0;
1831  else StdI->LCinter = 1;
1832 
1833  if (StdI->LCinter == 1) {
1834  fp = fopen("coulombinter.def", "w");
1835  fprintf(fp, "=============================================\n");
1836  fprintf(fp, "NCoulombInter %10d\n", nintr0);
1837  fprintf(fp, "=============================================\n");
1838  fprintf(fp, "================== CoulombInter ================\n");
1839  fprintf(fp, "=============================================\n");
1840  for (kintr = 0; kintr < StdI->NCinter; kintr++) {
1841  if (fabs(StdI->Cinter[kintr]) > 0.000001)
1842  fprintf(fp, "%5d %5d %25.15f\n",
1843  StdI->CinterIndx[kintr][0], StdI->CinterIndx[kintr][1], StdI->Cinter[kintr]);
1844  }
1845  fflush(fp);
1846  fclose(fp);
1847  fprintf(stdout, " coulombinter.def is written.\n");
1848  }/*if (StdI->LCinter == 1)*/
1849  /*
1850  Hund
1851  */
1852  for (kintr = 0; kintr < StdI->NHund; kintr++) {
1853  for (jintr = kintr + 1; jintr < StdI->NHund; jintr++)
1854  if (
1855  (StdI->HundIndx[jintr][0] == StdI->HundIndx[kintr][0]
1856  && StdI->HundIndx[jintr][1] == StdI->HundIndx[kintr][1])
1857  ||
1858  (StdI->HundIndx[jintr][0] == StdI->HundIndx[kintr][1]
1859  && StdI->HundIndx[jintr][1] == StdI->HundIndx[kintr][0])
1860  )
1861  {
1862  StdI->Hund[kintr] += StdI->Hund[jintr];
1863  StdI->Hund[jintr] = 0.0;
1864  }
1865  }/*for (kintr = 0; kintr < StdI->NHund; kintr++)*/
1866  nintr0 = 0;
1867  for (kintr = 0; kintr < StdI->NHund; kintr++) {
1868  if (fabs(StdI->Hund[kintr]) > 0.000001) nintr0 = nintr0 + 1;
1869  }
1870  if (nintr0 == 0 || StdI->lBoost == 1) StdI->LHund = 0;
1871  else StdI->LHund = 1;
1872 
1873  if (StdI->LHund == 1) {
1874  fp = fopen("hund.def", "w");
1875  fprintf(fp, "=============================================\n");
1876  fprintf(fp, "NHund %10d\n", nintr0);
1877  fprintf(fp, "=============================================\n");
1878  fprintf(fp, "=============== Hund coupling ===============\n");
1879  fprintf(fp, "=============================================\n");
1880  for (kintr = 0; kintr < StdI->NHund; kintr++) {
1881  if (fabs(StdI->Hund[kintr]) > 0.000001)
1882  fprintf(fp, "%5d %5d %25.15f\n",
1883  StdI->HundIndx[kintr][0], StdI->HundIndx[kintr][1], StdI->Hund[kintr]);
1884  }
1885  fflush(fp);
1886  fclose(fp);
1887  fprintf(stdout, " hund.def is written.\n");
1888  }/*if (StdI->LHund == 1)*/
1889  /*
1890  Exchange
1891  */
1892  for (kintr = 0; kintr < StdI->NEx; kintr++) {
1893  for (jintr = kintr + 1; jintr < StdI->NEx; jintr++)
1894  if (
1895  (StdI->ExIndx[jintr][0] == StdI->ExIndx[kintr][0]
1896  && StdI->ExIndx[jintr][1] == StdI->ExIndx[kintr][1])
1897  ||
1898  (StdI->ExIndx[jintr][0] == StdI->ExIndx[kintr][1]
1899  && StdI->ExIndx[jintr][1] == StdI->ExIndx[kintr][0])
1900  )
1901  {
1902  StdI->Ex[kintr] += StdI->Ex[jintr];
1903  StdI->Ex[jintr] = 0.0;
1904  }
1905  }/*for (kintr = 0; kintr < StdI->NEx; kintr++)*/
1906  nintr0 = 0;
1907  for (kintr = 0; kintr < StdI->NEx; kintr++) {
1908  if (fabs(StdI->Ex[kintr]) > 0.000001) nintr0 = nintr0 + 1;
1909  }
1910  if (nintr0 == 0 || StdI->lBoost == 1) StdI->LEx = 0;
1911  else StdI->LEx = 1;
1912 
1913  if (StdI->LEx == 1) {
1914  fp = fopen("exchange.def", "w");
1915  fprintf(fp, "=============================================\n");
1916  fprintf(fp, "NExchange %10d\n", nintr0);
1917  fprintf(fp, "=============================================\n");
1918  fprintf(fp, "====== ExchangeCoupling coupling ============\n");
1919  fprintf(fp, "=============================================\n");
1920  for (kintr = 0; kintr < StdI->NEx; kintr++) {
1921  if (fabs(StdI->Ex[kintr]) > 0.000001)
1922  fprintf(fp, "%5d %5d %25.15f\n",
1923  StdI->ExIndx[kintr][0], StdI->ExIndx[kintr][1], StdI->Ex[kintr]);
1924  }
1925  fflush(fp);
1926  fclose(fp);
1927  fprintf(stdout, " exchange.def is written.\n");
1928  }
1929  /*
1930  PairLift
1931  */
1932  for (kintr = 0; kintr < StdI->NPairLift; kintr++) {
1933  for (jintr = kintr + 1; jintr < StdI->NPairLift; jintr++)
1934  if (
1935  (StdI->PLIndx[jintr][0] == StdI->PLIndx[kintr][0]
1936  && StdI->PLIndx[jintr][1] == StdI->PLIndx[kintr][1])
1937  ||
1938  (StdI->PLIndx[jintr][0] == StdI->PLIndx[kintr][1]
1939  && StdI->PLIndx[jintr][1] == StdI->PLIndx[kintr][0])
1940  )
1941  {
1942  StdI->PairLift[kintr] += StdI->PairLift[jintr];
1943  StdI->PairLift[jintr] = 0.0;
1944  }
1945  }/*for (kintr = 0; kintr < StdI->NPairLift; kintr++)*/
1946  nintr0 = 0;
1947  for (kintr = 0; kintr < StdI->NPairLift; kintr++) {
1948  if (fabs(StdI->PairLift[kintr]) > 0.000001) nintr0 = nintr0 + 1;
1949  }
1950  if (nintr0 == 0 || StdI->lBoost == 1) StdI->LPairLift = 0;
1951  else StdI->LPairLift = 1;
1952 
1953  if (StdI->LPairLift == 1) {
1954  fp = fopen("pairlift.def", "w");
1955  fprintf(fp, "=============================================\n");
1956  fprintf(fp, "NPairLift %10d\n", nintr0);
1957  fprintf(fp, "=============================================\n");
1958  fprintf(fp, "====== Pair-Lift term ============\n");
1959  fprintf(fp, "=============================================\n");
1960  for (kintr = 0; kintr < StdI->NPairLift; kintr++) {
1961  if (fabs(StdI->PairLift[kintr]) > 0.000001)
1962  fprintf(fp, "%5d %5d %25.15f\n",
1963  StdI->PLIndx[kintr][0], StdI->PLIndx[kintr][1], StdI->PairLift[kintr]);
1964  }
1965  fflush(fp);
1966  fclose(fp);
1967  fprintf(stdout, " pairlift.def is written.\n");
1968  }
1969  /*
1970  PairHopp
1971  */
1972  for (kintr = 0; kintr < StdI->NPairHopp; kintr++) {
1973  for (jintr = kintr + 1; jintr < StdI->NPairHopp; jintr++)
1974  if (
1975  (StdI->PHIndx[jintr][0] == StdI->PHIndx[kintr][0]
1976  && StdI->PHIndx[jintr][1] == StdI->PHIndx[kintr][1])
1977  ||
1978  (StdI->PHIndx[jintr][0] == StdI->PHIndx[kintr][1]
1979  && StdI->PHIndx[jintr][1] == StdI->PHIndx[kintr][0])
1980  )
1981  {
1982  StdI->PairHopp[kintr] += StdI->PairHopp[jintr];
1983  StdI->PairHopp[jintr] = 0.0;
1984  }
1985  }/*for (kintr = 0; kintr < StdI->NPairHopp; kintr++)*/
1986  nintr0 = 0;
1987  for (kintr = 0; kintr < StdI->NPairHopp; kintr++) {
1988  if (fabs(StdI->PairHopp[kintr]) > 0.000001) nintr0 = nintr0 + 1;
1989  }
1990  if (nintr0 == 0 || StdI->lBoost == 1) StdI->LPairHopp = 0;
1991  else StdI->LPairHopp = 1;
1992 
1993  if (StdI->LPairHopp == 1) {
1994  fp = fopen("pairhopp.def", "w");
1995  fprintf(fp, "=============================================\n");
1996  fprintf(fp, "NPairHopp %10d\n", nintr0);
1997  fprintf(fp, "=============================================\n");
1998  fprintf(fp, "====== Pair-Hopping term ============\n");
1999  fprintf(fp, "=============================================\n");
2000  for (kintr = 0; kintr < StdI->NPairHopp; kintr++) {
2001  if (fabs(StdI->PairHopp[kintr]) > 0.000001)
2002  fprintf(fp, "%5d %5d %25.15f\n",
2003  StdI->PHIndx[kintr][0], StdI->PHIndx[kintr][1], StdI->PairHopp[kintr]);
2004  }
2005  fflush(fp);
2006  fclose(fp);
2007  fprintf(stdout, " pairhopp.def is written.\n");
2008  }
2009  /*
2010  InterAll
2011  */
2012  for (jintr = 0; jintr < StdI->nintr; jintr++) {
2013  for (kintr = jintr + 1; kintr < StdI->nintr; kintr++) {
2014  if (
2015  (StdI->intrindx[jintr][0] == StdI->intrindx[kintr][0]
2016  && StdI->intrindx[jintr][1] == StdI->intrindx[kintr][1]
2017  && StdI->intrindx[jintr][2] == StdI->intrindx[kintr][2]
2018  && StdI->intrindx[jintr][3] == StdI->intrindx[kintr][3]
2019  && StdI->intrindx[jintr][4] == StdI->intrindx[kintr][4]
2020  && StdI->intrindx[jintr][5] == StdI->intrindx[kintr][5]
2021  && StdI->intrindx[jintr][6] == StdI->intrindx[kintr][6]
2022  && StdI->intrindx[jintr][7] == StdI->intrindx[kintr][7])
2023  ||
2024  (StdI->intrindx[jintr][0] == StdI->intrindx[kintr][4]
2025  && StdI->intrindx[jintr][1] == StdI->intrindx[kintr][5]
2026  && StdI->intrindx[jintr][2] == StdI->intrindx[kintr][6]
2027  && StdI->intrindx[jintr][3] == StdI->intrindx[kintr][7]
2028  && StdI->intrindx[jintr][4] == StdI->intrindx[kintr][0]
2029  && StdI->intrindx[jintr][5] == StdI->intrindx[kintr][1]
2030  && StdI->intrindx[jintr][6] == StdI->intrindx[kintr][2]
2031  && StdI->intrindx[jintr][7] == StdI->intrindx[kintr][3])
2032  ) {
2033  StdI->intr[jintr] = StdI->intr[jintr] + StdI->intr[kintr];
2034  StdI->intr[kintr] = 0.0;
2035  }
2036  else if (
2037  (StdI->intrindx[jintr][0] == StdI->intrindx[kintr][4]
2038  && StdI->intrindx[jintr][1] == StdI->intrindx[kintr][5]
2039  && StdI->intrindx[jintr][2] == StdI->intrindx[kintr][2]
2040  && StdI->intrindx[jintr][3] == StdI->intrindx[kintr][3]
2041  && StdI->intrindx[jintr][4] == StdI->intrindx[kintr][0]
2042  && StdI->intrindx[jintr][5] == StdI->intrindx[kintr][1]
2043  && StdI->intrindx[jintr][6] == StdI->intrindx[kintr][6]
2044  && StdI->intrindx[jintr][7] == StdI->intrindx[kintr][7])
2045  ||
2046  (StdI->intrindx[jintr][0] == StdI->intrindx[kintr][0]
2047  && StdI->intrindx[jintr][1] == StdI->intrindx[kintr][1]
2048  && StdI->intrindx[jintr][2] == StdI->intrindx[kintr][6]
2049  && StdI->intrindx[jintr][3] == StdI->intrindx[kintr][7]
2050  && StdI->intrindx[jintr][4] == StdI->intrindx[kintr][4]
2051  && StdI->intrindx[jintr][5] == StdI->intrindx[kintr][5]
2052  && StdI->intrindx[jintr][6] == StdI->intrindx[kintr][2]
2053  && StdI->intrindx[jintr][7] == StdI->intrindx[kintr][3])
2054  ) {
2055  StdI->intr[jintr] = StdI->intr[jintr] - StdI->intr[kintr];
2056  StdI->intr[kintr] = 0.0;
2057  }
2058  }/*for (kintr = jintr + 1; kintr < StdI->nintr; kintr++)*/
2059  }/*for (jintr = 0; jintr < StdI->nintr; jintr++)*/
2060 
2061  for (jintr = 0; jintr < StdI->nintr; jintr++) {
2062  for (kintr = jintr + 1; kintr < StdI->nintr; kintr++) {
2063  if (StdI->intrindx[jintr][6] == StdI->intrindx[kintr][4]
2064  && StdI->intrindx[jintr][7] == StdI->intrindx[kintr][5]
2065  && StdI->intrindx[jintr][4] == StdI->intrindx[kintr][6]
2066  && StdI->intrindx[jintr][5] == StdI->intrindx[kintr][7]
2067  && StdI->intrindx[jintr][2] == StdI->intrindx[kintr][0]
2068  && StdI->intrindx[jintr][3] == StdI->intrindx[kintr][1]
2069  && StdI->intrindx[jintr][0] == StdI->intrindx[kintr][2]
2070  && StdI->intrindx[jintr][1] == StdI->intrindx[kintr][3]
2071  ) {
2072  StdI->intrindx[kintr][0] = StdI->intrindx[jintr][6];
2073  StdI->intrindx[kintr][1] = StdI->intrindx[jintr][7];
2074  StdI->intrindx[kintr][2] = StdI->intrindx[jintr][4];
2075  StdI->intrindx[kintr][3] = StdI->intrindx[jintr][5];
2076  StdI->intrindx[kintr][4] = StdI->intrindx[jintr][2];
2077  StdI->intrindx[kintr][5] = StdI->intrindx[jintr][3];
2078  StdI->intrindx[kintr][6] = StdI->intrindx[jintr][0];
2079  StdI->intrindx[kintr][7] = StdI->intrindx[jintr][1];
2080  }
2081  else if (
2082  (StdI->intrindx[jintr][6] == StdI->intrindx[kintr][4]
2083  && StdI->intrindx[jintr][7] == StdI->intrindx[kintr][5]
2084  && StdI->intrindx[jintr][4] == StdI->intrindx[kintr][2]
2085  && StdI->intrindx[jintr][5] == StdI->intrindx[kintr][3]
2086  && StdI->intrindx[jintr][2] == StdI->intrindx[kintr][0]
2087  && StdI->intrindx[jintr][3] == StdI->intrindx[kintr][1]
2088  && StdI->intrindx[jintr][0] == StdI->intrindx[kintr][6]
2089  && StdI->intrindx[jintr][1] == StdI->intrindx[kintr][7])
2090  ||
2091  (StdI->intrindx[jintr][6] == StdI->intrindx[kintr][0]
2092  && StdI->intrindx[jintr][7] == StdI->intrindx[kintr][1]
2093  && StdI->intrindx[jintr][4] == StdI->intrindx[kintr][6]
2094  && StdI->intrindx[jintr][5] == StdI->intrindx[kintr][7]
2095  && StdI->intrindx[jintr][2] == StdI->intrindx[kintr][4]
2096  && StdI->intrindx[jintr][3] == StdI->intrindx[kintr][5]
2097  && StdI->intrindx[jintr][0] == StdI->intrindx[kintr][2]
2098  && StdI->intrindx[jintr][1] == StdI->intrindx[kintr][3])
2099  ) {
2100  StdI->intrindx[kintr][0] = StdI->intrindx[jintr][6];
2101  StdI->intrindx[kintr][1] = StdI->intrindx[jintr][7];
2102  StdI->intrindx[kintr][2] = StdI->intrindx[jintr][4];
2103  StdI->intrindx[kintr][3] = StdI->intrindx[jintr][5];
2104  StdI->intrindx[kintr][4] = StdI->intrindx[jintr][2];
2105  StdI->intrindx[kintr][5] = StdI->intrindx[jintr][3];
2106  StdI->intrindx[kintr][6] = StdI->intrindx[jintr][0];
2107  StdI->intrindx[kintr][7] = StdI->intrindx[jintr][1];
2108 
2109  StdI->intr[kintr] = -StdI->intr[kintr];
2110  }
2111  }/*for (kintr = jintr + 1; kintr < StdI->nintr; kintr++)*/
2112  }/*for (jintr = 0; jintr < StdI->nintr; jintr++)*/
2113 
2114  for (jintr = 0; jintr < StdI->nintr; jintr++) {
2115 
2116  if (
2117  (StdI->intrindx[jintr][0] == StdI->intrindx[jintr][4]
2118  && StdI->intrindx[jintr][1] == StdI->intrindx[jintr][5]) ||
2119  (StdI->intrindx[jintr][2] == StdI->intrindx[jintr][6]
2120  && StdI->intrindx[jintr][3] == StdI->intrindx[jintr][7])
2121  ) {
2122 
2123  if (!(
2124  (StdI->intrindx[jintr][0] == StdI->intrindx[jintr][2]
2125  && StdI->intrindx[jintr][1] == StdI->intrindx[jintr][3])
2126  ||
2127  (StdI->intrindx[jintr][0] == StdI->intrindx[jintr][6]
2128  && StdI->intrindx[jintr][1] == StdI->intrindx[jintr][7])
2129  ||
2130  (StdI->intrindx[jintr][4] == StdI->intrindx[jintr][2]
2131  && StdI->intrindx[jintr][5] == StdI->intrindx[jintr][3])
2132  ||
2133  (StdI->intrindx[jintr][4] == StdI->intrindx[jintr][6]
2134  && StdI->intrindx[jintr][5] == StdI->intrindx[jintr][7])
2135  ))
2136  StdI->intr[jintr] = 0.0;
2137  }
2138  }/*for (jintr = 0; jintr < StdI->nintr; jintr++)*/
2139 
2140  nintr0 = 0;
2141  for (kintr = 0; kintr < StdI->nintr; kintr++) {
2142  if (cabs(StdI->intr[kintr]) > 0.000001) nintr0 = nintr0 + 1;
2143  }
2144  if (nintr0 == 0 || StdI->lBoost == 1) StdI->Lintr = 0;
2145  else StdI->Lintr = 1;
2146 
2147  if (StdI->Lintr == 1) {
2148  fp = fopen("interall.def", "w");
2149  fprintf(fp, "====================== \n");
2150  fprintf(fp, "NInterAll %7d \n", nintr0);
2151  fprintf(fp, "====================== \n");
2152  fprintf(fp, "========zInterAll===== \n");
2153  fprintf(fp, "====================== \n");
2154 
2155  if (StdI->lBoost == 0) {
2156  nintr0 = 0;
2157  for (kintr = 0; kintr < StdI->nintr; kintr++) {
2158  if (cabs(StdI->intr[kintr]) > 0.000001)
2159  fprintf(fp, "%5d %5d %5d %5d %5d %5d %5d %5d %25.15f %25.15f\n",
2160  StdI->intrindx[kintr][0], StdI->intrindx[kintr][1],
2161  StdI->intrindx[kintr][2], StdI->intrindx[kintr][3],
2162  StdI->intrindx[kintr][4], StdI->intrindx[kintr][5],
2163  StdI->intrindx[kintr][6], StdI->intrindx[kintr][7],
2164  creal(StdI->intr[kintr]), cimag(StdI->intr[kintr]));
2165  }/*for (kintr = 0; kintr < StdI->nintr; kintr++)*/
2166  }/* if (StdI->lBoost == 0)*/
2167 
2168  fflush(fp);
2169  fclose(fp);
2170  fprintf(stdout, " interall.def is written.\n");
2171  }
2172 }/*static void PrintInteractions*/
int NPairHopp
Number of pair-hopping term, counted in each lattice file.
Definition: StdFace_vals.h:200
int LEx
Print exchange.def or not, set in PrintInteractions().
Definition: StdFace_vals.h:185
int NHund
Number of Hund term, counted in each lattice file.
Definition: StdFace_vals.h:176
double complex * intr
[StdIntList::nintr] Coefficient of general two-body term, malloc in StdFace_MallocInteractions() and ...
Definition: StdFace_vals.h:155
int LCinter
Print coulombinter.def or not, set in PrintInteractions().
Definition: StdFace_vals.h:169
double * Ex
[StdIntList::NEx] Coefficient of exchange term, malloc in StdFace_MallocInteractions() and set in Std...
Definition: StdFace_vals.h:189
int LCintra
Print coulombintra.def or not, set in PrintInteractions().
Definition: StdFace_vals.h:160
int ** PLIndx
[StdIntList::NPairLift][2] Site indices of pair-lift term, malloc in StdFace_MallocInteractions() and...
Definition: StdFace_vals.h:194
int ** ExIndx
[StdIntList::NEx][2] Site indices of exchange term, malloc in StdFace_MallocInteractions() and set in...
Definition: StdFace_vals.h:186
int ** CintraIndx
[StdIntList::NCintra][1] Site indices of intra-site Coulomb term, malloc in StdFace_MallocInteraction...
Definition: StdFace_vals.h:161
int NCinter
Number of inter-site Coulomb interaction, counted in each lattice file.
Definition: StdFace_vals.h:167
int NCintra
Number of intra-site Coulomb interaction, counted in each lattice file.
Definition: StdFace_vals.h:158
int LPairLift
Print pairlift.def or not, set in PrintInteractions().
Definition: StdFace_vals.h:193
int Lintr
Print interall.def or not, set in PrintInteractions().
Definition: StdFace_vals.h:151
double * Hund
[StdIntList::NHund] Coefficient of Hund term, malloc in StdFace_MallocInteractions() and set in StdFa...
Definition: StdFace_vals.h:181
double * PairLift
[StdIntList::NPairLift] Coefficient of pair-lift term, malloc in StdFace_MallocInteractions() and set...
Definition: StdFace_vals.h:197
int NPairLift
Number of pair-lift term, counted in each lattice file.
Definition: StdFace_vals.h:192
int ** HundIndx
[StdIntList::NHund][2] Site indices of Hund term, malloc in StdFace_MallocInteractions() and set in S...
Definition: StdFace_vals.h:178
int LHund
Print hund.def or not, set in PrintInteractions().
Definition: StdFace_vals.h:177
int NEx
Number of exchange term, counted in each lattice file.
Definition: StdFace_vals.h:184
int ** intrindx
[StdIntList::nintr][8] Site/spin indices of two-body term, malloc in StdFace_MallocInteractions() and...
Definition: StdFace_vals.h:152
double * PairHopp
[StdIntList::NPairLift] Coefficient of pair-hopping term, malloc in StdFace_MallocInteractions() and ...
Definition: StdFace_vals.h:205
double * Cintra
[StdIntList::NCintra] Coefficient of intra-site Coulomb term, malloc in StdFace_MallocInteractions() ...
Definition: StdFace_vals.h:164
int nintr
Number of InterAll, counted in each lattice file.
Definition: StdFace_vals.h:150
int ** PHIndx
[StdIntList::NPairLift][2] Site indices of pair-hopping term, malloc in StdFace_MallocInteractions() ...
Definition: StdFace_vals.h:202
double * Cinter
[StdIntList::NCinter] Coefficient of inter-site Coulomb term, malloc in StdFace_MallocInteractions() ...
Definition: StdFace_vals.h:173
int LPairHopp
Print pairhopp.def or not, set in PrintInteractions().
Definition: StdFace_vals.h:201
int ** CinterIndx
[StdIntList::NCinter][2] Site indices of inter-site Coulomb term, malloc in StdFace_MallocInteraction...
Definition: StdFace_vals.h:170

◆ PrintLocSpin()

static void PrintLocSpin ( struct StdIntList StdI)
static

Print the locspin file.

Author
Mitsuaki Kawamura (The University of Tokyo)

Definition at line 1124 of file StdFace_main.c.

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

Referenced by StdFace_main().

1124  {
1125  FILE *fp;
1126  int isite, nlocspin;
1127 
1128  nlocspin = 0;
1129  for (isite = 0; isite < StdI->nsite; isite++)
1130  if (StdI->locspinflag[isite] != 0) nlocspin = nlocspin + 1;
1131 
1132  fp = fopen("locspn.def", "w");
1133  fprintf(fp, "================================ \n");
1134  fprintf(fp, "NlocalSpin %5d \n", nlocspin);
1135  fprintf(fp, "================================ \n");
1136  fprintf(fp, "========i_0LocSpn_1IteElc ====== \n");
1137  fprintf(fp, "================================ \n");
1138 
1139  for (isite = 0; isite < StdI->nsite; isite++)
1140  fprintf(fp, "%5d %5d\n", isite, StdI->locspinflag[isite]);
1141 
1142  fflush(fp);
1143  fclose(fp);
1144  fprintf(stdout, " locspn.def is written.\n");
1145 }/*static void PrintLocSpin*/
int * locspinflag
[StdIntList::nsite] LocSpin in Expert mode, malloc and set in each lattice file.
Definition: StdFace_vals.h:141
int nsite
Number of sites, set in the each lattice file.
Definition: StdFace_vals.h:140

◆ PrintModPara()

static void PrintModPara ( struct StdIntList StdI)
static

Print modpara.def.

Author
Mitsuaki Kawamura (The University of Tokyo)

Definition at line 1244 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().

1245 {
1246  FILE *fp;
1247 
1248  fp = fopen("modpara.def", "w");
1249  fprintf(fp, "--------------------\n");
1250  fprintf(fp, "Model_Parameters 0\n");
1251  fprintf(fp, "--------------------\n");
1252 #if defined(_HPhi)
1253  fprintf(fp, "HPhi_Cal_Parameters\n");
1254  fprintf(fp, "--------------------\n");
1255  fprintf(fp, "CDataFileHead %s\n", StdI->CDataFileHead);
1256  fprintf(fp, "CParaFileHead zqp\n");
1257  fprintf(fp, "--------------------\n");
1258  fprintf(fp, "Nsite %-5d\n", StdI->nsite);
1259  if (StdI->Sz2 != StdI->NaN_i) fprintf(fp, "2Sz %-5d\n", StdI->Sz2);
1260  if (StdI->nelec != StdI->NaN_i) fprintf(fp, "Ncond %-5d\n", StdI->nelec);
1261  fprintf(fp, "Lanczos_max %-5d\n", StdI->Lanczos_max);
1262  fprintf(fp, "initial_iv %-5d\n", StdI->initial_iv);
1263  if(StdI->nvec != StdI->NaN_i) fprintf(fp, "nvec %-5d\n", StdI->nvec);
1264  fprintf(fp, "exct %-5d\n", StdI->exct);
1265  fprintf(fp, "LanczosEps %-5d\n", StdI->LanczosEps);
1266  fprintf(fp, "LanczosTarget %-5d\n", StdI->LanczosTarget);
1267  fprintf(fp, "LargeValue %-25.15e\n", StdI->LargeValue);
1268  fprintf(fp, "NumAve %-5d\n", StdI->NumAve);
1269  fprintf(fp, "ExpecInterval %-5d\n", StdI->ExpecInterval);
1270  fprintf(fp, "NOmega %-5d\n", StdI->Nomega);
1271  fprintf(fp, "OmegaMax %-25.15e %-25.15e\n", StdI->OmegaMax, StdI->OmegaIm);
1272  fprintf(fp, "OmegaMin %-25.15e %-25.15e\n", StdI->OmegaMin, StdI->OmegaIm);
1273  fprintf(fp, "OmegaOrg 0.0 0.0\n");
1274  if (strcmp(StdI->method, "timeevolution") == 0)
1275  fprintf(fp, "ExpandCoef %-5d\n", StdI->ExpandCoef);
1276 #elif defined(_mVMC)
1277  fprintf(fp, "VMC_Cal_Parameters\n");
1278  fprintf(fp, "--------------------\n");
1279  fprintf(fp, "CDataFileHead %s\n", StdI->CDataFileHead);
1280  fprintf(fp, "CParaFileHead %s\n", StdI->CParaFileHead);
1281  fprintf(fp, "--------------------\n");
1282  fprintf(fp, "NVMCCalMode %d\n", StdI->NVMCCalMode);
1283  /*fprintf(fp, "NLanczosMode %d\n", StdI->NLanczosMode);*/
1284  fprintf(fp, "--------------------\n");
1285  fprintf(fp, "NDataIdxStart %d\n", StdI->NDataIdxStart);
1286  fprintf(fp, "NDataQtySmp %d\n", StdI->NDataQtySmp);
1287  fprintf(fp, "--------------------\n");
1288  fprintf(fp, "Nsite %d\n", StdI->nsite);
1289  fprintf(fp, "Ncond %-5d\n", StdI->nelec);
1290  if (StdI->Sz2 != StdI->NaN_i)
1291  fprintf(fp, "2Sz %d\n", StdI->Sz2);
1292  if (StdI->NSPGaussLeg != StdI->NaN_i)
1293  fprintf(fp, "NSPGaussLeg %d\n", StdI->NSPGaussLeg);
1294  if (StdI->NSPStot != StdI->NaN_i)
1295  fprintf(fp, "NSPStot %d\n", StdI->NSPStot);
1296  fprintf(fp, "NMPTrans %d\n", StdI->NMPTrans);
1297  fprintf(fp, "NSROptItrStep %d\n", StdI->NSROptItrStep);
1298  fprintf(fp, "NSROptItrSmp %d\n", StdI->NSROptItrSmp);
1299  fprintf(fp, "DSROptRedCut %.10f\n", StdI->DSROptRedCut);
1300  fprintf(fp, "DSROptStaDel %.10f\n", StdI->DSROptStaDel);
1301  fprintf(fp, "DSROptStepDt %.10f\n", StdI->DSROptStepDt);
1302  fprintf(fp, "NVMCWarmUp %d\n", StdI->NVMCWarmUp);
1303  fprintf(fp, "NVMCInterval %d\n", StdI->NVMCInterval);
1304  fprintf(fp, "NVMCSample %d\n", StdI->NVMCSample);
1305  fprintf(fp, "NExUpdatePath %d\n", StdI->NExUpdatePath);
1306  fprintf(fp, "RndSeed %d\n", StdI->RndSeed);
1307  fprintf(fp, "NSplitSize %d\n", StdI->NSplitSize);
1308  fprintf(fp, "NStore %d\n", StdI->NStore);
1309  fprintf(fp, "NSRCG %d\n", StdI->NSRCG);
1310 #endif
1311 
1312  fflush(fp);
1313  fclose(fp);
1314  fprintf(stdout, " modpara.def is written.\n");
1315 }/*static void PrintModPara*/
double OmegaIm
Imaginary part of frequency.
Definition: StdFace_vals.h:262
int ExpandCoef
The number of Hamiltonian-vector operation for the time-evolution.
Definition: StdFace_vals.h:286
int initial_iv
the number for generating random number, input from file.
Definition: StdFace_vals.h:238
int NumAve
Number of trials for TPQ calculation.
Definition: StdFace_vals.h:243
int Nomega
Number of frequencies, input from file.
Definition: StdFace_vals.h:259
double OmegaMax
Maximum of frequency for spectrum, input from file.
Definition: StdFace_vals.h:260
int exct
The number of eigenvectors to be computed. input from file.
Definition: StdFace_vals.h:240
double OmegaMin
Minimum of frequency for spectrum, input from file.
Definition: StdFace_vals.h:261
int LanczosTarget
Which eigenvector is used for the convergence check.
Definition: StdFace_vals.h:242
int LanczosEps
Convergence threshold for the Lanczos method.
Definition: StdFace_vals.h:241
int Lanczos_max
The maxixmum number of iterations, input from file.
Definition: StdFace_vals.h:237
char method[256]
The name of method, input from file.
Definition: StdFace_vals.h:232
double LargeValue
The shift parameter for the TPQ calculation.
Definition: StdFace_vals.h:246
int Sz2
Total Sz, input from file.
Definition: StdFace_vals.h:220
int nsite
Number of sites, set in the each lattice file.
Definition: StdFace_vals.h:140
int nelec
Number of electrons, input from file.
Definition: StdFace_vals.h:214
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:244
char CDataFileHead[256]
Header of the output files. Input from file.
Definition: StdFace_vals.h:218

◆ PrintNamelist()

static void PrintNamelist ( struct StdIntList StdI)
static

Print namelist.def

Author
Mitsuaki Kawamura (The University of Tokyo)

Definition at line 1195 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().

1195  {
1196  FILE *fp;
1197 
1198  fp = fopen("namelist.def", "w");
1199  fprintf( fp, " ModPara modpara.def\n");
1200  fprintf( fp, " LocSpin locspn.def\n");
1201  fprintf( fp, " Trans trans.def\n");
1202  if (StdI->LCintra == 1) fprintf( fp, " CoulombIntra coulombintra.def\n");
1203  if (StdI->LCinter == 1) fprintf( fp, " CoulombInter coulombinter.def\n");
1204  if (StdI->LHund == 1)fprintf( fp, " Hund hund.def\n");
1205  if (StdI->LEx == 1)fprintf( fp, " Exchange exchange.def\n");
1206  if (StdI->LPairLift == 1)fprintf(fp, " PairLift pairlift.def\n");
1207  if (StdI->LPairHopp == 1)fprintf(fp, " PairHop pairhopp.def\n");
1208  if (StdI->Lintr == 1)fprintf( fp, " InterAll interall.def\n");
1209  if (StdI->ioutputmode != 0) {
1210  fprintf( fp, " OneBodyG greenone.def\n");
1211  fprintf( fp, " TwoBodyG greentwo.def\n");
1212  }
1213 #if defined(_HPhi)
1214  fprintf( fp, " CalcMod calcmod.def\n");
1215  if(StdI->SpectrumBody == 1)
1216  fprintf( fp, "SingleExcitation single.def\n");
1217  else fprintf( fp, " PairExcitation pair.def\n");
1218  if (strcmp(StdI->method, "timeevolution") == 0) {
1219  if (StdI->PumpBody == 1)
1220  fprintf(fp, " TEOneBody teone.def\n");
1221  else if (StdI->PumpBody == 2)
1222  fprintf(fp, " TETwoBody tetwo.def\n");
1223  }/*if (strcmp(StdI->method, "timeevolution") == 0)*/
1224  fprintf( fp, " SpectrumVec %s_eigenvec_0\n",
1225  StdI->CDataFileHead);
1226  if (StdI->lBoost == 1) fprintf( fp, " Boost boost.def\n");
1227 #elif defined(_mVMC)
1228  fprintf( fp, " Gutzwiller gutzwilleridx.def\n");
1229  fprintf( fp, " Jastrow jastrowidx.def\n");
1230  fprintf( fp, " Orbital orbitalidx.def\n");
1231  if (StdI->lGC == 1 || (StdI->Sz2 != 0 && StdI->Sz2 != StdI->NaN_i))
1232  fprintf(fp, " OrbitalParallel orbitalidxpara.def\n");
1233  fprintf( fp, " TransSym qptransidx.def\n");
1234 #endif
1235 
1236  fflush(fp);
1237  fclose(fp);
1238  fprintf(stdout, " namelist.def is written.\n");
1239 }/*static void PrintNamelist*/
int LEx
Print exchange.def or not, set in PrintInteractions().
Definition: StdFace_vals.h:185
int LCinter
Print coulombinter.def or not, set in PrintInteractions().
Definition: StdFace_vals.h:169
int LCintra
Print coulombintra.def or not, set in PrintInteractions().
Definition: StdFace_vals.h:160
int ioutputmode
Switch associated to StdIntList::outputmode.
Definition: StdFace_vals.h:221
int LPairLift
Print pairlift.def or not, set in PrintInteractions().
Definition: StdFace_vals.h:193
int Lintr
Print interall.def or not, set in PrintInteractions().
Definition: StdFace_vals.h:151
int PumpBody
one- or two-body pumping, defined from StdIntList::PumpType
Definition: StdFace_vals.h:276
int LHund
Print hund.def or not, set in PrintInteractions().
Definition: StdFace_vals.h:177
char method[256]
The name of method, input from file.
Definition: StdFace_vals.h:232
int lGC
Switch for computing Grandcanonical ensemble(== 1). Setted in StdFace_main() after all keywords are r...
Definition: StdFace_vals.h:212
int Sz2
Total Sz, input from file.
Definition: StdFace_vals.h:220
int SpectrumBody
one- or two-body excitation, defined from StdIntList::SpectrumType
Definition: StdFace_vals.h:264
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:218
int LPairHopp
Print pairhopp.def or not, set in PrintInteractions().
Definition: StdFace_vals.h:201

◆ PrintPump()

static void PrintPump ( struct StdIntList StdI)
static

Print single.def or pair.def.

Author
Mitsuaki Kawamura (The University of Tokyo)

Definition at line 526 of file StdFace_main.c.

References StdIntList::dt, StdIntList::Lanczos_max, StdIntList::npump, StdIntList::nsite, StdIntList::pump, StdIntList::PumpBody, StdIntList::pumpindx, and StdIntList::Uquench.

Referenced by StdFace_main().

526  {
527  FILE *fp;
528  int it, ii, isite, ipump, jpump, npump0;
529 
530  if (StdI->PumpBody == 1) {
531 
532  fp = fopen("teone.def", "w");
533  fprintf(fp, "=============================================\n");
534  fprintf(fp, "AllTimeStep %d\n", StdI->Lanczos_max);
535  fprintf(fp, "=============================================\n");
536  fprintf(fp, "========= OneBody Time Evolution ==========\n");
537  fprintf(fp, "=============================================\n");
538  for (it = 0; it < StdI->Lanczos_max; it++) {
539  /*
540  Sum equivalent pumping
541  */
542  for (ipump = 0; ipump < StdI->npump[it]; ipump++) {
543  for (jpump = ipump + 1; jpump < StdI->npump[it]; jpump++) {
544  if (StdI->pumpindx[it][ipump][0] == StdI->pumpindx[it][jpump][0]
545  && StdI->pumpindx[it][ipump][1] == StdI->pumpindx[it][jpump][1]
546  && StdI->pumpindx[it][ipump][2] == StdI->pumpindx[it][jpump][2]
547  && StdI->pumpindx[it][ipump][3] == StdI->pumpindx[it][jpump][3]) {
548  StdI->pump[it][ipump] = StdI->pump[it][ipump] + StdI->pump[it][jpump];
549  StdI->pump[it][jpump] = 0.0;
550  }
551  }/*for (ktrans = jtrans + 1; ktrans < StdI->ntrans; ktrans++)*/
552  }/*for (jtrans = 0; jtrans < StdI->ntrans; jtrans++)*/
553  /*
554  Count the number of finite pumping
555  */
556  npump0 = 0;
557  for (ipump = 0; ipump < StdI->npump[it]; ipump++)
558  if (cabs(StdI->pump[it][ipump]) > 0.000001) npump0 += 1;
559 
560  fprintf(fp, "%f %d\n", StdI->dt*(double)it, npump0);
561  for (ipump = 0; ipump < StdI->npump[it]; ipump++) {
562 
563  if (cabs(StdI->pump[it][ipump]) <= 0.000001) continue;
564 
565  fprintf(fp, "%5d %5d %5d %5d %25.15f %25.15f\n",
566  StdI->pumpindx[it][ipump][0], StdI->pumpindx[it][ipump][1],
567  StdI->pumpindx[it][ipump][2], StdI->pumpindx[it][ipump][3],
568  creal(StdI->pump[it][ipump]), cimag(StdI->pump[it][ipump]));
569  }/*for (itrans = 0; itrans < StdI->ntrans; itrans++)*/
570  }/*for (it = 0; it < StdI->Lanczos_max; it++)*/
571  fprintf(stdout, " teone.def is written.\n\n");
572  }
573  else {
574  fp = fopen("tetwo.def", "w");
575  fprintf(fp, "=============================================\n");
576  fprintf(fp, "AllTimeStep %d\n", StdI->Lanczos_max);
577  fprintf(fp, "=============================================\n");
578  fprintf(fp, "========== TwoBody Time Evolution ===========\n");
579  fprintf(fp, "=============================================\n");
580  for (it = 0; it < StdI->Lanczos_max; it++) {
581  fprintf(fp, "%f %d\n", StdI->dt*(double)it, StdI->nsite);
582  for (isite = 0; isite < StdI->nsite; isite++) {
583  fprintf(fp, "%5d %5d %5d %5d %5d %5d %5d %5d %25.15f %25.15f\n",
584  isite, 0, isite, 0, isite, 1, isite, 1, StdI->Uquench, 0.0);
585  }/*for (isite = 0; isite < StdI->nsite; isite++)*/
586  }/*for (it = 0; it < StdI->Lanczos_max; it++)*/
587  fprintf(stdout, " tetwo.def is written.\n\n");
588  }
589  fflush(fp);
590  fclose(fp);
591 }/*tatic void PrintPump*/
double dt
Time step.
Definition: StdFace_vals.h:269
int *** pumpindx
[StdIntList::nt][StdIntList::npump][4] Site/spin indices of one-body term, malloc in StdFace_MallocIn...
Definition: StdFace_vals.h:279
int PumpBody
one- or two-body pumping, defined from StdIntList::PumpType
Definition: StdFace_vals.h:276
int * npump
[StdIntList::nt] Number of transfer, counted in each lattice file.
Definition: StdFace_vals.h:278
int Lanczos_max
The maxixmum number of iterations, input from file.
Definition: StdFace_vals.h:237
double complex ** pump
[StdIntList::nt][StdIntList::npump] Coefficient of one-body term, malloc in StdFace_MallocInteraction...
Definition: StdFace_vals.h:282
int nsite
Number of sites, set in the each lattice file.
Definition: StdFace_vals.h:140
double Uquench
Quenched on-site potential.
Definition: StdFace_vals.h:273

◆ PrintTrans()

static void PrintTrans ( struct StdIntList StdI)
static

Print the transfer file.

Author
Mitsuaki Kawamura (The University of Tokyo)

Definition at line 1150 of file StdFace_main.c.

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

Referenced by StdFace_main().

1150  {
1151  FILE *fp;
1152  int jtrans, ktrans, ntrans0;
1153 
1154  for (jtrans = 0; jtrans < StdI->ntrans; jtrans++){
1155  for (ktrans = jtrans + 1; ktrans < StdI->ntrans; ktrans++){
1156  if (StdI->transindx[jtrans][0] == StdI->transindx[ktrans][0]
1157  && StdI->transindx[jtrans][1] == StdI->transindx[ktrans][1]
1158  && StdI->transindx[jtrans][2] == StdI->transindx[ktrans][2]
1159  && StdI->transindx[jtrans][3] == StdI->transindx[ktrans][3]){
1160  StdI->trans[jtrans] = StdI->trans[jtrans] + StdI->trans[ktrans];
1161  StdI->trans[ktrans] = 0.0;
1162  }
1163  }/*for (ktrans = jtrans + 1; ktrans < StdI->ntrans; ktrans++)*/
1164  }/*for (jtrans = 0; jtrans < StdI->ntrans; jtrans++)*/
1165 
1166  ntrans0 = 0;
1167  for (ktrans = 0; ktrans < StdI->ntrans; ktrans++){
1168  if (cabs(StdI->trans[ktrans]) > 0.000001) ntrans0 = ntrans0 + 1;
1169  }
1170 
1171  fp = fopen("trans.def", "w");
1172  fprintf(fp, "======================== \n");
1173  fprintf(fp, "NTransfer %7d \n", ntrans0);
1174  fprintf(fp, "======================== \n");
1175  fprintf(fp, "========i_j_s_tijs====== \n");
1176  fprintf(fp, "======================== \n");
1177 
1178  ntrans0 = 0;
1179  for (ktrans = 0; ktrans < StdI->ntrans; ktrans++) {
1180  if (cabs(StdI->trans[ktrans]) > 0.000001)
1181  fprintf(fp, "%5d %5d %5d %5d %25.15f %25.15f\n",
1182  StdI->transindx[ktrans][0], StdI->transindx[ktrans][1],
1183  StdI->transindx[ktrans][2], StdI->transindx[ktrans][3],
1184  creal(StdI->trans[ktrans]), cimag(StdI->trans[ktrans]));
1185  }
1186 
1187  fflush(fp);
1188  fclose(fp);
1189  fprintf(stdout, " trans.def is written.\n");
1190 }/*static void PrintTrans*/
double complex * trans
[StdIntList::ntrans] Coefficient of one-body term, malloc in StdFace_MallocInteractions() and set in ...
Definition: StdFace_vals.h:147
int ntrans
Number of transfer, counted in each lattice file.
Definition: StdFace_vals.h:143
int ** transindx
[StdIntList::ntrans][4] Site/spin indices of one-body term, malloc in StdFace_MallocInteractions() an...
Definition: StdFace_vals.h:144

◆ 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:176
double complex * intr
[StdIntList::nintr] Coefficient of general two-body term, malloc in StdFace_MallocInteractions() and ...
Definition: StdFace_vals.h:155
double * Ex
[StdIntList::NEx] Coefficient of exchange term, malloc in StdFace_MallocInteractions() and set in Std...
Definition: StdFace_vals.h:189
double complex * trans
[StdIntList::ntrans] Coefficient of one-body term, malloc in StdFace_MallocInteractions() and set in ...
Definition: StdFace_vals.h:147
int ntrans
Number of transfer, counted in each lattice file.
Definition: StdFace_vals.h:143
int NCinter
Number of inter-site Coulomb interaction, counted in each lattice file.
Definition: StdFace_vals.h:167
int NCintra
Number of intra-site Coulomb interaction, counted in each lattice file.
Definition: StdFace_vals.h:158
double * Hund
[StdIntList::NHund] Coefficient of Hund term, malloc in StdFace_MallocInteractions() and set in StdFa...
Definition: StdFace_vals.h:181
double * PairLift
[StdIntList::NPairLift] Coefficient of pair-lift term, malloc in StdFace_MallocInteractions() and set...
Definition: StdFace_vals.h:197
int NPairLift
Number of pair-lift term, counted in each lattice file.
Definition: StdFace_vals.h:192
int NEx
Number of exchange term, counted in each lattice file.
Definition: StdFace_vals.h:184
double LargeValue
The shift parameter for the TPQ calculation.
Definition: StdFace_vals.h:246
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:140
double * Cintra
[StdIntList::NCintra] Coefficient of intra-site Coulomb term, malloc in StdFace_MallocInteractions() ...
Definition: StdFace_vals.h:164
int nintr
Number of InterAll, counted in each lattice file.
Definition: StdFace_vals.h:150
double * Cinter
[StdIntList::NCinter] Coefficient of inter-site Coulomb term, malloc in StdFace_MallocInteractions() ...
Definition: StdFace_vals.h:173

◆ 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 2177 of file StdFace_main.c.

References StdIntList::a, StdIntList::box, StdIntList::CalcSpec, StdIntList::CDataFileHead, CheckModPara(), CheckOutputMode(), StdIntList::cutoff_j, StdIntList::cutoff_t, StdIntList::cutoff_u, StdIntList::D, StdIntList::direct, StdIntList::dt, StdIntList::EigenVecIO, StdIntList::exct, StdIntList::ExpandCoef, StdIntList::ExpecInterval, StdIntList::FlgTemp, StdIntList::freq, StdIntList::Gamma, StdIntList::h, StdIntList::Height, StdIntList::initial_iv, StdIntList::InitialVecType, StdIntList::intr, StdIntList::intrindx, StdIntList::J, StdIntList::J0, StdIntList::J0All, StdIntList::J0p, StdIntList::J0pAll, StdIntList::J1, StdIntList::J1All, StdIntList::J1p, StdIntList::J1pAll, StdIntList::J2, StdIntList::J2All, StdIntList::J2p, StdIntList::J2pAll, 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::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::t1, StdIntList::t1p, StdIntList::t2, StdIntList::t2p, 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::V1, StdIntList::V1p, StdIntList::V2, StdIntList::VecPot, VectorPotential(), StdIntList::Vp, StdIntList::Vpp, and StdIntList::W.

Referenced by main().

2180 {
2181  struct StdIntList *StdI;
2182  FILE *fp;
2183  int ktrans, kintr;
2184  char ctmpline[256];
2185  char *keyword, *value;
2186 
2187  StdI = (struct StdIntList *)malloc(sizeof(struct StdIntList));
2188 
2189  fprintf(stdout, "\n###### Input Parameter of Standard Intarface ######\n");
2190  if ((fp = fopen(fname, "r")) == NULL) {
2191  fprintf(stdout, "\n ERROR ! Cannot open input file %s !\n\n", fname);
2192  StdFace_exit(-1);
2193  }
2194  else {
2195  fprintf(stdout, "\n Open Standard-Mode Inputfile %s \n\n", fname);
2196  }
2197 
2198  StdFace_ResetVals(StdI);
2199 
2200  while (fgets(ctmpline, 256, fp) != NULL) {
2201 
2202  TrimSpaceQuote(ctmpline);
2203  if (strncmp(ctmpline, "//", 2) == 0) {
2204  fprintf(stdout, " Skipping a line.\n");
2205  continue;
2206  }
2207  else if (ctmpline[0] == '\0') {
2208  fprintf(stdout, " Skipping a line.\n");
2209  continue;
2210  }
2211  keyword = strtok(ctmpline, "=");
2212  value = strtok(NULL, "=");
2213  if (value == NULL) {
2214  fprintf(stdout, "\n ERROR ! \"=\" is NOT found !\n\n");
2215  StdFace_exit(-1);
2216  }
2217  Text2Lower(keyword);
2218  fprintf(stdout, " KEYWORD : %-20s | VALUE : %s \n", keyword, value);
2219 
2220  if (strcmp(keyword, "a") == 0) StoreWithCheckDup_d(keyword, value, &StdI->a);
2221  else if (strcmp(keyword, "a0h") == 0) StoreWithCheckDup_i(keyword, value, &StdI->box[0][2]);
2222  else if (strcmp(keyword, "a0l") == 0) StoreWithCheckDup_i(keyword, value, &StdI->box[0][1]);
2223  else if (strcmp(keyword, "a0w") == 0) StoreWithCheckDup_i(keyword, value, &StdI->box[0][0]);
2224  else if (strcmp(keyword, "a1h") == 0) StoreWithCheckDup_i(keyword, value, &StdI->box[1][2]);
2225  else if (strcmp(keyword, "a1l") == 0) StoreWithCheckDup_i(keyword, value, &StdI->box[1][1]);
2226  else if (strcmp(keyword, "a1w") == 0) StoreWithCheckDup_i(keyword, value, &StdI->box[1][0]);
2227  else if (strcmp(keyword, "a2h") == 0) StoreWithCheckDup_i(keyword, value, &StdI->box[2][2]);
2228  else if (strcmp(keyword, "a2l") == 0) StoreWithCheckDup_i(keyword, value, &StdI->box[2][1]);
2229  else if (strcmp(keyword, "a2w") == 0) StoreWithCheckDup_i(keyword, value, &StdI->box[2][0]);
2230  else if (strcmp(keyword, "cutoff_j") == 0) StoreWithCheckDup_d(keyword, value, &StdI->cutoff_j);
2231  else if (strcmp(keyword, "cutoff_t") == 0) StoreWithCheckDup_d(keyword, value, &StdI->cutoff_t);
2232  else if (strcmp(keyword, "cutoff_u") == 0) StoreWithCheckDup_d(keyword, value, &StdI->cutoff_u);
2233  else if (strcmp(keyword, "d") == 0) StoreWithCheckDup_d(keyword, value, &StdI->D[2][2]);
2234  else if (strcmp(keyword, "gamma") == 0) StoreWithCheckDup_d(keyword, value, &StdI->Gamma);
2235  else if (strcmp(keyword, "h") == 0) StoreWithCheckDup_d(keyword, value, &StdI->h);
2236  else if (strcmp(keyword, "height") == 0) StoreWithCheckDup_i(keyword, value, &StdI->Height);
2237  else if (strcmp(keyword, "hlength") == 0) StoreWithCheckDup_d(keyword, value, &StdI->length[2]);
2238  else if (strcmp(keyword, "hx") == 0) StoreWithCheckDup_d(keyword, value, &StdI->direct[2][0]);
2239  else if (strcmp(keyword, "hy") == 0) StoreWithCheckDup_d(keyword, value, &StdI->direct[2][1]);
2240  else if (strcmp(keyword, "hz") == 0) StoreWithCheckDup_d(keyword, value, &StdI->direct[2][2]);
2241  else if (strcmp(keyword, "j") == 0) StoreWithCheckDup_d(keyword, value, &StdI->JAll);
2242  else if (strcmp(keyword, "jx") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J[0][0]);
2243  else if (strcmp(keyword, "jxy") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J[0][1]);
2244  else if (strcmp(keyword, "jxz") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J[0][2]);
2245  else if (strcmp(keyword, "jy") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J[1][1]);
2246  else if (strcmp(keyword, "jyx") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J[1][0]);
2247  else if (strcmp(keyword, "jyz") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J[1][2]);
2248  else if (strcmp(keyword, "jz") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J[2][2]);
2249  else if (strcmp(keyword, "jzx") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J[2][0]);
2250  else if (strcmp(keyword, "jzy") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J[2][1]);
2251  else if (strcmp(keyword, "j0") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J0All);
2252  else if (strcmp(keyword, "j0x") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J0[0][0]);
2253  else if (strcmp(keyword, "j0xy") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J0[0][1]);
2254  else if (strcmp(keyword, "j0xz") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J0[0][2]);
2255  else if (strcmp(keyword, "j0y") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J0[1][1]);
2256  else if (strcmp(keyword, "j0yx") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J0[1][0]);
2257  else if (strcmp(keyword, "j0yz") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J0[1][2]);
2258  else if (strcmp(keyword, "j0z") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J0[2][2]);
2259  else if (strcmp(keyword, "j0zx") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J0[2][0]);
2260  else if (strcmp(keyword, "j0zy") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J0[2][1]);
2261  else if (strcmp(keyword, "j0'") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J0pAll);
2262  else if (strcmp(keyword, "j0'x") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J0p[0][0]);
2263  else if (strcmp(keyword, "j0'xy") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J0p[0][1]);
2264  else if (strcmp(keyword, "j0'xz") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J0p[0][2]);
2265  else if (strcmp(keyword, "j0'y") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J0p[1][1]);
2266  else if (strcmp(keyword, "j0'yx") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J0p[1][0]);
2267  else if (strcmp(keyword, "j0'yz") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J0p[1][2]);
2268  else if (strcmp(keyword, "j0'z") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J0p[2][2]);
2269  else if (strcmp(keyword, "j0'zx") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J0p[2][0]);
2270  else if (strcmp(keyword, "j0'zy") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J0p[2][1]);
2271  else if (strcmp(keyword, "j1") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J1All);
2272  else if (strcmp(keyword, "j1x") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J1[0][0]);
2273  else if (strcmp(keyword, "j1xy") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J1[0][1]);
2274  else if (strcmp(keyword, "j1xz") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J1[0][2]);
2275  else if (strcmp(keyword, "j1y") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J1[1][1]);
2276  else if (strcmp(keyword, "j1yx") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J1[1][0]);
2277  else if (strcmp(keyword, "j1yz") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J1[1][2]);
2278  else if (strcmp(keyword, "j1z") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J1[2][2]);
2279  else if (strcmp(keyword, "j1zx") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J1[2][0]);
2280  else if (strcmp(keyword, "j1zy") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J1[2][1]);
2281  else if (strcmp(keyword, "j1'") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J1pAll);
2282  else if (strcmp(keyword, "j1'x") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J1p[0][0]);
2283  else if (strcmp(keyword, "j1'xy") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J1p[0][1]);
2284  else if (strcmp(keyword, "j1'xz") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J1p[0][2]);
2285  else if (strcmp(keyword, "j1'y") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J1p[1][1]);
2286  else if (strcmp(keyword, "j1'yx") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J1p[1][0]);
2287  else if (strcmp(keyword, "j1'yz") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J1p[1][2]);
2288  else if (strcmp(keyword, "j1'z") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J1p[2][2]);
2289  else if (strcmp(keyword, "j1'zx") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J1p[2][0]);
2290  else if (strcmp(keyword, "j1'zy") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J1p[2][1]);
2291  else if (strcmp(keyword, "j2") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J2All);
2292  else if (strcmp(keyword, "j2x") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J2[0][0]);
2293  else if (strcmp(keyword, "j2xy") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J2[0][1]);
2294  else if (strcmp(keyword, "j2xz") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J2[0][2]);
2295  else if (strcmp(keyword, "j2y") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J2[1][1]);
2296  else if (strcmp(keyword, "j2yx") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J2[1][0]);
2297  else if (strcmp(keyword, "j2yz") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J2[1][2]);
2298  else if (strcmp(keyword, "j2z") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J2[2][2]);
2299  else if (strcmp(keyword, "j2zx") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J2[2][0]);
2300  else if (strcmp(keyword, "j2zy") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J2[2][1]);
2301  else if (strcmp(keyword, "j2'") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J2pAll);
2302  else if (strcmp(keyword, "j2'x") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J2p[0][0]);
2303  else if (strcmp(keyword, "j2'xy") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J2p[0][1]);
2304  else if (strcmp(keyword, "j2'xz") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J2p[0][2]);
2305  else if (strcmp(keyword, "j2'y") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J2p[1][1]);
2306  else if (strcmp(keyword, "j2'yx") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J2p[1][0]);
2307  else if (strcmp(keyword, "j2'yz") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J2p[1][2]);
2308  else if (strcmp(keyword, "j2'z") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J2p[2][2]);
2309  else if (strcmp(keyword, "j2'zx") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J2p[2][0]);
2310  else if (strcmp(keyword, "j2'zy") == 0) StoreWithCheckDup_d(keyword, value, &StdI->J2p[2][1]);
2311  else if (strcmp(keyword, "j'") == 0) StoreWithCheckDup_d(keyword, value, &StdI->JpAll);
2312  else if (strcmp(keyword, "j'x") == 0) StoreWithCheckDup_d(keyword, value, &StdI->Jp[0][0]);
2313  else if (strcmp(keyword, "j'xy") == 0) StoreWithCheckDup_d(keyword, value, &StdI->Jp[0][1]);
2314  else if (strcmp(keyword, "j'xz") == 0) StoreWithCheckDup_d(keyword, value, &StdI->Jp[0][2]);
2315  else if (strcmp(keyword, "j'y") == 0) StoreWithCheckDup_d(keyword, value, &StdI->Jp[1][1]);
2316  else if (strcmp(keyword, "j'yx") == 0) StoreWithCheckDup_d(keyword, value, &StdI->Jp[1][0]);
2317  else if (strcmp(keyword, "j'yz") == 0) StoreWithCheckDup_d(keyword, value, &StdI->Jp[1][2]);
2318  else if (strcmp(keyword, "j'z") == 0) StoreWithCheckDup_d(keyword, value, &StdI->Jp[2][2]);
2319  else if (strcmp(keyword, "j'zx") == 0) StoreWithCheckDup_d(keyword, value, &StdI->Jp[2][0]);
2320  else if (strcmp(keyword, "j'zy") == 0) StoreWithCheckDup_d(keyword, value, &StdI->Jp[2][1]);
2321  else if (strcmp(keyword, "j''") == 0) StoreWithCheckDup_d(keyword, value, &StdI->JppAll);
2322  else if (strcmp(keyword, "j''x") == 0) StoreWithCheckDup_d(keyword, value, &StdI->Jpp[0][0]);
2323  else if (strcmp(keyword, "j''xy") == 0) StoreWithCheckDup_d(keyword, value, &StdI->Jpp[0][1]);
2324  else if (strcmp(keyword, "j''xz") == 0) StoreWithCheckDup_d(keyword, value, &StdI->Jpp[0][2]);
2325  else if (strcmp(keyword, "j''y") == 0) StoreWithCheckDup_d(keyword, value, &StdI->Jpp[1][1]);
2326  else if (strcmp(keyword, "j''yx") == 0) StoreWithCheckDup_d(keyword, value, &StdI->Jpp[1][0]);
2327  else if (strcmp(keyword, "j''yz") == 0) StoreWithCheckDup_d(keyword, value, &StdI->Jpp[1][2]);
2328  else if (strcmp(keyword, "j''z") == 0) StoreWithCheckDup_d(keyword, value, &StdI->Jpp[2][2]);
2329  else if (strcmp(keyword, "j''zx") == 0) StoreWithCheckDup_d(keyword, value, &StdI->Jpp[2][0]);
2330  else if (strcmp(keyword, "j''zy") == 0) StoreWithCheckDup_d(keyword, value, &StdI->Jpp[2][1]);
2331  else if (strcmp(keyword, "k") == 0) StoreWithCheckDup_d(keyword, value, &StdI->K);
2332  else if (strcmp(keyword, "l") == 0) StoreWithCheckDup_i(keyword, value, &StdI->L);
2333  else if (strcmp(keyword, "lattice") == 0) StoreWithCheckDup_sl(keyword, value, StdI->lattice);
2334  else if (strcmp(keyword, "llength") == 0) StoreWithCheckDup_d(keyword, value, &StdI->length[1]);
2335  else if (strcmp(keyword, "lx") == 0) StoreWithCheckDup_d(keyword, value, &StdI->direct[1][0]);
2336  else if (strcmp(keyword, "ly") == 0) StoreWithCheckDup_d(keyword, value, &StdI->direct[1][1]);
2337  else if (strcmp(keyword, "lz") == 0) StoreWithCheckDup_d(keyword, value, &StdI->direct[1][2]);
2338  else if (strcmp(keyword, "model") == 0) StoreWithCheckDup_sl(keyword, value, StdI->model);
2339  else if (strcmp(keyword, "mu") == 0) StoreWithCheckDup_d(keyword, value, &StdI->mu);
2340  else if (strcmp(keyword, "nelec") == 0) StoreWithCheckDup_i(keyword, value, &StdI->nelec);
2341  else if (strcmp(keyword, "outputmode") == 0) StoreWithCheckDup_sl(keyword, value, StdI->outputmode);
2342  else if (strcmp(keyword, "phase0") == 0) StoreWithCheckDup_d(keyword, value, &StdI->phase[0]);
2343  else if (strcmp(keyword, "phase1") == 0) StoreWithCheckDup_d(keyword, value, &StdI->phase[1]);
2344  else if (strcmp(keyword, "phase2") == 0) StoreWithCheckDup_d(keyword, value, &StdI->phase[2]);
2345  else if (strcmp(keyword, "t") == 0) StoreWithCheckDup_c(keyword, value, &StdI->t);
2346  else if (strcmp(keyword, "t0") == 0) StoreWithCheckDup_c(keyword, value, &StdI->t0);
2347  else if (strcmp(keyword, "t0'") == 0) StoreWithCheckDup_c(keyword, value, &StdI->t0p);
2348  else if (strcmp(keyword, "t1") == 0) StoreWithCheckDup_c(keyword, value, &StdI->t1);
2349  else if (strcmp(keyword, "t1'") == 0) StoreWithCheckDup_c(keyword, value, &StdI->t1p);
2350  else if (strcmp(keyword, "t2") == 0) StoreWithCheckDup_c(keyword, value, &StdI->t2);
2351  else if (strcmp(keyword, "t2'") == 0) StoreWithCheckDup_c(keyword, value, &StdI->t2p);
2352  else if (strcmp(keyword, "t'") == 0) StoreWithCheckDup_c(keyword, value, &StdI->tp);
2353  else if (strcmp(keyword, "t''") == 0) StoreWithCheckDup_c(keyword, value, &StdI->tpp);
2354  else if (strcmp(keyword, "u") == 0) StoreWithCheckDup_d(keyword, value, &StdI->U);
2355  else if (strcmp(keyword, "v") == 0) StoreWithCheckDup_d(keyword, value, &StdI->V);
2356  else if (strcmp(keyword, "v0") == 0) StoreWithCheckDup_d(keyword, value, &StdI->V0);
2357  else if (strcmp(keyword, "v0'") == 0) StoreWithCheckDup_d(keyword, value, &StdI->V0p);
2358  else if (strcmp(keyword, "v1") == 0) StoreWithCheckDup_d(keyword, value, &StdI->V1);
2359  else if (strcmp(keyword, "v1'") == 0) StoreWithCheckDup_d(keyword, value, &StdI->V1p);
2360  else if (strcmp(keyword, "v2") == 0) StoreWithCheckDup_d(keyword, value, &StdI->V2);
2361  else if (strcmp(keyword, "v2p") == 0) StoreWithCheckDup_d(keyword, value, &StdI->V2);
2362  else if (strcmp(keyword, "v'") == 0) StoreWithCheckDup_d(keyword, value, &StdI->Vp);
2363  else if (strcmp(keyword, "v''") == 0) StoreWithCheckDup_d(keyword, value, &StdI->Vpp);
2364  else if (strcmp(keyword, "w") == 0) StoreWithCheckDup_i(keyword, value, &StdI->W);
2365  else if (strcmp(keyword, "wlength") == 0) StoreWithCheckDup_d(keyword, value, &StdI->length[0]);
2366  else if (strcmp(keyword, "wx") == 0) StoreWithCheckDup_d(keyword, value, &StdI->direct[0][0]);
2367  else if (strcmp(keyword, "wy") == 0) StoreWithCheckDup_d(keyword, value, &StdI->direct[0][1]);
2368  else if (strcmp(keyword, "wz") == 0) StoreWithCheckDup_d(keyword, value, &StdI->direct[0][2]);
2369  else if (strcmp(keyword, "2sz") == 0) StoreWithCheckDup_i(keyword, value, &StdI->Sz2);
2370 
2371 #if defined(_HPhi)
2372  else if (strcmp(keyword, "calcspec") == 0) StoreWithCheckDup_sl(keyword, value, StdI->CalcSpec);
2373  else if (strcmp(keyword, "exct") == 0) StoreWithCheckDup_i(keyword, value, &StdI->exct);
2374  else if (strcmp(keyword, "eigenvecio") == 0) StoreWithCheckDup_sl(keyword, value, StdI->EigenVecIO);
2375  else if (strcmp(keyword, "expandcoef") == 0) StoreWithCheckDup_i(keyword, value, &StdI->ExpandCoef);
2376  else if (strcmp(keyword, "expecinterval") == 0) StoreWithCheckDup_i(keyword, value, &StdI->ExpecInterval);
2377  else if (strcmp(keyword, "cdatafilehead") == 0) StoreWithCheckDup_s(keyword, value, StdI->CDataFileHead);
2378  else if (strcmp(keyword, "dt") == 0) StoreWithCheckDup_d(keyword, value, &StdI->dt);
2379  else if (strcmp(keyword, "flgtemp") == 0) StoreWithCheckDup_i(keyword, value, &StdI->FlgTemp);
2380  else if (strcmp(keyword, "freq") == 0) StoreWithCheckDup_d(keyword, value, &StdI->freq);
2381  else if (strcmp(keyword, "initialvectype") == 0) StoreWithCheckDup_sl(keyword, value, StdI->InitialVecType);
2382  else if (strcmp(keyword, "initial_iv") == 0) StoreWithCheckDup_i(keyword, value, &StdI->initial_iv);
2383  else if (strcmp(keyword, "lanczoseps") == 0) StoreWithCheckDup_i(keyword, value, &StdI->LanczosEps);
2384  else if (strcmp(keyword, "lanczostarget") == 0) StoreWithCheckDup_i(keyword, value, &StdI->LanczosTarget);
2385  else if (strcmp(keyword, "lanczos_max") == 0) StoreWithCheckDup_i(keyword, value, &StdI->Lanczos_max);
2386  else if (strcmp(keyword, "largevalue") == 0) StoreWithCheckDup_d(keyword, value, &StdI->LargeValue);
2387  else if (strcmp(keyword, "method") == 0) StoreWithCheckDup_sl(keyword, value, StdI->method);
2388  else if (strcmp(keyword, "nomega") == 0) StoreWithCheckDup_i(keyword, value, &StdI->Nomega);
2389  else if (strcmp(keyword, "numave") == 0) StoreWithCheckDup_i(keyword, value, &StdI->NumAve);
2390  else if (strcmp(keyword, "nvec") == 0) StoreWithCheckDup_i(keyword, value, &StdI->nvec);
2391  else if (strcmp(keyword, "omegamax") == 0) StoreWithCheckDup_d(keyword, value, &StdI->OmegaMax);
2392  else if (strcmp(keyword, "omegamin") == 0) StoreWithCheckDup_d(keyword, value, &StdI->OmegaMin);
2393  else if (strcmp(keyword, "omegaim") == 0) StoreWithCheckDup_d(keyword, value, &StdI->OmegaIm);
2394  else if (strcmp(keyword, "pumptype") == 0) StoreWithCheckDup_sl(keyword, value, StdI->PumpType);
2395  else if (strcmp(keyword, "restart") == 0) StoreWithCheckDup_sl(keyword, value, StdI->Restart);
2396  else if (strcmp(keyword, "spectrumqh") == 0) StoreWithCheckDup_d(keyword, value, &StdI->SpectrumQ[2]);
2397  else if (strcmp(keyword, "spectrumql") == 0) StoreWithCheckDup_d(keyword, value, &StdI->SpectrumQ[1]);
2398  else if (strcmp(keyword, "spectrumqw") == 0) StoreWithCheckDup_d(keyword, value, &StdI->SpectrumQ[0]);
2399  else if (strcmp(keyword, "spectrumtype") == 0) StoreWithCheckDup_sl(keyword, value, StdI->SpectrumType);
2400  else if (strcmp(keyword, "tdump") == 0) StoreWithCheckDup_d(keyword, value, &StdI->tdump);
2401  else if (strcmp(keyword, "tshift") == 0) StoreWithCheckDup_d(keyword, value, &StdI->tshift);
2402  else if (strcmp(keyword, "uquench") == 0) StoreWithCheckDup_d(keyword, value, &StdI->Uquench);
2403  else if (strcmp(keyword, "vecpoth") == 0) StoreWithCheckDup_d(keyword, value, &StdI->VecPot[2]);
2404  else if (strcmp(keyword, "vecpotl") == 0) StoreWithCheckDup_d(keyword, value, &StdI->VecPot[1]);
2405  else if (strcmp(keyword, "vecpotw") == 0) StoreWithCheckDup_d(keyword, value, &StdI->VecPot[0]);
2406  else if (strcmp(keyword, "2s") == 0) StoreWithCheckDup_i(keyword, value, &StdI->S2);
2407 #elif defined(_mVMC)
2408  else if (strcmp(keyword, "a0hsub") == 0) StoreWithCheckDup_i(keyword, value, &StdI->boxsub[0][2]);
2409  else if (strcmp(keyword, "a0lsub") == 0) StoreWithCheckDup_i(keyword, value, &StdI->boxsub[0][1]);
2410  else if (strcmp(keyword, "a0wsub") == 0) StoreWithCheckDup_i(keyword, value, &StdI->boxsub[0][0]);
2411  else if (strcmp(keyword, "a1hsub") == 0) StoreWithCheckDup_i(keyword, value, &StdI->boxsub[1][2]);
2412  else if (strcmp(keyword, "a1lsub") == 0) StoreWithCheckDup_i(keyword, value, &StdI->boxsub[1][1]);
2413  else if (strcmp(keyword, "a1wsub") == 0) StoreWithCheckDup_i(keyword, value, &StdI->boxsub[1][0]);
2414  else if (strcmp(keyword, "a2hsub") == 0) StoreWithCheckDup_i(keyword, value, &StdI->boxsub[2][2]);
2415  else if (strcmp(keyword, "a2lsub") == 0) StoreWithCheckDup_i(keyword, value, &StdI->boxsub[2][1]);
2416  else if (strcmp(keyword, "a2wsub") == 0) StoreWithCheckDup_i(keyword, value, &StdI->boxsub[2][0]);
2417  else if (strcmp(keyword, "complextype") == 0) StoreWithCheckDup_i(keyword, value, &StdI->ComplexType);
2418  else if (strcmp(keyword, "cparafilehead") == 0) StoreWithCheckDup_s(keyword, value, StdI->CParaFileHead);
2419  else if (strcmp(keyword, "dsroptredcut") == 0) StoreWithCheckDup_d(keyword, value, &StdI->DSROptRedCut);
2420  else if (strcmp(keyword, "dsroptstadel") == 0) StoreWithCheckDup_d(keyword, value, &StdI->DSROptStaDel);
2421  else if (strcmp(keyword, "dsroptstepdt") == 0) StoreWithCheckDup_d(keyword, value, &StdI->DSROptStepDt);
2422  else if (strcmp(keyword, "hsub") == 0) StoreWithCheckDup_i(keyword, value, &StdI->Hsub);
2423  else if (strcmp(keyword, "lsub") == 0) StoreWithCheckDup_i(keyword, value, &StdI->Lsub);
2424  else if (strcmp(keyword, "nvmccalmode") == 0) StoreWithCheckDup_i(keyword, value, &StdI->NVMCCalMode);
2425  else if (strcmp(keyword, "ndataidxstart") == 0) StoreWithCheckDup_i(keyword, value, &StdI->NDataIdxStart);
2426  else if (strcmp(keyword, "ndataqtysmp") == 0) StoreWithCheckDup_i(keyword, value, &StdI->NDataQtySmp);
2427  else if (strcmp(keyword, "nlanczosmode") == 0) StoreWithCheckDup_i(keyword, value, &StdI->NLanczosMode);
2428  else if (strcmp(keyword, "nmptrans") == 0) StoreWithCheckDup_i(keyword, value, &StdI->NMPTrans);
2429  else if (strcmp(keyword, "nspgaussleg") == 0) StoreWithCheckDup_i(keyword, value, &StdI->NSPGaussLeg);
2430  else if (strcmp(keyword, "nsplitsize") == 0) StoreWithCheckDup_i(keyword, value, &StdI->NSplitSize);
2431  else if (strcmp(keyword, "nspstot") == 0) StoreWithCheckDup_i(keyword, value, &StdI->NSPStot);
2432  else if (strcmp(keyword, "nsroptitrsmp") == 0) StoreWithCheckDup_i(keyword, value, &StdI->NSROptItrSmp);
2433  else if (strcmp(keyword, "nsroptitrstep") == 0) StoreWithCheckDup_i(keyword, value, &StdI->NSROptItrStep);
2434  else if (strcmp(keyword, "nstore") == 0) StoreWithCheckDup_i(keyword, value, &StdI->NStore);
2435  else if (strcmp(keyword, "nsrcg") == 0) StoreWithCheckDup_i(keyword, value, &StdI->NSRCG);
2436  else if (strcmp(keyword, "nvmcinterval") == 0) StoreWithCheckDup_i(keyword, value, &StdI->NVMCInterval);
2437  else if (strcmp(keyword, "nvmcsample") == 0) StoreWithCheckDup_i(keyword, value, &StdI->NVMCSample);
2438  else if (strcmp(keyword, "nvmcwarmup") == 0) StoreWithCheckDup_i(keyword, value, &StdI->NVMCWarmUp);
2439  else if (strcmp(keyword, "rndseed") == 0) StoreWithCheckDup_i(keyword, value, &StdI->RndSeed);
2440  else if (strcmp(keyword, "wsub") == 0) StoreWithCheckDup_i(keyword, value, &StdI->Wsub);
2441 #endif
2442  else {
2443  fprintf(stdout, "ERROR ! Unsupported Keyword !\n");
2444  StdFace_exit(-1);
2445  }
2446  }
2447  fflush(fp);
2448  fclose(fp);
2449  fprintf(stdout, "\n");
2450  fprintf(stdout, "####### Construct Model #######\n");
2451  fprintf(stdout, "\n");
2452  /*
2453  Check the model
2454  */
2455  if (strcmp(StdI->CDataFileHead, "****") == 0) {
2456  strcpy(StdI->CDataFileHead, "zvo\0");
2457  fprintf(stdout, " CDataFileHead = %-12s###### DEFAULT VALUE IS USED ######\n", StdI->CDataFileHead);
2458  }
2459  else fprintf(stdout, " CDataFileHead = %-s\n", StdI->CDataFileHead);
2460 
2461  StdI->lGC = 0;
2462  StdI->lBoost = 0;
2463  if (strcmp(StdI->model, "fermionhubbard") == 0
2464  || strcmp(StdI->model, "hubbard") == 0)
2465  strcpy(StdI->model, "hubbard\0");
2466  else if(strcmp(StdI->model, "fermionhubbardgc") == 0
2467  || strcmp(StdI->model, "hubbardgc") == 0) {
2468  strcpy(StdI->model, "hubbard\0");
2469  StdI->lGC = 1;
2470  }
2471  else if (strcmp(StdI->model, "spin") == 0)
2472  strcpy(StdI->model, "spin\0");
2473  else if (strcmp(StdI->model, "spingc") == 0) {
2474  strcpy(StdI->model, "spin\0");
2475  StdI->lGC = 1;
2476  }
2477 #if defined(_HPhi)
2478  else if(strcmp(StdI->model, "spingcboost") == 0 ||
2479  strcmp(StdI->model, "spingccma") == 0) {
2480  strcpy(StdI->model, "spin\0");
2481  StdI->lGC = 1;
2482  StdI->lBoost = 1;
2483  }
2484 #endif
2485  else if (strcmp(StdI->model, "kondolattice") == 0
2486  || strcmp(StdI->model, "kondo") == 0) {
2487  strcpy(StdI->model, "kondo\0");
2488  }
2489  else if(strcmp(StdI->model, "kondolatticegc") == 0
2490  || strcmp(StdI->model, "kondogc") == 0) {
2491  strcpy(StdI->model, "kondo\0");
2492  StdI->lGC = 1;
2493  }
2494  else UnsupportedSystem(StdI->model, StdI->lattice);
2495 #if defined(_HPhi)
2496  /*
2497  Check the method
2498  */
2499  if (strcmp(StdI->method, "direct") == 0
2500  || strcmp(StdI->method, "alldiag") == 0)
2501  strcpy(StdI->method, "fulldiag\0");
2502  else if (strcmp(StdI->method, "te") == 0
2503  || strcmp(StdI->method, "time-evolution") == 0) {
2504  strcpy(StdI->method, "timeevolution\0");
2505  }
2506  /*
2507  Compute vector potential and electrical field
2508  */
2509  if (strcmp(StdI->method, "timeevolution") == 0) VectorPotential(StdI);
2510 #endif
2511  /*>>
2512  Generate Hamiltonian definition files
2513  */
2514  if (strcmp(StdI->lattice, "chain") == 0
2515  || strcmp(StdI->lattice, "chainlattice") == 0) StdFace_Chain(StdI);
2516  else if (strcmp(StdI->lattice, "face-centeredorthorhombic") == 0
2517  || strcmp(StdI->lattice, "fcorthorhombic") == 0
2518  || strcmp(StdI->lattice, "fco") == 0) StdFace_FCOrtho(StdI);
2519  else if (strcmp(StdI->lattice, "honeycomb") == 0
2520  || strcmp(StdI->lattice, "honeycomblattice") == 0) StdFace_Honeycomb(StdI);
2521  else if (strcmp(StdI->lattice, "kagome") == 0
2522  || strcmp(StdI->lattice, "kagomelattice") == 0) StdFace_Kagome(StdI);
2523  else if (strcmp(StdI->lattice, "ladder") == 0
2524  || strcmp(StdI->lattice, "ladderlattice") == 0) StdFace_Ladder(StdI);
2525  else if (strcmp(StdI->lattice, "orthorhombic") == 0
2526  || strcmp(StdI->lattice, "simpleorthorhombic") == 0) StdFace_Orthorhombic(StdI);
2527  else if (strcmp(StdI->lattice, "pyrochlore") == 0) StdFace_Pyrochlore(StdI);
2528  else if (strcmp(StdI->lattice, "tetragonal") == 0
2529  || strcmp(StdI->lattice, "tetragonallattice") == 0
2530  || strcmp(StdI->lattice, "square") == 0
2531  || strcmp(StdI->lattice, "squarelattice") == 0) StdFace_Tetragonal(StdI);
2532  else if (strcmp(StdI->lattice, "triangular") == 0
2533  || strcmp(StdI->lattice, "triangularlattice") == 0) StdFace_Triangular(StdI);
2534  else if (strcmp(StdI->lattice, "wannier90") == 0) StdFace_Wannier90(StdI);
2535  else UnsupportedSystem(StdI->model, StdI->lattice);//<<
2536 
2537 #if defined(_HPhi)
2538  StdFace_LargeValue(StdI);
2539  /*
2540  Generate Hamiltonian for Boost
2541  */
2542  if (StdI->lBoost == 1) {
2543  if (strcmp(StdI->lattice, "chain") == 0
2544  || strcmp(StdI->lattice, "chainlattice") == 0) StdFace_Chain_Boost(StdI);
2545  else if (strcmp(StdI->lattice, "honeycomb") == 0
2546  || strcmp(StdI->lattice, "honeycomblattice") == 0) StdFace_Honeycomb_Boost(StdI);
2547  else if (strcmp(StdI->lattice, "kagome") == 0
2548  || strcmp(StdI->lattice, "kagomelattice") == 0) StdFace_Kagome_Boost(StdI);
2549  else if (strcmp(StdI->lattice, "ladder") == 0
2550  || strcmp(StdI->lattice, "ladderlattice") == 0) StdFace_Ladder_Boost(StdI);
2551  else UnsupportedSystem(StdI->model, StdI->lattice);
2552  }
2553 #endif
2554 
2555  fprintf(stdout, "\n");
2556  fprintf(stdout, "###### Print Expert input files ######\n");
2557  fprintf(stdout, "\n");
2558  PrintLocSpin(StdI);
2559  PrintTrans(StdI);
2560  PrintInteractions(StdI);
2561  CheckModPara(StdI);
2562  PrintModPara(StdI);
2563 #if defined(_HPhi)
2564  PrintExcitation(StdI);
2565  if (strcmp(StdI->method, "timeevolution") == 0) PrintPump(StdI);
2566  PrintCalcMod(StdI);
2567 #elif defined(_mVMC)
2568 
2569  if(StdI->lGC == 0 && (StdI->Sz2 == 0 || StdI->Sz2 == StdI->NaN_i))
2570  StdFace_PrintVal_i("ComplexType", &StdI->ComplexType, 0);
2571  else StdFace_PrintVal_i("ComplexType", &StdI->ComplexType, 1);
2572 
2573  StdFace_generate_orb(StdI);
2574  StdFace_Proj(StdI);
2575  PrintJastrow(StdI);
2576  if(StdI->lGC == 1 || (StdI->Sz2 != 0 && StdI->Sz2 != StdI->NaN_i) )
2577  PrintOrbPara(StdI);
2578  PrintGutzwiller(StdI);
2579  PrintOrb(StdI);
2580 #endif
2581  CheckOutputMode(StdI);
2582  Print1Green(StdI);
2583  Print2Green(StdI);
2584  PrintNamelist(StdI);
2585  /*
2586  Finalize All
2587  */
2588  free(StdI->locspinflag);
2589  for (ktrans = 0; ktrans < StdI->ntrans; ktrans++) {
2590  free(StdI->transindx[ktrans]);
2591  }
2592  free(StdI->transindx);
2593  free(StdI->trans);
2594  for (kintr = 0; kintr < StdI->nintr; kintr++) {
2595  free(StdI->intrindx[kintr]);
2596  }
2597  free(StdI->intrindx);
2598  free(StdI->intr);
2599 
2600  fprintf(stdout, "\n###### Input files are generated. ######\n\n");
2601  free(StdI);
2602 }/*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:805
void StdFace_Triangular(struct StdIntList *StdI)
Setup a Hamiltonian for the Triangular lattice.
double OmegaIm
Imaginary part of frequency.
Definition: StdFace_vals.h:262
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:233
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:78
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:270
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:102
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:69
double cutoff_t
Cutoof for the hopping in wannier90, input from file.
Definition: StdFace_vals.h:225
double J[3][3]
Isotropic, diagonal/off-diagonal spin coupling (1st Near.), input parameter Jx, Jy, Jz, Jxy, etc.
Definition: StdFace_vals.h:100
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:286
double complex * intr
[StdIntList::nintr] Coefficient of general two-body term, malloc in StdFace_MallocInteractions() and ...
Definition: StdFace_vals.h:155
double D[3][3]
Coefficient for input parameter D. Only D[2][2] is used.
Definition: StdFace_vals.h:124
double J1p[3][3]
Isotropic, diagonal/off-diagonal spin coupling (2nd Near.), input parameter J1&#39;x, J1&#39;y...
Definition: StdFace_vals.h:113
void StdFace_Ladder_Boost(struct StdIntList *StdI)
Definition: Ladder.c:291
int initial_iv
the number for generating random number, input from file.
Definition: StdFace_vals.h:238
int NumAve
Number of trials for TPQ calculation.
Definition: StdFace_vals.h:243
double JpAll
Isotropic, diagonal spin coupling (2nd Near), input parameter Jp.
Definition: StdFace_vals.h:84
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:110
double J2p[3][3]
Isotropic, diagonal/off-diagonal spin coupling (2nd Near.), input parameter J2&#39;x, J2&#39;y...
Definition: StdFace_vals.h:119
double complex * trans
[StdIntList::ntrans] Coefficient of one-body term, malloc in StdFace_MallocInteractions() and set in ...
Definition: StdFace_vals.h:147
char SpectrumType[256]
The type of mode for spectrum, input from file.
Definition: StdFace_vals.h:258
static void Text2Lower(char *value)
Definition: StdFace_main.c:951
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:82
double dt
Time step.
Definition: StdFace_vals.h:269
static void PrintPump(struct StdIntList *StdI)
Print single.def or pair.def.
Definition: StdFace_main.c:526
int S2
Total spin |S| of a local spin, input from file.
Definition: StdFace_vals.h:215
int Nomega
Number of frequencies, input from file.
Definition: StdFace_vals.h:259
char CalcSpec[256]
The name of mode for spectrum, input from file.
Definition: StdFace_vals.h:257
double cutoff_j
Cutoof for the Hund in wannier90, input from file.
Definition: StdFace_vals.h:227
static void UnsupportedSystem(char *model, char *lattice)
Stop HPhi if unsupported model is read.
double J1All
Anisotropic, diagonal spin coupling (1nd Near), input parameter J1.
Definition: StdFace_vals.h:90
void StdFace_Chain_Boost(struct StdIntList *StdI)
Setup a Hamiltonian for the generalized Heisenberg model on a Chain lattice.
Definition: ChainLattice.c:221
double V0p
Anisotropic Coulomb potential (2nd), input parameter.
Definition: StdFace_vals.h:75
double OmegaMax
Maximum of frequency for spectrum, input from file.
Definition: StdFace_vals.h:260
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:274
double complex tpp
3rd-nearest hopping, input parameter
Definition: StdFace_vals.h:70
int ntrans
Number of transfer, counted in each lattice file.
Definition: StdFace_vals.h:143
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:234
double Gamma
Transvars magnetic field, input parameter.
Definition: StdFace_vals.h:127
static void PrintModPara(struct StdIntList *StdI)
Print modpara.def.
double JppAll
Isotropic, diagonal spin coupling (3rd Near), input parameter J&#39;&#39;.
Definition: StdFace_vals.h:98
double V1
Anisotropic Coulomb potential (1st), input parameter.
Definition: StdFace_vals.h:76
double J0All
Anisotropic, diagonal spin coupling (1nd Near), input parameter J0.
Definition: StdFace_vals.h:86
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:104
double U
On-site Coulomb potential, input parameter.
Definition: StdFace_vals.h:71
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:234
static void StoreWithCheckDup_s(char *keyword, char *valuestring, char *value)
Store an input value into the valiable (string) If duplicated, HPhi will stop.
Definition: StdFace_main.c:997
double SpectrumQ[3]
wavenumver (q-vector) in fractional coordinate
Definition: StdFace_vals.h:263
double phase[3]
Boundary phase, input parameter phase0, etc.
Definition: StdFace_vals.h:133
int exct
The number of eigenvectors to be computed. input from file.
Definition: StdFace_vals.h:240
double tdump
Time scale of dumping.
Definition: StdFace_vals.h:271
double J0pAll
Anisotropic, diagonal spin coupling (2nd Near), input parameter J0&#39;.
Definition: StdFace_vals.h:88
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:141
double OmegaMin
Minimum of frequency for spectrum, input from file.
Definition: StdFace_vals.h:261
int LanczosTarget
Which eigenvector is used for the convergence check.
Definition: StdFace_vals.h:242
int LanczosEps
Convergence threshold for the Lanczos method.
Definition: StdFace_vals.h:241
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:235
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:122
int Lanczos_max
The maxixmum number of iterations, input from file.
Definition: StdFace_vals.h:237
double complex t1
Anisotropic hopping (1st), input parameter.
Definition: StdFace_vals.h:66
double V
Off-site Coulomb potential (1st), input parameter.
Definition: StdFace_vals.h:72
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
static void PrintTrans(struct StdIntList *StdI)
Print the transfer file.
double V0
Anisotropic Coulomb potential (1st), input parameter.
Definition: StdFace_vals.h:74
void StdFace_Kagome_Boost(struct StdIntList *StdI)
Definition: Kagome.c:357
double Vpp
Off-site Coulomb potential (3rd), input parameter.
Definition: StdFace_vals.h:80
double complex t1p
Anisotropic hopping (2nd), input parameter.
Definition: StdFace_vals.h:67
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:232
double complex t2
Anisotropic hopping (1st), input parameter.
Definition: StdFace_vals.h:68
int lGC
Switch for computing Grandcanonical ensemble(== 1). Setted in StdFace_main() after all keywords are r...
Definition: StdFace_vals.h:212
double LargeValue
The shift parameter for the TPQ calculation.
Definition: StdFace_vals.h:246
char PumpType[256]
The type of pump.
Definition: StdFace_vals.h:275
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.
Definition: StdFace_main.c:966
int ** intrindx
[StdIntList::nintr][8] Site/spin indices of two-body term, malloc in StdFace_MallocInteractions() and...
Definition: StdFace_vals.h:152
double mu
Chemical potential, input parameter.
Definition: StdFace_vals.h:61
int Sz2
Total Sz, input from file.
Definition: StdFace_vals.h:220
double Vp
Off-site Coulomb potential (2nd), input parameter.
Definition: StdFace_vals.h:73
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:92
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:144
double J2All
Anisotropic, diagonal spin coupling (1nd Near), input parameter J2.
Definition: StdFace_vals.h:94
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.
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:150
char outputmode[256]
Select amount of correlation function, input from file.
Definition: StdFace_vals.h:216
double Uquench
Quenched on-site potential.
Definition: StdFace_vals.h:273
double h
Longitudinal magnetic field, input parameter.
Definition: StdFace_vals.h:126
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:116
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:214
double freq
Frequency of laser.
Definition: StdFace_vals.h:272
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:300
int ExpecInterval
Interval for the iteration when the expectation value is computed.
Definition: StdFace_vals.h:244
double J2pAll
Anisotropic, diagonal spin coupling (2nd Near), input parameter J2&#39;.
Definition: StdFace_vals.h:96
double J0p[3][3]
Isotropic, diagonal/off-diagonal spin coupling (2nd Near.), input parameter J0&#39;x, J0&#39;y...
Definition: StdFace_vals.h:107
void StdFace_exit(int errorcode)
MPI Abortation wrapper.
char CDataFileHead[256]
Header of the output files. Input from file.
Definition: StdFace_vals.h:218
double cutoff_u
Cutoof for the Coulomb in wannier90, input from file.
Definition: StdFace_vals.h:226
static void VectorPotential(struct StdIntList *StdI)
Definition: StdFace_main.c:429
double V1p
Anisotropic Coulomb potential (2nd), input parameter.
Definition: StdFace_vals.h:77
double K
4-spin term. Not used.
Definition: StdFace_vals.h:128

◆ 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 805 of file StdFace_main.c.

References StdIntList::a, StdIntList::box, StdIntList::CalcSpec, StdIntList::CDataFileHead, StdIntList::cutoff_j, StdIntList::cutoff_t, StdIntList::cutoff_u, StdIntList::D, StdIntList::direct, StdIntList::dt, StdIntList::EigenVecIO, StdIntList::exct, StdIntList::ExpandCoef, StdIntList::ExpecInterval, StdIntList::FlgTemp, StdIntList::freq, StdIntList::Gamma, StdIntList::h, StdIntList::Height, StdIntList::initial_iv, StdIntList::InitialVecType, StdIntList::J, StdIntList::J0, StdIntList::J0All, StdIntList::J0p, StdIntList::J0pAll, StdIntList::J1, StdIntList::J1All, StdIntList::J1p, StdIntList::J1pAll, StdIntList::J2, StdIntList::J2All, StdIntList::J2p, StdIntList::J2pAll, 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::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::t1, StdIntList::t1p, StdIntList::t2, StdIntList::t2p, StdIntList::tdump, StdIntList::tp, StdIntList::tpp, StdIntList::tshift, StdIntList::U, StdIntList::Uquench, StdIntList::V, StdIntList::V0, StdIntList::V0p, StdIntList::V1, StdIntList::V1p, StdIntList::V2, StdIntList::V2p, StdIntList::VecPot, StdIntList::Vp, StdIntList::Vpp, and StdIntList::W.

Referenced by StdFace_main().

805  {
806  int i, j;
807  double NaN_d;
808  /*
809  NaN is used for not inputed variable
810  */
811  NaN_d = 0.0 / 0.0;
812  StdI->NaN_i = 2147483647;
813  StdI->pi = acos(-1.0);
814 
815  StdI->a = NaN_d;
816  for (i = 0; i < 3; i++) StdI->length[i] = NaN_d;
817  for (i = 0; i < 3; i++)
818  for (j = 0; j < 3; j++)
819  StdI->box[i][j] = StdI->NaN_i;
820  StdI->Gamma = NaN_d;
821  StdI->h = NaN_d;
822  StdI->Height = StdI->NaN_i;
823  StdI->JAll = NaN_d;
824  StdI->JpAll = NaN_d;
825  StdI->JppAll = NaN_d;
826  StdI->J0All = NaN_d;
827  StdI->J0pAll = NaN_d;
828  StdI->J1All = NaN_d;
829  StdI->J1pAll = NaN_d;
830  StdI->J2All = NaN_d;
831  StdI->J2pAll = NaN_d;
832  for (i = 0; i < 3; i++) {
833  for (j = 0; j < 3; j++) {
834  StdI->J[i][j] = NaN_d;
835  StdI->Jp[i][j] = NaN_d;
836  StdI->Jpp[i][j] = NaN_d;
837  StdI->J0[i][j] = NaN_d;
838  StdI->J0p[i][j] = NaN_d;
839  StdI->J1[i][j] = NaN_d;
840  StdI->J1p[i][j] = NaN_d;
841  StdI->J2[i][j] = NaN_d;
842  StdI->J2p[i][j] = NaN_d;
843  StdI->D[i][j] = 0.0;
844  }
845  }
846  StdI->D[2][2] = NaN_d;
847  StdI->K = NaN_d;
848  StdI->L = StdI->NaN_i;
849  for (i = 0; i < 3; i++)
850  for (j = 0; j < 3; j++)
851  StdI->direct[i][j] = NaN_d;
852  StdI->mu = NaN_d;
853  StdI->S2 = StdI->NaN_i;
854  StdI->t = NaN_d;
855  StdI->tp = NaN_d;
856  StdI->tpp = NaN_d;
857  StdI->t0 = NaN_d;
858  StdI->t0p = NaN_d;
859  StdI->t1 = NaN_d;
860  StdI->t1p = NaN_d;
861  StdI->t2 = NaN_d;
862  StdI->t2p = NaN_d;
863  StdI->U = NaN_d;
864  StdI->V = NaN_d;
865  StdI->Vp = NaN_d;
866  StdI->Vpp = NaN_d;
867  StdI->V0 = NaN_d;
868  StdI->V0p = NaN_d;
869  StdI->V1 = NaN_d;
870  StdI->V1p = NaN_d;
871  StdI->V2 = NaN_d;
872  StdI->V2p = NaN_d;
873  StdI->W = StdI->NaN_i;
874  for (i = 0; i < 3; i++)StdI->phase[i] = NaN_d;
875  StdI->pi180 = StdI->pi / 180.0;
876 
877  StdI->nelec = StdI->NaN_i;
878  StdI->Sz2 = StdI->NaN_i;
879  strcpy(StdI->model, "****\0");
880  strcpy(StdI->lattice, "****\0");
881  strcpy(StdI->outputmode, "****\0");
882  strcpy(StdI->CDataFileHead, "****\0");
883  StdI->cutoff_t = NaN_d;
884  StdI->cutoff_u = NaN_d;
885  StdI->cutoff_j = NaN_d;
886 #if defined(_HPhi)
887  StdI->LargeValue = NaN_d;
888  StdI->OmegaMax = NaN_d;
889  StdI->OmegaMin = NaN_d;
890  StdI->OmegaIm = NaN_d;
891  StdI->Nomega = StdI->NaN_i;
892  for (i = 0; i < 3; i++)StdI->SpectrumQ[i] = NaN_d;
893  strcpy(StdI->method, "****\0");
894  strcpy(StdI->Restart, "****\0");
895  strcpy(StdI->EigenVecIO, "****\0");
896  strcpy(StdI->InitialVecType, "****\0");
897  strcpy(StdI->CalcSpec, "****\0");
898  strcpy(StdI->SpectrumType, "****\0");
899  StdI->FlgTemp = 1;
900  StdI->Lanczos_max = StdI->NaN_i;
901  StdI->initial_iv = StdI->NaN_i;
902  StdI->nvec = StdI->NaN_i;
903  StdI->exct = StdI->NaN_i;
904  StdI->LanczosEps = StdI->NaN_i;
905  StdI->LanczosTarget = StdI->NaN_i;
906  StdI->NumAve = StdI->NaN_i;
907  StdI->ExpecInterval = StdI->NaN_i;
908  StdI->dt = NaN_d;
909  StdI->tdump = NaN_d;
910  StdI->tshift = NaN_d;
911  StdI->freq = NaN_d;
912  StdI->Uquench = NaN_d;
913  for (i = 0; i < 3; i++)StdI->VecPot[i] = NaN_d;;
914  strcpy(StdI->PumpType, "****\0");
915  StdI->ExpandCoef = StdI->NaN_i;
916 #elif defined(_mVMC)
917  strcpy(StdI->CParaFileHead, "****\0");
918  StdI->NVMCCalMode = StdI->NaN_i;
919  StdI->NLanczosMode = StdI->NaN_i;
920  StdI->NDataIdxStart = StdI->NaN_i;
921  StdI->NDataQtySmp = StdI->NaN_i;
922  StdI->NSPGaussLeg = StdI->NaN_i;
923  StdI->NSPStot = StdI->NaN_i;
924  StdI->NMPTrans = StdI->NaN_i;
925  StdI->NSROptItrStep = StdI->NaN_i;
926  StdI->NSROptItrSmp = StdI->NaN_i;
927  StdI->DSROptRedCut = NaN_d;
928  StdI->DSROptStaDel = NaN_d;
929  StdI->DSROptStepDt = NaN_d;
930  StdI->NVMCWarmUp = StdI->NaN_i;
931  StdI->NVMCInterval = StdI->NaN_i;
932  StdI->NVMCSample = StdI->NaN_i;
933  StdI->NExUpdatePath = StdI->NaN_i;
934  StdI->RndSeed = StdI->NaN_i;
935  StdI->NSplitSize = StdI->NaN_i;
936  StdI->NStore = StdI->NaN_i;
937  StdI->NSRCG = StdI->NaN_i;
938  StdI->ComplexType = StdI->NaN_i;
939  for (i = 0; i < 3; i++)
940  for (j = 0; j < 3; j++)
941  StdI->boxsub[i][j] = StdI->NaN_i;
942  StdI->Hsub = StdI->NaN_i;
943  StdI->Lsub = StdI->NaN_i;
944  StdI->Wsub = StdI->NaN_i;
945 #endif
946 }/*static void StdFace_ResetVals*/
double OmegaIm
Imaginary part of frequency.
Definition: StdFace_vals.h:262
char Restart[256]
The name of restart mode, input from file.
Definition: StdFace_vals.h:233
double V2
Anisotropic Coulomb potential (1st), input parameter.
Definition: StdFace_vals.h:78
double tshift
Shift of time-step of laser.
Definition: StdFace_vals.h:270
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:102
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:69
double cutoff_t
Cutoof for the hopping in wannier90, input from file.
Definition: StdFace_vals.h:225
double J[3][3]
Isotropic, diagonal/off-diagonal spin coupling (1st Near.), input parameter Jx, Jy, Jz, Jxy, etc.
Definition: StdFace_vals.h:100
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:286
double D[3][3]
Coefficient for input parameter D. Only D[2][2] is used.
Definition: StdFace_vals.h:124
double J1p[3][3]
Isotropic, diagonal/off-diagonal spin coupling (2nd Near.), input parameter J1&#39;x, J1&#39;y...
Definition: StdFace_vals.h:113
double pi180
, set in StdFace_ResetVals().
Definition: StdFace_vals.h:132
int initial_iv
the number for generating random number, input from file.
Definition: StdFace_vals.h:238
int NumAve
Number of trials for TPQ calculation.
Definition: StdFace_vals.h:243
double JpAll
Isotropic, diagonal spin coupling (2nd Near), input parameter Jp.
Definition: StdFace_vals.h:84
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:110
double J2p[3][3]
Isotropic, diagonal/off-diagonal spin coupling (2nd Near.), input parameter J2&#39;x, J2&#39;y...
Definition: StdFace_vals.h:119
char SpectrumType[256]
The type of mode for spectrum, input from file.
Definition: StdFace_vals.h:258
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:82
double dt
Time step.
Definition: StdFace_vals.h:269
int S2
Total spin |S| of a local spin, input from file.
Definition: StdFace_vals.h:215
int Nomega
Number of frequencies, input from file.
Definition: StdFace_vals.h:259
char CalcSpec[256]
The name of mode for spectrum, input from file.
Definition: StdFace_vals.h:257
double cutoff_j
Cutoof for the Hund in wannier90, input from file.
Definition: StdFace_vals.h:227
double J1All
Anisotropic, diagonal spin coupling (1nd Near), input parameter J1.
Definition: StdFace_vals.h:90
double V0p
Anisotropic Coulomb potential (2nd), input parameter.
Definition: StdFace_vals.h:75
double OmegaMax
Maximum of frequency for spectrum, input from file.
Definition: StdFace_vals.h:260
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:274
double V2p
Anisotropic Coulomb potential (2nd), input parameter.
Definition: StdFace_vals.h:79
double complex tpp
3rd-nearest hopping, input parameter
Definition: StdFace_vals.h:70
char model[256]
Name of model, input parameter.
Definition: StdFace_vals.h:60
double Gamma
Transvars magnetic field, input parameter.
Definition: StdFace_vals.h:127
double JppAll
Isotropic, diagonal spin coupling (3rd Near), input parameter J&#39;&#39;.
Definition: StdFace_vals.h:98
double V1
Anisotropic Coulomb potential (1st), input parameter.
Definition: StdFace_vals.h:76
double J0All
Anisotropic, diagonal spin coupling (1nd Near), input parameter J0.
Definition: StdFace_vals.h:86
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:104
double U
On-site Coulomb potential, input parameter.
Definition: StdFace_vals.h:71
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:234
double SpectrumQ[3]
wavenumver (q-vector) in fractional coordinate
Definition: StdFace_vals.h:263
double phase[3]
Boundary phase, input parameter phase0, etc.
Definition: StdFace_vals.h:133
int exct
The number of eigenvectors to be computed. input from file.
Definition: StdFace_vals.h:240
double tdump
Time scale of dumping.
Definition: StdFace_vals.h:271
double J0pAll
Anisotropic, diagonal spin coupling (2nd Near), input parameter J0&#39;.
Definition: StdFace_vals.h:88
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:261
int LanczosTarget
Which eigenvector is used for the convergence check.
Definition: StdFace_vals.h:242
int LanczosEps
Convergence threshold for the Lanczos method.
Definition: StdFace_vals.h:241
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:235
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:122
double pi
Definition: StdFace_vals.h:31
int Lanczos_max
The maxixmum number of iterations, input from file.
Definition: StdFace_vals.h:237
double complex t1
Anisotropic hopping (1st), input parameter.
Definition: StdFace_vals.h:66
double V
Off-site Coulomb potential (1st), input parameter.
Definition: StdFace_vals.h:72
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
double V0
Anisotropic Coulomb potential (1st), input parameter.
Definition: StdFace_vals.h:74
double Vpp
Off-site Coulomb potential (3rd), input parameter.
Definition: StdFace_vals.h:80
double complex t1p
Anisotropic hopping (2nd), input parameter.
Definition: StdFace_vals.h:67
char method[256]
The name of method, input from file.
Definition: StdFace_vals.h:232
double complex t2
Anisotropic hopping (1st), input parameter.
Definition: StdFace_vals.h:68
double LargeValue
The shift parameter for the TPQ calculation.
Definition: StdFace_vals.h:246
char PumpType[256]
The type of pump.
Definition: StdFace_vals.h:275
double mu
Chemical potential, input parameter.
Definition: StdFace_vals.h:61
int Sz2
Total Sz, input from file.
Definition: StdFace_vals.h:220
double Vp
Off-site Coulomb potential (2nd), input parameter.
Definition: StdFace_vals.h:73
double J1pAll
Anisotropic, diagonal spin coupling (2nd Near), input parameter J1&#39;.
Definition: StdFace_vals.h:92
double J2All
Anisotropic, diagonal spin coupling (1nd Near), input parameter J2.
Definition: StdFace_vals.h:94
int Height
Number of sites along the 3rd axis, input parameter.
Definition: StdFace_vals.h:41
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:216
double Uquench
Quenched on-site potential.
Definition: StdFace_vals.h:273
double h
Longitudinal magnetic field, input parameter.
Definition: StdFace_vals.h:126
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:116
int nelec
Number of electrons, input from file.
Definition: StdFace_vals.h:214
double freq
Frequency of laser.
Definition: StdFace_vals.h:272
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:244
double J2pAll
Anisotropic, diagonal spin coupling (2nd Near), input parameter J2&#39;.
Definition: StdFace_vals.h:96
double J0p[3][3]
Isotropic, diagonal/off-diagonal spin coupling (2nd Near.), input parameter J0&#39;x, J0&#39;y...
Definition: StdFace_vals.h:107
char CDataFileHead[256]
Header of the output files. Input from file.
Definition: StdFace_vals.h:218
double cutoff_u
Cutoof for the Coulomb in wannier90, input from file.
Definition: StdFace_vals.h:226
double V1p
Anisotropic Coulomb potential (2nd), input parameter.
Definition: StdFace_vals.h:77
double K
4-spin term. Not used.
Definition: StdFace_vals.h:128

◆ 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 1076 of file StdFace_main.c.

References StdFace_exit().

Referenced by StdFace_main().

1081 {
1082  int num;
1083  char *valuestring_r, *valuestring_i;
1084  double value_r, value_i;
1085 
1086  if (isnan(creal(*value)) == 0) {
1087  fprintf(stdout, "ERROR ! Keyword %s is duplicated ! \n", keyword);
1088  StdFace_exit(-1);
1089  }
1090  else {
1091 
1092  if (valuestring[0] == ',') {
1093  valuestring_r = NULL;
1094  valuestring_i = strtok(valuestring, ",");
1095  }
1096  else {
1097  valuestring_r = strtok(valuestring, ",");
1098  valuestring_i = strtok(NULL, ",");
1099  }
1100 
1101  if (valuestring_r == NULL) {
1102  *value = 0.0;
1103  }
1104  else {
1105  num = sscanf(valuestring_r, "%lf", &value_r);
1106  if (num == 1) *value = value_r;
1107  else *value = 0.0;
1108  }
1109 
1110  if (valuestring_i == NULL) {
1111  *value += I * 0.0;
1112  }
1113  else {
1114  num = sscanf(valuestring_i, "%lf", &value_i);
1115  if (num == 1) *value += I * value_i;
1116  else *value += I * 0.0;
1117  }
1118  }
1119 }/*static void StoreWithCheckDup_c*/
void StdFace_exit(int errorcode)
MPI Abortation wrapper.

◆ 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 1057 of file StdFace_main.c.

References StdFace_exit().

Referenced by StdFace_main().

1062 {
1063  if (isnan(*value) == 0){
1064  fprintf(stdout, "ERROR ! Keyword %s is duplicated ! \n", keyword);
1065  StdFace_exit(-1);
1066  }
1067  else{
1068  sscanf(valuestring, "%lf", value);
1069  }
1070 }/*static void StoreWithCheckDup_d*/
void StdFace_exit(int errorcode)
MPI Abortation wrapper.

◆ 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 1036 of file StdFace_main.c.

References StdFace_exit().

Referenced by StdFace_main().

1041 {
1042  int NaN_i = 2147483647;
1043 
1044  if (*value != NaN_i){
1045  fprintf(stdout, "ERROR ! Keyword %s is duplicated ! \n", keyword);
1046  StdFace_exit(-1);
1047  }
1048  else{
1049  sscanf(valuestring, "%d", value);
1050  }
1051 }/*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.

◆ 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 997 of file StdFace_main.c.

References StdFace_exit().

Referenced by StdFace_main().

1002 {
1003  if (strcmp(value, "****") != 0){
1004  fprintf(stdout, "ERROR ! Keyword %s is duplicated ! \n", keyword);
1005  StdFace_exit(-1);
1006  }
1007  else{
1008  strcpy(value, valuestring);
1009  }
1010 }/*static void StoreWithCheckDup_s*/
void StdFace_exit(int errorcode)
MPI Abortation wrapper.

◆ 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 1016 of file StdFace_main.c.

References StdFace_exit(), and Text2Lower().

Referenced by StdFace_main().

1021 {
1022  if (strcmp(value, "****") != 0) {
1023  fprintf(stdout, "ERROR ! Keyword %s is duplicated ! \n", keyword);
1024  StdFace_exit(-1);
1025  }
1026  else {
1027  strcpy(value, valuestring);
1028  Text2Lower(value);
1029  }
1030 }/*static void StoreWithCheckDup_sl*/
static void Text2Lower(char *value)
Definition: StdFace_main.c:951
void StdFace_exit(int errorcode)
MPI Abortation wrapper.

◆ Text2Lower()

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

Definition at line 951 of file StdFace_main.c.

Referenced by StdFace_main(), and StoreWithCheckDup_sl().

952  {
953  char value2;
954  int valuelen, ii;
955 
956  valuelen = strlen(value);
957  for (ii = 0; ii < valuelen; ii++) {
958  value2 = tolower(value[ii]);
959  value[ii] = value2;
960  }
961 }/*static void Text2Lower*/

◆ 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 966 of file StdFace_main.c.

Referenced by StdFace_main().

967  {
968  char value2[256];
969  int valuelen, valuelen2, ii;
970 
971  valuelen = strlen(value);
972  valuelen2 = 0;
973  for (ii = 0; ii < valuelen; ii++){
974  if (value[ii] != ' ' &&
975  value[ii] != ':' &&
976  value[ii] != ';' &&
977  value[ii] != '\"' &&
978  value[ii] != '\b' &&
979  value[ii] != '\\' &&
980  value[ii] != '\v' &&
981  value[ii] != '\n' &&
982  value[ii] != '\0'){
983  value2[valuelen2] = value[ii];
984  valuelen2++;
985  }
986  }
987 
988  strncpy(value, value2, valuelen2);
989  value[valuelen2] = '\0';
990 
991 }/*static void TrimSpaceQuote*/

◆ 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 1605 of file StdFace_main.c.

References StdFace_exit().

Referenced by StdFace_main().

1609 {
1610  fprintf(stdout, "\nSorry, specified combination, \n");
1611  fprintf(stdout, " MODEL : %s \n", model);
1612  fprintf(stdout, " LATTICE : %s, \n", lattice);
1613  fprintf(stdout, "is unsupported in the STANDARD MODE...\n");
1614  fprintf(stdout, "Please use the EXPART MODE, or write a NEW FUNCTION and post us.\n");
1615  StdFace_exit(-1);
1616 }/*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.

◆ VectorPotential()

static void VectorPotential ( struct StdIntList StdI)
static

Definition at line 429 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().

429  {
430  FILE *fp;
431  int it, ii, isite, icell, itau, itrans, jsite, jcell, jtau, ntrans0;
432  double Cphase, time, dR[3];
433  double **Et;
434  double complex coef;
435 
436  fprintf(stdout, "\n @ Time-evolution\n\n");
437 
438  StdFace_PrintVal_d("VecPotW", &StdI->VecPot[0], 0.0);
439  StdFace_PrintVal_d("VecPotL", &StdI->VecPot[1], 0.0);
440  StdFace_PrintVal_d("VecPotH", &StdI->VecPot[2], 0.0);
441  StdFace_PrintVal_i("Lanczos_max", &StdI->Lanczos_max, 1000);
442  StdFace_PrintVal_d("dt", &StdI->dt, 0.1);
443  StdFace_PrintVal_d("freq", &StdI->freq, 0.1);
444  StdFace_PrintVal_d("tshift", &StdI->tshift, 0.0);
445  StdFace_PrintVal_d("tdump", &StdI->tdump, 0.1);
446  StdFace_PrintVal_d("Uquench", &StdI->Uquench, 0.0);
447  StdFace_PrintVal_i("ExpandCoef", &StdI->ExpandCoef, 10);
448  StdI->At = (double **)malloc(sizeof(double*) * StdI->Lanczos_max);
449  Et = (double **)malloc(sizeof(double*) * StdI->Lanczos_max);
450  for (it = 0; it < StdI->Lanczos_max; it++) {
451  StdI->At[it] = (double *)malloc(sizeof(double) * 3);
452  Et[it] = (double *)malloc(sizeof(double) * 3);
453  }
454 
455  if (strcmp(StdI->PumpType, "****") == 0) {
456  strcpy(StdI->PumpType, "quench\0");
457  fprintf(stdout, " PumpType = quench ###### DEFAULT VALUE IS USED ######\n");
458  StdI->PumpBody = 2;
459  }/*if (strcmp(StdI->PumpType, "****")*/
460  else {
461  fprintf(stdout, " PumpType = %s\n", StdI->PumpType);
462  if (strcmp(StdI->PumpType, "quench") == 0) {
463  StdI->PumpBody = 2;
464  }/*if (strcmp(StdI->PumpType, "quench")*/
465  else if (strcmp(StdI->PumpType, "pulselaser") == 0) {
466  for (it = 0; it < StdI->Lanczos_max; it++) {
467  time = StdI->dt*(double)it;
468  for (ii = 0; ii < 3; ii++) {
469  StdI->At[it][ii] = StdI->VecPot[ii] * cos(StdI->freq*(time - StdI->tshift))
470  * exp(-0.5* (time - StdI->tshift)*(time - StdI->tshift) / (StdI->tdump*StdI->tdump));
471  Et[it][ii] = -StdI->VecPot[ii]
472  * (
473  (StdI->tshift - time) / (StdI->tdump*StdI->tdump) * cos(StdI->freq*(time - StdI->tshift))
474  - StdI->freq* sin(StdI->freq*(time - StdI->tshift))
475  )
476  * exp(-0.5* (time - StdI->tshift)*(time - StdI->tshift) / (StdI->tdump*StdI->tdump));
477  }
478  }/*for (it = 0; it < StdI->Lanczos_max; it++)*/
479  StdI->PumpBody = 1;
480  }/*if (strcmp(StdI->PumpType, "pulselaser") == 0)*/
481  else if (strcmp(StdI->PumpType, "aclaser") == 0) {
482  for (it = 0; it < StdI->Lanczos_max; it++) {
483  time = StdI->dt*(double)it;
484  for (ii = 0; ii < 3; ii++) {
485  StdI->At[it][ii] = StdI->VecPot[ii] * sin(StdI->freq*(time - StdI->tshift));
486  Et[it][ii] = StdI->VecPot[ii] * cos(StdI->freq*(time - StdI->tshift)) * StdI->freq;
487  }
488  }/*for (it = 0; it < StdI->Lanczos_max; it++)*/
489  StdI->PumpBody = 1;
490  }/*if (strcmp(StdI->PumpType, "aclaser") == 0)*/
491  else if (strcmp(StdI->PumpType, "dclaser") == 0) {
492  for (it = 0; it < StdI->Lanczos_max; it++) {
493  time = StdI->dt*(double)it;
494  for (ii = 0; ii < 3; ii++) {
495  StdI->At[it][ii] = StdI->VecPot[ii] * time;
496  Et[it][ii] = -StdI->VecPot[ii];
497  }
498  }/*for (it = 0; it < StdI->Lanczos_max; it++)*/
499  StdI->PumpBody = 1;
500  }/* if (strcmp(StdI->PumpType, "dclaser") == 0)*/
501  else {
502  fprintf(stdout, "\n ERROR ! PumpType : %s\n", StdI->PumpType);
503  StdFace_exit(-1);
504  }
505  }/*if (! strcmp(StdI->PumpType, "****"))*/
506 
507  if (StdI->PumpBody == 1) {
508  fp = fopen("potential.dat", "w");
509  fprintf(fp, "# Time A_W A_L A_H E_W E_L E_H\n");
510  for (it = 0; it < StdI->Lanczos_max; it++) {
511  time = StdI->dt*(double)it;
512  fprintf(fp, "%f %f %f %f %f %f %f\n",
513  time, StdI->At[it][0], StdI->At[it][1], StdI->At[it][2], Et[it][0], Et[it][1], Et[it][2]);
514  }
515  fflush(fp);
516  fclose(fp);
517  }/*if (StdI->PumpBody == 1)*/
518 
519  for (it = 0; it < StdI->Lanczos_max; it++) free(Et[it]);
520  free(Et);
521 }/*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:270
int ExpandCoef
The number of Hamiltonian-vector operation for the time-evolution.
Definition: StdFace_vals.h:286
double ** At
[StdIntList::nt][3] Vector potential.
Definition: StdFace_vals.h:285
double dt
Time step.
Definition: StdFace_vals.h:269
double VecPot[3]
Vector potential.
Definition: StdFace_vals.h:274
double tdump
Time scale of dumping.
Definition: StdFace_vals.h:271
int PumpBody
one- or two-body pumping, defined from StdIntList::PumpType
Definition: StdFace_vals.h:276
int Lanczos_max
The maxixmum number of iterations, input from file.
Definition: StdFace_vals.h:237
char PumpType[256]
The type of pump.
Definition: StdFace_vals.h:275
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:273
double freq
Frequency of laser.
Definition: StdFace_vals.h:272
void StdFace_exit(int errorcode)
MPI Abortation wrapper.