Commit fde7e06
Fix(dftu): write dm_onsite.txt format matching read_occup_m parser (deepmodeling#7828)
write_occup_m emits tokens like "Atom=1" (no space after '='), but
read_occup_m reads with >> and strcmp against "Atom=". The mismatch
causes NSCF runs reading dm_onsite.txt to fail with
"WRONG IN READING LOCAL OCCUPATION NUMBER MATRIX FROM Plus_U FILE".
Add a space after '=' for Atom, L, ORBITAL, and spin tokens so the
written format matches what read_occup_m expects. Verified with the
examples/19_dftu/01_lcao_NiO DFT+U case: SCF converges and the
subsequent NSCF step completes successfully.
Co-authored-by: dyzheng <zhengdy@bjaisi.com>1 parent 4cf51c6 commit fde7e06
1 file changed
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | | - | |
129 | | - | |
130 | | - | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
| |||
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
159 | | - | |
| 159 | + | |
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
| |||
0 commit comments