Commit d4efc84
Reorganize the tools folder (deepmodeling#7470)
* Refactor: Restructure tools/ directory for clarity and fix include analysis script
This commit consolidates three previous commits (#1, #2, deepmodeling#3) into a single
comprehensive refactor of the tools/ directory, addressing both
organizational structure and a path-related bug in the code analysis script.
1. tools/ directory reorganization
- Group all numerical atomic orbital (NAO) generation tools under
01_NAO_generation/, including:
* SIAB/ (Simulated Annealing method in C++)
* pytorch/ and pytorch_dpsi/ (PyTorch gradient methods)
* pytorch_gradient_source/ (original PyTorch implementation)
* lcao_bash/ and abfs_bash/ (bash-based orbital generators)
* qo/ (quasiatomic orbital generation)
* Generate_Orbital_AllInOne.sh (main entry script)
* examples/ (example input files)
- Move all post-processing and visualization tools under
02_postprocessing/:
* rt-tddft-tools/, stm/, average_pot/, selective_dynamics/, plot-tools/
- Place source code analysis tools under 03_code_analysis/
- Rename windows/ to 04_windows_installation/ for consistency
- Use numerical prefixes (01_, 02_, 03_, 04_) to define a clear order
- Use git mv to preserve file history throughout the refactor
2. New tools/README.md
- Add a comprehensive README with directory tree, quick start guide
and tool descriptions
3. Fix generate_include_analysis.py path bug
- The script computed repo_root using os.path.dirname(script_dir),
assuming the script lived in tools/. After moving to
tools/03_code_analysis/, this resolved to tools/ instead of the
repository root, causing os.walk to find no source files.
- Update to os.path.dirname(os.path.dirname(script_dir)) to correctly
resolve the repository root from the new script location.
Combined previous commits:
6e3b7954c add code analysis python file
546d7cd76 update tools
92094b81d update
* Fix: Update path references in docs and source code after tools/ directory restructuring
After the tools/ directory reorganization, several path references in documentation
and source code were still pointing to the old directory structure. This commit
updates all hardcoded paths to match the new organization:
1. docs/advanced/windows_installer.md
- tools/windows/ → tools/04_windows_installation/ (3 occurrences)
2. docs/advanced/input_files/input-main.md
- tools/average_pot/aveElecStatPot.py → tools/02_postprocessing/average_pot/aveElecStatPot.py
3. docs/parameters.yaml
- tools/average_pot/aveElecStatPot.py → tools/02_postprocessing/average_pot/aveElecStatPot.py
4. source/source_io/module_qo/to_qo_kernel.cpp
- /tools/qo/postprocess.py → /tools/01_NAO_generation/qo/postprocess.py
5. source/source_basis/module_nao/atomic_radials.cpp
- Update SIAB/PyTorchGradient paths to 01_NAO_generation/pytorch and 01_NAO_generation/SIAB
6. source/source_io/module_parameter/read_input_item_output.cpp
- tools/average_pot/aveElecStatPot.py → tools/02_postprocessing/average_pot/aveElecStatPot.py
* add a threshold in 17_DS_DFTU/01_LCAO_SPIN_S2_Z
---------
Co-authored-by: abacus_fixer <mohanchen@pku.eud.cn>
Co-authored-by: Xiaoyang Zhang <tsfxwbbzxy@163.com>1 parent 5517a58 commit d4efc84
266 files changed
Lines changed: 294 additions & 108 deletions
File tree
- docs
- advanced
- input_files
- source
- source_basis/module_nao
- source_io
- module_parameter
- module_qo
- tests/17_DS_DFTU/01_LCAO_SPIN_S2_Z
- tools
- 01_NAO_generation
- SIAB
- src_parallel
- src_pw
- src_spillage
- src_tools
- src_unittest/src_tools
- tests_p
- tests_s
- abfs_bash
- examples
- example1_Si_SA
- example2_Si_PTG
- example3_Si_PTG_dpsi
- example_N
- example_opt_abfs_bash
- example_opt_lcao_bash
- opt_orb
- lcao_bash
- pytorch_dpsi
- IO
- pytorch_gradient_source
- IO
- pytorch
- IO
- qo
- examples
- reference
- band
- scf
- 02_postprocessing
- average_pot
- plot-tools
- abacus_plot
- examples/Si
- PBAND1_FIG/atom_index-1
- rt-tddft-tools
- examples
- Absorpation-N2
- ground-state-projection-Si
- selective_dynamics
- stm
- 03_code_analysis
- 04_windows_installation
- SIAB
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 | |
|---|---|---|---|
| |||
2867 | 2867 | | |
2868 | 2868 | | |
2869 | 2869 | | |
2870 | | - | |
| 2870 | + | |
2871 | 2871 | | |
2872 | 2872 | | |
2873 | 2873 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
117 | | - | |
118 | | - | |
| 117 | + | |
| 118 | + | |
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
| |||
284 | 284 | | |
285 | 285 | | |
286 | 286 | | |
287 | | - | |
288 | | - | |
| 287 | + | |
| 288 | + | |
289 | 289 | | |
290 | 290 | | |
291 | 291 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
132 | | - | |
| 132 | + | |
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
414 | 414 | | |
415 | 415 | | |
416 | 416 | | |
417 | | - | |
| 417 | + | |
418 | 418 | | |
419 | 419 | | |
420 | 420 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
File renamed without changes.
File renamed without changes.
File renamed without changes.
0 commit comments