Skip to content

Commit ec203e1

Browse files
committed
Fix: forbit setting of nspin=4 without noncolin and lspinorb
1 parent ee4ad57 commit ec203e1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

source/module_io/read_input_item_elec_stru.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,10 @@ void ReadInput::item_elec_stru()
290290
{
291291
ModuleBase::WARNING_QUIT("ReadInput", "nspin should be 1, 2 or 4.");
292292
}
293+
else if(para.input.nspin == 4 && !para.input.noncolin && !para.input.lspinorb)
294+
{
295+
ModuleBase::WARNING_QUIT("ReadInput", "nspin should be 4 only when noncolin or lspinorb is true.");
296+
}
293297
};
294298
this->add_item(item);
295299
}

0 commit comments

Comments
 (0)