Closed kirk0830 closed 3 weeks ago
This issue results from the following code snippet:
The current behavior is that "two_fermi" will be set to true whenever nupdown is provided, regardless of nspin. This becomes problematic when nspin = 1, as this issue reports. "two_fermi" should be set to false in this case, and an extra check should be performed to prevent a non-zero nupdown when nspin == 1.
Describe the bug
Try the following example:
Although it is unreasonable to set
nupdown
fornspin 1
case, this should not cause any bug, instead, ABACUS should quit with information. Plus,nspin 1
equivalent withnupdown 0
, but the calculation indeed cannot proceed for more than one ionic step:Expected behavior
No response
To Reproduce
No response
Environment
No response
Additional Context
No response
Task list for Issue attackers (only for developers)