forked from abacusmodeling/abacus-develop
-
Notifications
You must be signed in to change notification settings - Fork 219
When there are multiple sets of erfc_alpha/omega, only the last one would be accepted. #7168
Copy link
Copy link
Open
Labels
EXX and lr-TDDFTRelated to EXX or lr-TDDFTRelated to EXX or lr-TDDFTInput&OutputSuitable for coders without knowing too many DFT detailsSuitable for coders without knowing too many DFT details
Description
Describe the Code Quality Issue
When multiple sets of erfc_alpha/omega are set, according to the code logic, only the last one would be accepted. Everytime the list is re-inited.
source/source_io/module_parameter/input_conv.cpp:404-415
assert(erfc_alpha.size() == PARAM.inp.exx_erfc_omega.size());
if(PARAM.inp.basis_type == "lcao")
{
GlobalC::exx_info.info_global.coulomb_param[Conv_Coulomb_Pot_K::Coulomb_Type::Erfc].resize(erfc_alpha.size());
for(std::size_t i=0; i<erfc_alpha.size(); ++i)
{
GlobalC::exx_info.info_global.coulomb_param[Conv_Coulomb_Pot_K::Coulomb_Type::Erfc] = {{
{"alpha", ModuleBase::GlobalFunc::TO_STRING(erfc_alpha[i])},
{"omega", ModuleBase::GlobalFunc::TO_STRING(PARAM.inp.exx_erfc_omega[i])},
{"singularity_correction", PARAM.inp.exx_singularity_correction} }};
}
}Besides, the EXX PW is not properly dealt with.
Additional Context
No response
Task list for Issue attackers (only for developers)
- Identify the specific code file or section with the code quality issue.
- Investigate the issue and determine the root cause.
- Research best practices and potential solutions for the identified issue.
- Refactor the code to improve code quality, following the suggested solution.
- Ensure the refactored code adheres to the project's coding standards.
- Test the refactored code to ensure it functions as expected.
- Update any relevant documentation, if necessary.
- Submit a pull request with the refactored code and a description of the changes made.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
EXX and lr-TDDFTRelated to EXX or lr-TDDFTRelated to EXX or lr-TDDFTInput&OutputSuitable for coders without knowing too many DFT detailsSuitable for coders without knowing too many DFT details