Commit 71f3524
Update out_chg 2 and out_pot 3, and elf (#7379)
* update 18_md examples
* update out_chg 2
* update out_pot function
* feat(module_io): 优化初始电荷密度/势能输出,支持 out_freq_ion 控制和动态文件名
- 添加 gen_ini_filename() 辅助函数,统一生成初始电荷密度/势能文件名
- out_freq_ion=0 时输出单个固定名称文件(不带 g#)
- out_freq_ion>0 时每个几何步输出独立文件(带 g#)
- 更新文档,说明两种模式的区别
修改文件:
- docs/advanced/output_files/output-specification.md
- source/source_io/module_chgpot/write_init.cpp
- source/source_io/module_chgpot/write_init.h
- source/source_io/module_parameter/read_input_item_output.cpp
* fix(module_io): 修正 out_freq_ion=0 时初始电荷密度/势能输出逻辑
- out_freq_ion=0 时,每个几何步都输出(覆盖同一个文件)
- out_freq_ion>0 时,只在 istep 是 out_freq_ion 倍数时输出
- 更新所有相关文档和注释
修改文件:
- docs/advanced/output_files/output-specification.md
- source/source_io/module_chgpot/write_init.cpp
- source/source_io/module_chgpot/write_init.h
- source/source_io/module_parameter/read_input_item_output.cpp
* fix a bug about out_pot
* fix bugs
* update
* update ELF and add openmp parallel
* update elf
* update elf
* update example reference data
* enable elf for rt-tddft, but results are wrong
* fix elf test
* fix elf test in 03_NAO_multik
* fix output of write_elf
* fix bug
* update potential file, fix bug
* fix elf test in ofdft
* fix: Move write_pot_init to ElecState::init_scf for correct timing
The write_pot_init was being called in ESolver_FP::before_scf before the
effective potential was computed. This caused pot_ini.cube to contain:
- All zeros for calculation=scf / first ionic step (istep=0)
- Converged potential from previous ionic step for relax/md with istep>0
The fix moves write_pot_init to ElecState::init_scf, which is called after
pot->init_pot(charge) computes the effective potential from the initial
charge density. This ensures pot_ini.cube correctly contains the effective
potential corresponding to the initial charge density.
Changes:
- Modified ElecState::init_scf signature to accept istep, out_dir, inp parameters
- Added write_pot_init call after pot->init_pot() in init_scf
- Updated pw::setup_pot to pass through the new parameters
- Updated all callers (LCAO and PW) to provide the new parameters
- Removed the premature write_pot_init call from ESolver_FP::before_scf
* Remove unused parameters from ElecState::init_scf
- Removed unused 'symm' and 'wfcpw' parameters from init_scf function
- Updated all call sites to match the new signature
- Simplified function interface by removing parameters not used in implementation
* Fix missing io_basic library link in elecstate tests
- Added io_basic library dependency to MODULE_ESTATE_elecstate_base test
- Added io_basic library dependency to MODULE_ESTATE_elecstate_pw test
- Fixes undefined reference to ModuleIO::write_pot_init
* update init_scf
* fix
* fix bug
* remove dependence of parameter for write_cube.cpp
* fix bugs
* fix bug
* add a new file init_scf
* update estate tests
* delete useless inclusion
---------
Co-authored-by: abacus_fixer <mohanchen@pku.eud.cn>1 parent 29d37f4 commit 71f3524
57 files changed
Lines changed: 565 additions & 306 deletions
File tree
- docs/advanced/output_files
- examples
- 18_md
- 01_LCAO_NVE_Si8
- 01_lcao_gamma_Si8
- 02_LCAO_NVT_Si8
- 22_rt-tddft/02_H2_velocity_gauge
- source
- source_esolver
- source_estate
- test
- source_hsolver/test
- source_io
- module_chgpot
- module_ctrl
- module_dos
- module_elf
- module_output
- module_parameter
- module_wf
- test_serial
- source_pw/module_pwdft
- tests
- 01_PW
- nscf_out_pot
- scf_out_elf
- 03_NAO_multik
- nscf_out_pot1
- scf_out_chg_pot1
- scf_out_elf
- 07_OFDFT/24_OF_out_elf
- integrate/tools
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
52 | 53 | | |
53 | 54 | | |
54 | 55 | | |
55 | 56 | | |
56 | 57 | | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
57 | 64 | | |
58 | 65 | | |
59 | 66 | | |
| |||
62 | 69 | | |
63 | 70 | | |
64 | 71 | | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
65 | 80 | | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
66 | 88 | | |
67 | 89 | | |
68 | 90 | | |
| |||
79 | 101 | | |
80 | 102 | | |
81 | 103 | | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
82 | 114 | | |
83 | 115 | | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
84 | 123 | | |
85 | 124 | | |
86 | 125 | | |
| |||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
0 commit comments