When you add a new input file to namelist file, the following procedures must be needed. In the following, we add the keyword "Test" as an example.
- Add a new keyword to the end of
cKWListOfFileNameList
in readdef.cpp
. ={
"CalcMod",
"ModPara",
"LocSpin",
"Trans",
"CoulombIntra",
"CoulombInter",
"Hund",
"PairHop",
"Exchange",
"InterAll",
"OneBodyG",
"TwoBodyG",
"PairLift",
"Ising",
"Boost",
"SingleExcitation",
"PairExcitation",
"SpectrumVec",
"Laser",
"TEOneBody",
"TETwoBody"
"Test"
}
Here, D_CharTmpReadDef
is set as 200
in readdef.h. If the the character number of added keyword exceeds 200
, please change the value.
- Define the index of keyword (such as KWCalcMod, KWModPara...) in
readdef.h
. #define KWCalcMod 0
#define KWModPara 1
#define KWLocSpin 2
#define KWTrans 3
#define KWCoulombIntra 4
#define KWCoulombInter 5
#define KWHund 6
#define KWPairHop 7
#define KWExchange 8
#define KWInterAll 9
#define KWOneBodyG 10
#define KWTwoBodyG 11
#define KWPairLift 12
#define KWIsing 13
#define KWBoost 14
#define KWSingleExcitation 15
#define KWPairExcitation 16
#define KWSpectrumVec 17
#define KWLaser 18
#define KWTEOneBody 19
#define KWTETwoBody 20
#define KWTest 21
The defined value must be same as the index of cKWListOfFileNameList to get the name of keyword, i.e. cKWListOfFileNameList[KWTest] = "Test".
- Add procedure of reading the file in
ReadDefFileNInt
function in readdef.cpp
. if (strcmp(defname, "") == 0) continue;
if(iKWidx==KWSpectrumVec){
continue;
}
fprintf(
stdoutMPI,
" Read File %s for %s.\n", defname, cKWListOfFileNameList[iKWidx]);
switch (iKWidx) {
case KWTest:
}
- See also
- ReadDefFileNInt
- Use
InitializeInteractionNum
function to initialize variables. - See also
- InitializeInteractionNum
- The memories of arrays are stored by setmem_def function in
xsetmem.cpp
. - See also
- setmem_def