Commit ea86510
dyzheng
Fix(dftu-pw): correct Pauli-to-spin conversion signs and weight_eu for nspin=1
In cal_occ_pw():
- Swap the imaginary signs in the Pauli-to-spin conversion for nspin=4:
index[1] (spin down-up): -i*vu_tmp[2] -> +i*vu_tmp[2]
index[2] (spin up-down): +i*vu_tmp[2] -> -i*vu_tmp[2]
The DFT+U vu array convention requires opposite sign from deeq_nc.
- Fix weight_eu for nspin=1: 0.25 -> 1.0
nspin=1 has single occupancy, not the Pauli double-counting factor.
Verified with tests/17_DS_DFTU/08 and 09:
08: -6792.33351671617 (ref -6792.33351670950, diff 6.7e-9 eV)
09: -6364.26587638707 (ref -6364.26587639017, diff 3.1e-9 eV)1 parent bb2cb4b commit ea86510
1 file changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
247 | 247 | | |
248 | 248 | | |
249 | 249 | | |
250 | | - | |
| 250 | + | |
251 | 251 | | |
252 | 252 | | |
253 | 253 | | |
| |||
309 | 309 | | |
310 | 310 | | |
311 | 311 | | |
312 | | - | |
313 | | - | |
| 312 | + | |
| 313 | + | |
314 | 314 | | |
315 | 315 | | |
316 | 316 | | |
| |||
0 commit comments