Skip to content

Commit ceaefdc

Browse files
add a value-check for scf_os_thr
1 parent 32a7958 commit ceaefdc

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

source/module_io/read_input_item_elec_stru.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -538,6 +538,12 @@ void ReadInput::item_elec_stru()
538538
Input_Item item("scf_os_thr");
539539
item.annotation = "charge density threshold for oscillation";
540540
read_sync_double(input.scf_os_thr);
541+
item.check_value = [](const Input_Item& item, const Parameter& para) {
542+
if (para.input.scf_os_thr >= 0)
543+
{
544+
ModuleBase::WARNING_QUIT("ReadInput", "scf_os_thr should be negative");
545+
}
546+
};
541547
this->add_item(item);
542548
}
543549
{

0 commit comments

Comments
 (0)