Skip to content

Commit fd0f5fa

Browse files
authored
Fix: Use B3LYP does not enter Exx loop (deepmodeling#6663)
1 parent 852fcac commit fd0f5fa

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

source/module_io/input_conv.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ void Input_Conv::Convert()
306306
tolower);
307307
GlobalC::restart.folder = PARAM.globalv.global_readin_dir + "restart/";
308308
ModuleBase::GlobalFunc::MAKE_DIR(GlobalC::restart.folder);
309-
if (dft_functional_lower == "hf" || dft_functional_lower == "pbe0"
309+
if (dft_functional_lower == "hf" || dft_functional_lower == "pbe0" || dft_functional_lower == "b3lyp"
310310
|| dft_functional_lower == "hse"
311311
|| dft_functional_lower == "opt_orb"
312312
|| dft_functional_lower == "scan0") {
@@ -332,7 +332,7 @@ void Input_Conv::Convert()
332332
dft_functional_lower.begin(),
333333
tolower);
334334
GlobalC::restart.folder = PARAM.globalv.global_readin_dir + "restart/";
335-
if (dft_functional_lower == "hf" || dft_functional_lower == "pbe0"
335+
if (dft_functional_lower == "hf" || dft_functional_lower == "pbe0" || dft_functional_lower == "b3lyp"
336336
|| dft_functional_lower == "hse"
337337
|| dft_functional_lower == "opt_orb"
338338
|| dft_functional_lower == "scan0") {
@@ -362,7 +362,8 @@ void Input_Conv::Convert()
362362
PARAM.inp.dft_functional.end(),
363363
dft_functional_lower.begin(),
364364
tolower);
365-
if (dft_functional_lower == "hf" || dft_functional_lower == "pbe0" || dft_functional_lower == "scan0")
365+
if (dft_functional_lower == "hf" || dft_functional_lower == "pbe0" || dft_functional_lower == "scan0"
366+
|| dft_functional_lower == "b3lyp")
366367
{
367368
GlobalC::exx_info.info_global.cal_exx = true;
368369
GlobalC::exx_info.info_global.ccp_type

source/module_io/read_input_item_exx_dftu.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ void ReadInput::item_exx()
2626
{
2727
para.input.exx_hybrid_alpha = "0.25";
2828
}
29+
else if (dft_functional_lower == "b3lyp")
30+
{
31+
para.input.exx_hybrid_alpha = "0.20";
32+
}
2933
// added by jghan 2024-07-06
3034
else if (dft_functional_lower == "muller" || dft_functional_lower == "power"
3135
|| dft_functional_lower == "wp22" || dft_functional_lower == "cwp22")

0 commit comments

Comments
 (0)