We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7fdb1a3 commit 5ccb292Copy full SHA for 5ccb292
source/module_io/read_input_item_elec_stru.cpp
@@ -235,7 +235,18 @@ void ReadInput::item_elec_stru()
235
para.input.nupdown = doublevalue;
236
para.sys.two_fermi = true;
237
};
238
-
+ item.reset_value = [](const Input_Item&, Parameter& para) {
239
+ if (para.input.nspin == 1)
240
+ {
241
+ para.sys.two_fermi = false;
242
+ }
243
+ };
244
+ item.check_value = [](const Input_Item&, const Parameter& para) {
245
+ if (para.input.nspin == 1 && para.input.nupdown != 0.0)
246
247
+ ModuleBase::WARNING_QUIT("ReadInput", "nupdown mustn't have a non-zero value for spin-unpolarized calculations.");
248
249
250
sync_double(input.nupdown);
251
this->add_item(item);
252
}
0 commit comments