Skip to content

Commit 2574013

Browse files
committed
rename and update doc
1 parent ac9b788 commit 2574013

File tree

5 files changed

+10
-9
lines changed

5 files changed

+10
-9
lines changed

docs/advanced/input_files/input-main.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,7 @@
420420
- [pexsi\_zero\_thr](#pexsi_zero_thr)
421421
- [Linear Response TDDFT](#linear-response-tddft)
422422
- [xc\_kernel](#xc_kernel)
423+
- [lr\_init\_xc\_kernel](#lr_init_xc_kernel)
423424
- [lr\_solver](#lr_solver)
424425
- [lr\_thr](#lr_thr)
425426
- [nocc](#nocc)
@@ -3921,10 +3922,10 @@ Currently supported: `RPA`, `LDA`, `PBE`, `HSE`, `HF`.
39213922

39223923
- **Type**: String
39233924
- **Description**: The method to initalize the xc kernel.
3924-
- "from_chg_groundstate": Calculate xc kerenel ($f_\text{xc}$) from the ground-state charge density.
3925-
- "file": Read the xc kernel $f_\text{xc}$ on grid from the provided files. The following words should be the paths of ".cube" files, where the first 3 (spin-aa, spin-ab and spin-bb) will be read in. The parameter [xc_kernel](#xc_kernel) will be invalid. Now only LDA-type kernel is supproted as the potential will be calculated by directly multiplying the transition density.
3926-
- "from_chg_file": Calculate fxc from the charge density read from the provided files. The following words should be the paths of ".cube" files, where the first [nspin]($nspin) files will be read in.
3927-
- **Default**: "from_chg_groundstate"
3925+
- "default": Calculate xc kerenel ($f_\text{xc}$) from the ground-state charge density.
3926+
- "file": Read the xc kernel $f_\text{xc}$ on grid from the provided files. The following words should be the paths of ".cube" files, where the first 1 (*[nspin](#nspin)==1*) or 3 (*[nspin](#nspin)==2*, namely spin-aa, spin-ab and spin-bb) will be read in. The parameter [xc_kernel](#xc_kernel) will be invalid. Now only LDA-type kernel is supproted as the potential will be calculated by directly multiplying the transition density.
3927+
- "from_charge_file": Calculate fxc from the charge density read from the provided files. The following words should be the paths of ".cube" files, where the first [nspin]($nspin) files will be read in.
3928+
- **Default**: "default"
39283929

39293930
### lr_solver
39303931

source/module_io/read_input_item_tddft.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,9 +318,9 @@ void ReadInput::item_lr_tddft()
318318
for (int i = 0; i < count; i++) { ifxc.push_back(item.str_values[i]); }
319319
};
320320
item.reset_value = [](const Input_Item& item, Parameter& para) {
321-
if (para.input.lr_init_xc_kernel.empty()) { para.input.lr_init_xc_kernel.push_back("from_chg_groundstate"); }
321+
if (para.input.lr_init_xc_kernel.empty()) { para.input.lr_init_xc_kernel.push_back("default"); }
322322
};
323-
sync_stringvec(input.lr_init_xc_kernel, para.input.lr_init_xc_kernel.size(), "from_chg_groundstate");
323+
sync_stringvec(input.lr_init_xc_kernel, para.input.lr_init_xc_kernel.size(), "default");
324324
this->add_item(item);
325325
}
326326
{

source/module_io/test/read_input_ptest.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ TEST_F(InputParaTest, ParaRead)
417417
EXPECT_EQ(param.inp.nocc, param.inp.nbands);
418418
EXPECT_EQ(param.inp.nvirt, 1);
419419
EXPECT_EQ(param.inp.xc_kernel, "LDA");
420-
EXPECT_EQ(param.inp.lr_init_xc_kernel[0], "from_chg_groundstate");
420+
EXPECT_EQ(param.inp.lr_init_xc_kernel[0], "default");
421421
EXPECT_EQ(param.inp.lr_solver, "dav");
422422
EXPECT_DOUBLE_EQ(param.inp.lr_thr, 1e-2);
423423
EXPECT_FALSE(param.inp.lr_unrestricted);

source/module_lr/potentials/pot_hxc_lrtd.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ namespace LR
1919
/// constructor for exchange-correlation kernel
2020
PotHxcLR(const std::string& xc_kernel, const ModulePW::PW_Basis& rho_basis,
2121
const UnitCell& ucell, const Charge& chg_gs/*ground state*/, const Parallel_Grid& pgrid,
22-
const SpinType& st = SpinType::S1, const std::vector<std::string>& lr_init_xc_kernel = { "from_chg_groundstate" });
22+
const SpinType& st = SpinType::S1, const std::vector<std::string>& lr_init_xc_kernel = { "default" });
2323
~PotHxcLR() {}
2424
void cal_v_eff(double** rho, const UnitCell& ucell, ModuleBase::matrix& v_eff, const std::vector<int>& ispin_op = { 0,0 });
2525
const int& nrxx = nrxx_;

source/module_lr/potentials/xc_kernel.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ LR::KernelXC::KernelXC(const ModulePW::PW_Basis& rho_basis,
4444
}
4545

4646
#ifdef USE_LIBXC
47-
if (lr_init_xc_kernel[0] == "from_chg_file")
47+
if (lr_init_xc_kernel[0] == "from_charge_file")
4848
{
4949
assert(lr_init_xc_kernel.size() >= 2);
5050
double** rho_for_fxc;

0 commit comments

Comments
 (0)