Commit b5572e4
abacus_fixer
DFT+U I/O: Rename onsite.dm to dm_onsite.txt and adjust file paths
This commit renames the DFT+U occupation matrix files and adjusts their read/write paths:
1. File name changes:
- onsite.dm → dm_onsite.txt (output from DFT+U calculations)
- initial_onsite.dm → dm_onsite_ini.txt (user-provided initial occupation matrix)
2. Path adjustments:
- dm_onsite.txt: Both written and read from global_out_dir (OUT.prefix)
- Previously read from global_readin_dir
- This ensures the file is always in the output directory
- dm_onsite_ini.txt: Read from global_readin_dir (set via read_file_dir parameter)
- Previously read from global_out_dir
- This allows users to place initial files in any directory
3. Code changes:
- dftu_io.cpp: Updated output filename and error messages
- dftu.cpp: Updated read paths for both files
- dftu_lcao.h and module_operator_lcao/dftu_lcao.cpp: Updated comments
4. Documentation updates:
- read_input_item_exx_dftu.cpp: Updated omc parameter description
- parameters.yaml: Updated omc parameter description
- input-main.md: Updated omc parameter description
- band.md and dos.md: Updated file references
- tests/17_DS_DFTU/README.md: Updated test documentation
- tests/17_DS_DFTU/run_scf_nscf.sh: Updated copy logic for dm_onsite.txt
5. Backward compatibility:
- The new format with labels Atom=, L=, ORBITAL=, spin= was already in the writer
- This commit updates the reader to parse the new format
- 1-based indices in output are converted to 0-based when reading
Files modified:
- source/source_lcao/module_dftu/dftu_io.cpp
- source/source_lcao/module_dftu/dftu.cpp
- source/source_lcao/dftu_lcao.h
- source/source_lcao/module_operator_lcao/dftu_lcao.cpp
- source/source_io/module_parameter/read_input_item_exx_dftu.cpp
- docs/parameters.yaml
- docs/advanced/input_files/input-main.md
- docs/advanced/elec_properties/band.md
- docs/advanced/elec_properties/dos.md
- tests/17_DS_DFTU/README.md
- tests/17_DS_DFTU/run_scf_nscf.sh1 parent 1f031bf commit b5572e4
11 files changed
Lines changed: 38 additions & 34 deletions
File tree
- docs
- advanced
- elec_properties
- input_files
- source
- source_io/module_parameter
- source_lcao
- module_dftu
- module_operator_lcao
- tests/17_DS_DFTU
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3736 | 3736 | | |
3737 | 3737 | | |
3738 | 3738 | | |
3739 | | - | |
3740 | | - | |
| 3739 | + | |
| 3740 | + | |
3741 | 3741 | | |
3742 | | - | |
| 3742 | + | |
3743 | 3743 | | |
3744 | 3744 | | |
3745 | 3745 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4387 | 4387 | | |
4388 | 4388 | | |
4389 | 4389 | | |
4390 | | - | |
4391 | | - | |
| 4390 | + | |
| 4391 | + | |
4392 | 4392 | | |
4393 | | - | |
| 4393 | + | |
4394 | 4394 | | |
4395 | 4395 | | |
4396 | 4396 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
834 | 834 | | |
835 | 835 | | |
836 | 836 | | |
837 | | - | |
838 | | - | |
| 837 | + | |
| 838 | + | |
839 | 839 | | |
840 | | - | |
| 840 | + | |
841 | 841 | | |
842 | 842 | | |
843 | 843 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
237 | 237 | | |
238 | 238 | | |
239 | 239 | | |
240 | | - | |
| 240 | + | |
241 | 241 | | |
242 | 242 | | |
243 | 243 | | |
| |||
251 | 251 | | |
252 | 252 | | |
253 | 253 | | |
254 | | - | |
| 254 | + | |
255 | 255 | | |
256 | 256 | | |
257 | 257 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
| 62 | + | |
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
| 66 | + | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
| 69 | + | |
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| |||
257 | 257 | | |
258 | 258 | | |
259 | 259 | | |
260 | | - | |
| 260 | + | |
261 | 261 | | |
262 | 262 | | |
263 | 263 | | |
264 | 264 | | |
265 | 265 | | |
266 | | - | |
| 266 | + | |
267 | 267 | | |
268 | 268 | | |
269 | | - | |
| 269 | + | |
270 | 270 | | |
271 | 271 | | |
272 | 272 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
190 | 190 | | |
191 | 191 | | |
192 | 192 | | |
193 | | - | |
| 193 | + | |
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
| |||
334 | 334 | | |
335 | 335 | | |
336 | 336 | | |
337 | | - | |
338 | | - | |
| 337 | + | |
| 338 | + | |
339 | 339 | | |
340 | 340 | | |
341 | 341 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
178 | | - | |
| 178 | + | |
179 | 179 | | |
180 | | - | |
| 180 | + | |
181 | 181 | | |
182 | 182 | | |
183 | 183 | | |
| |||
0 commit comments