Skip to content

Commit 604e17b

Browse files
committed
fix input_conv
1 parent a6172e5 commit 604e17b

File tree

2 files changed

+27
-14
lines changed

2 files changed

+27
-14
lines changed

docs/advanced/input_files/input-main.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1730,7 +1730,7 @@ These variables are used to control the output of properties.
17301730

17311731
- **Type**: Integer
17321732
- **Availability**: Numerical atomic orbital basis
1733-
- **Description**: Whether to output the electronic wavefunction coefficients into files and store them in the folder `OUT.${suffix}`. The files are named as `wf{s}{spin index}{k(optional)}{k-point index}{g(optional)}{geometry index1}{_nao} + {".txt"/".dat"}`. Here, 's' refers to spin, where s1 means spin up channel while s2 means spin down channel, and 's12' refer to spinor wave functions that contains both spin channels with spin-orbital coupling or noncollinear calculations enabled. In addition, if 'gamma_only' is set to 0, then the optinoal k-point sampling index appears with the k-point index attached to the electronic wave function file names. Finally, if [out_app_flag](#out_app_flag) is set to false, the file name contains the optional 'g' index for each ionic step that may have different geometries, and if [out_app_flag](#out_app_flag) is set to true, the wave functions accumulate during ionic steps.
1733+
- **Description**: Whether to output the electronic wavefunction coefficients into files and store them in the folder `OUT.${suffix}`. The files are named as `wf{s}{spin index}{k(optional)}{k-point index}{g(optional)}{geometry index1}{_nao} + {".txt"/".dat"}`. Here, 's' refers to spin, where s1 means spin up channel while s2 means spin down channel, and 's12' refer to spinor wave functions that contains both spin channels with spin-orbital coupling or noncollinear calculations enabled. In addition, if 'gamma_only' is set to 0, then the optinoal k-point sampling index appears with the k-point index attached to the electronic wave function file names. Finally, if [out_app_flag](#out_app_flag) is set to false, the file name contains the optional 'g' index for each ionic step that may have different geometries, and if [out_app_flag](#out_app_flag) is set to true, the wave functions accumulate during ionic steps. If the out_app_flag is set to false, a new folder named WFC will be created, and the wave function files will be saved into it.
17341734
- 0: no output
17351735
- 1: (txt format)
17361736
- gamma-only: `wfs1_nao.txt` or `wfs2_nao.txt`, ...;

source/source_io/input_conv.cpp

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,12 @@ void Input_Conv::Convert()
298298
if (dft_functional_lower == "hf" || dft_functional_lower == "pbe0"
299299
|| dft_functional_lower == "hse"
300300
|| dft_functional_lower == "opt_orb"
301-
|| dft_functional_lower == "scan0") {
301+
|| dft_functional_lower == "scan0"
302+
|| dft_functional_lower == "lc_pbe"
303+
|| dft_functional_lower == "lc_wpbe"
304+
|| dft_functional_lower == "lrc_wpbe"
305+
|| dft_functional_lower == "lrc_wpbeh"
306+
|| dft_functional_lower == "cam_pbeh") {
302307
GlobalC::restart.info_load.load_charge = true;
303308
GlobalC::restart.info_load.load_H = true;
304309
}
@@ -323,10 +328,15 @@ void Input_Conv::Convert()
323328
dft_functional_lower.begin(),
324329
tolower);
325330
if (dft_functional_lower == "hf"
326-
|| dft_functional_lower == "pbe0" || dft_functional_lower == "b3lyp" || dft_functional_lower == "hse"
327-
|| dft_functional_lower == "scan0"
328-
|| dft_functional_lower == "muller" || dft_functional_lower == "power"
329-
|| dft_functional_lower == "cwp22" || dft_functional_lower == "wp22")
331+
|| dft_functional_lower == "pbe0" || dft_functional_lower == "b3lyp" || dft_functional_lower == "hse"
332+
|| dft_functional_lower == "scan0"
333+
|| dft_functional_lower == "muller" || dft_functional_lower == "power"
334+
|| dft_functional_lower == "cwp22" || dft_functional_lower == "wp22"
335+
|| dft_functional_lower == "lc_pbe"
336+
|| dft_functional_lower == "lc_wpbe"
337+
|| dft_functional_lower == "lrc_wpbe"
338+
|| dft_functional_lower == "lrc_wpbeh"
339+
|| dft_functional_lower == "cam_pbeh")
330340
{
331341
GlobalC::exx_info.info_global.cal_exx = true;
332342

@@ -356,9 +366,9 @@ void Input_Conv::Convert()
356366
GlobalC::exx_info.info_global.coulomb_param[Conv_Coulomb_Pot_K::Coulomb_Type::Fock].resize(fock_alpha.size());
357367
for(std::size_t i=0; i<fock_alpha.size(); ++i)
358368
{
359-
GlobalC::exx_info.info_global.coulomb_param[Conv_Coulomb_Pot_K::Coulomb_Type::Fock][i] = {{
369+
GlobalC::exx_info.info_global.coulomb_param[Conv_Coulomb_Pot_K::Coulomb_Type::Fock] = {{
360370
{"alpha", ModuleBase::GlobalFunc::TO_STRING(fock_alpha[i])},
361-
{"Rcut_type", "spencer"} }};
371+
{"singularity_correction", PARAM.inp.exx_singularity_correction} }};
362372
}
363373
}
364374
else if(PARAM.inp.basis_type == "lcao_in_pw")
@@ -389,13 +399,16 @@ void Input_Conv::Convert()
389399
if(!erfc_alpha.empty())
390400
{
391401
assert(erfc_alpha.size() == PARAM.inp.exx_erfc_omega.size());
392-
GlobalC::exx_info.info_global.coulomb_param[Conv_Coulomb_Pot_K::Coulomb_Type::Erfc].resize(erfc_alpha.size());
393-
for(std::size_t i=0; i<erfc_alpha.size(); ++i)
402+
if(PARAM.inp.basis_type == "lcao")
394403
{
395-
GlobalC::exx_info.info_global.coulomb_param[Conv_Coulomb_Pot_K::Coulomb_Type::Erfc] = {{
396-
{"alpha", ModuleBase::GlobalFunc::TO_STRING(erfc_alpha[i])},
397-
{"omega", ModuleBase::GlobalFunc::TO_STRING(PARAM.inp.exx_erfc_omega[i])},
398-
{"Rcut_type", "limits"} }};
404+
GlobalC::exx_info.info_global.coulomb_param[Conv_Coulomb_Pot_K::Coulomb_Type::Erfc].resize(erfc_alpha.size());
405+
for(std::size_t i=0; i<erfc_alpha.size(); ++i)
406+
{
407+
GlobalC::exx_info.info_global.coulomb_param[Conv_Coulomb_Pot_K::Coulomb_Type::Erfc] = {{
408+
{"alpha", ModuleBase::GlobalFunc::TO_STRING(erfc_alpha[i])},
409+
{"omega", ModuleBase::GlobalFunc::TO_STRING(PARAM.inp.exx_erfc_omega[i])},
410+
{"singularity_correction", PARAM.inp.exx_singularity_correction} }};
411+
}
399412
}
400413
}
401414
}

0 commit comments

Comments
 (0)