ion-CSP 2.0.8__tar.gz → 2.1.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. ion_csp-2.1.2/.github/workflows/bump-version.yml +28 -0
  2. ion_csp-2.0.8/.github/workflows/python-package-conda.yml → ion_csp-2.1.2/.github/workflows/conda-env-build.yml +8 -11
  3. ion_csp-2.0.8/.github/workflows/python-publish.yml → ion_csp-2.1.2/.github/workflows/pypi-publish.yml +5 -3
  4. {ion_csp-2.0.8 → ion_csp-2.1.2}/.gitignore +5 -1
  5. {ion_csp-2.0.8 → ion_csp-2.1.2}/MANIFEST.in +1 -0
  6. {ion_csp-2.0.8 → ion_csp-2.1.2}/PKG-INFO +15 -11
  7. {ion_csp-2.0.8 → ion_csp-2.1.2}/README.md +12 -8
  8. ion_csp-2.1.2/config/complete_config.yaml +38 -0
  9. ion_csp-2.1.2/config/simple_config.yaml +21 -0
  10. ion_csp-2.1.2/config/usage.md +11 -0
  11. {ion_csp-2.0.8 → ion_csp-2.1.2}/docs/example_usage_CSP.py +1 -0
  12. {ion_csp-2.0.8 → ion_csp-2.1.2}/environment.yml +1 -1
  13. ion_csp-2.1.2/examples/example_1/config.yaml +35 -0
  14. ion_csp-2.1.2/examples/example_1/ions.csv +8 -0
  15. ion_csp-2.1.2/examples/server/example_local_machine.yaml +13 -0
  16. ion_csp-2.1.2/examples/server/example_local_resources.yaml +11 -0
  17. ion_csp-2.1.2/examples/server/example_remote_machine.yaml +28 -0
  18. ion_csp-2.1.2/examples/server/example_remote_resources.yaml +21 -0
  19. {ion_csp-2.0.8 → ion_csp-2.1.2}/param/INCAR_0 +1 -1
  20. {ion_csp-2.0.8 → ion_csp-2.1.2}/param/INCAR_1 +1 -1
  21. {ion_csp-2.0.8 → ion_csp-2.1.2}/param/INCAR_2 +1 -1
  22. ion_csp-2.1.2/param/INCAR_3 +19 -0
  23. ion_csp-2.1.2/param/sub_final.sh +91 -0
  24. ion_csp-2.1.2/param/sub_supple.sh +56 -0
  25. {ion_csp-2.0.8 → ion_csp-2.1.2}/pyproject.toml +8 -5
  26. ion_csp-2.0.8/scripts/main_usage.sh → ion_csp-2.1.2/scripts/CLI.sh +2 -2
  27. ion_csp-2.1.2/scripts/main_CSP.sh +4 -0
  28. ion_csp-2.1.2/scripts/main_EE.sh +4 -0
  29. ion_csp-2.1.2/setup.cfg +23 -0
  30. {ion_csp-2.0.8 → ion_csp-2.1.2}/setup.py +3 -2
  31. {ion_csp-2.0.8/src → ion_csp-2.1.2/src/ion_CSP}/__init__.py +2 -2
  32. {ion_csp-2.0.8 → ion_csp-2.1.2}/src/ion_CSP/read_mlp_density.py +2 -2
  33. {ion_csp-2.0.8 → ion_csp-2.1.2}/src/ion_CSP/task_manager.py +13 -2
  34. ion_csp-2.1.2/src/ion_CSP/vasp_processing.py +666 -0
  35. {ion_csp-2.0.8 → ion_csp-2.1.2}/src/ion_CSP.egg-info/PKG-INFO +15 -11
  36. {ion_csp-2.0.8 → ion_csp-2.1.2}/src/ion_CSP.egg-info/SOURCES.txt +27 -14
  37. {ion_csp-2.0.8 → ion_csp-2.1.2}/src/ion_CSP.egg-info/top_level.txt +1 -0
  38. {ion_csp-2.0.8/src/ion_CSP → ion_csp-2.1.2/src/run}/__init__.py +1 -1
  39. {ion_csp-2.0.8/src → ion_csp-2.1.2/src/run}/main_CSP.py +21 -3
  40. ion_csp-2.1.2/tests/__init__.py +0 -0
  41. ion_csp-2.0.8/.github/workflows/build.yml +0 -33
  42. ion_csp-2.0.8/scripts/main_CSP.sh +0 -4
  43. ion_csp-2.0.8/scripts/main_EE.sh +0 -4
  44. ion_csp-2.0.8/setup.cfg +0 -7
  45. ion_csp-2.0.8/src/ion_CSP/vasp_processing.py +0 -299
  46. {ion_csp-2.0.8 → ion_csp-2.1.2}/.dockerignore +0 -0
  47. {ion_csp-2.0.8 → ion_csp-2.1.2}/.vscode/settings.json +0 -0
  48. {ion_csp-2.0.8 → ion_csp-2.1.2}/CHANGELOG.md +0 -0
  49. {ion_csp-2.0.8 → ion_csp-2.1.2}/CODE_OF_CONDUCT.md +0 -0
  50. {ion_csp-2.0.8 → ion_csp-2.1.2}/CONTRIBUTING.md +0 -0
  51. {ion_csp-2.0.8 → ion_csp-2.1.2}/Dockerfile +0 -0
  52. {ion_csp-2.0.8 → ion_csp-2.1.2}/LICENSE +0 -0
  53. {ion_csp-2.0.8 → ion_csp-2.1.2}/SECURITY.md +0 -0
  54. {ion_csp-2.0.8 → ion_csp-2.1.2}/docs/example_usage_EE.py +0 -0
  55. {ion_csp-2.0.8 → ion_csp-2.1.2}/docs/index.md +0 -0
  56. {ion_csp-2.0.8 → ion_csp-2.1.2}/docs/usage.md +0 -0
  57. {ion_csp-2.0.8 → ion_csp-2.1.2}/examples/example_usage.py +0 -0
  58. {ion_csp-2.0.8 → ion_csp-2.1.2}/makefile +0 -0
  59. {ion_csp-2.0.8 → ion_csp-2.1.2}/model/model.pt +0 -0
  60. {ion_csp-2.0.8 → ion_csp-2.1.2}/model/options/README.md +0 -0
  61. {ion_csp-2.0.8 → ion_csp-2.1.2}/model/options/model.ckpt-4000000.pt +0 -0
  62. {ion_csp-2.0.8 → ion_csp-2.1.2}/param/POTCAR_C +0 -0
  63. {ion_csp-2.0.8 → ion_csp-2.1.2}/param/POTCAR_H +0 -0
  64. {ion_csp-2.0.8 → ion_csp-2.1.2}/param/POTCAR_N +0 -0
  65. {ion_csp-2.0.8 → ion_csp-2.1.2}/param/POTCAR_O +0 -0
  66. {ion_csp-2.0.8 → ion_csp-2.1.2}/param/g16_sub.sh +0 -0
  67. /ion_csp-2.0.8/param/sub.sh → /ion_csp-2.1.2/param/sub_ori.sh +0 -0
  68. {ion_csp-2.0.8 → ion_csp-2.1.2}/requirements.txt +0 -0
  69. /ion_csp-2.0.8/scripts/main_usage.py → /ion_csp-2.1.2/scripts/CLI.py +0 -0
  70. {ion_csp-2.0.8/tests → ion_csp-2.1.2/src}/__init__.py +0 -0
  71. {ion_csp-2.0.8 → ion_csp-2.1.2}/src/ion_CSP/__main__.py +0 -0
  72. {ion_csp-2.0.8 → ion_csp-2.1.2}/src/ion_CSP/convert_SMILES.py +0 -0
  73. {ion_csp-2.0.8 → ion_csp-2.1.2}/src/ion_CSP/empirical_estimate.py +0 -0
  74. {ion_csp-2.0.8 → ion_csp-2.1.2}/src/ion_CSP/gen_opt.py +0 -0
  75. {ion_csp-2.0.8 → ion_csp-2.1.2}/src/ion_CSP/identify_molecules.py +0 -0
  76. {ion_csp-2.0.8 → ion_csp-2.1.2}/src/ion_CSP/log_and_time.py +0 -0
  77. {ion_csp-2.0.8 → ion_csp-2.1.2}/src/ion_CSP/mlp_opt.py +0 -0
  78. {ion_csp-2.0.8 → ion_csp-2.1.2}/src/ion_CSP/steps_opt_monitor.sh +0 -0
  79. {ion_csp-2.0.8 → ion_csp-2.1.2}/src/ion_CSP/upload_download.py +0 -0
  80. {ion_csp-2.0.8 → ion_csp-2.1.2}/src/ion_CSP.egg-info/dependency_links.txt +0 -0
  81. {ion_csp-2.0.8 → ion_csp-2.1.2}/src/ion_CSP.egg-info/entry_points.txt +0 -0
  82. {ion_csp-2.0.8 → ion_csp-2.1.2}/src/ion_CSP.egg-info/requires.txt +0 -0
  83. {ion_csp-2.0.8/src → ion_csp-2.1.2/src/run}/main_EE.py +0 -0
  84. {ion_csp-2.0.8/src → ion_csp-2.1.2/src/run}/run_convert_SMILES.py +0 -0
  85. {ion_csp-2.0.8/src → ion_csp-2.1.2/src/run}/run_empirical_estimate.py +0 -0
  86. {ion_csp-2.0.8/src → ion_csp-2.1.2/src/run}/run_gen_opt.py +0 -0
  87. {ion_csp-2.0.8/src → ion_csp-2.1.2/src/run}/run_read_mlp_density.py +0 -0
  88. {ion_csp-2.0.8/src → ion_csp-2.1.2/src/run}/run_upload_download.py +0 -0
  89. {ion_csp-2.0.8/src → ion_csp-2.1.2/src/run}/run_vasp_processing.py +0 -0
  90. {ion_csp-2.0.8 → ion_csp-2.1.2}/tests/test1_task_manager1.py +0 -0
  91. {ion_csp-2.0.8 → ion_csp-2.1.2}/tests/test_task_manager.py +0 -0
  92. {ion_csp-2.0.8 → ion_csp-2.1.2}/uv.lock +0 -0
@@ -0,0 +1,28 @@
1
+ name: Bump Version
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ inputs:
6
+ version_type:
7
+ description: "Version Type"
8
+ required: true
9
+ default: "patch"
10
+ type: choice
11
+ options: ["patch", "minor", "major"]
12
+
13
+ jobs:
14
+ bump:
15
+ runs-on: ubuntu-latest
16
+ steps:
17
+ - uses: actions/checkout@v4
18
+ - uses: actions/setup-python@v5
19
+ with:
20
+ python-version: "3.11"
21
+ - name: Install bumpversion
22
+ run: pip install bumpversion
23
+ - name: Update version
24
+ run: |
25
+ bumpversion ${{ github.event.inputs.version_type }}
26
+ git config --global user.name "GitHub Actions"
27
+ git config --global user.email "actions@github.com"
28
+ git push --follow-tags
@@ -1,12 +1,15 @@
1
- name: Python Package using Conda
1
+ name: Conda Environment Build
2
2
 
3
- on: [push]
3
+ on: [push, pull_request]
4
4
 
5
5
  jobs:
6
6
  build-linux:
7
7
  runs-on: ubuntu-latest
8
8
  strategy:
9
9
  max-parallel: 5
10
+ permissions:
11
+ contents: read
12
+ pull-requests: write
10
13
 
11
14
  steps:
12
15
  - uses: actions/checkout@v4
@@ -34,14 +37,8 @@ jobs:
34
37
  - name: Build package
35
38
  run: |
36
39
  conda run --name ion-csp-env python -m build
37
-
38
- - name: Lint with flake8
39
- run: |
40
- conda run --name ion-csp-env conda install -y flake8
41
- flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
42
- flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
43
-
40
+ conda run --name ion-csp-env pip install -e .
41
+
44
42
  - name: Test with pytest
45
43
  run: |
46
- conda run --name ion-csp-env conda install -y pytest
47
- pytest
44
+ conda run --name ion-csp-env pytest
@@ -28,8 +28,7 @@ jobs:
28
28
 
29
29
  - name: Build release distributions
30
30
  env:
31
- TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
32
- TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
31
+ TWINE_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
33
32
  run: |
34
33
  # NOTE: put your own distribution build steps here.
35
34
  python -m pip install build
@@ -54,7 +53,7 @@ jobs:
54
53
  environment:
55
54
  name: pypi
56
55
  # OPTIONAL: uncomment and update to include your PyPI project URL in the deployment status:
57
- # url: https://pypi.org/p/YOURPROJECT
56
+ url: https://pypi.org/project/ion-CSP
58
57
  #
59
58
  # ALTERNATIVE: if your GitHub Release name is the PyPI project version string
60
59
  # ALTERNATIVE: exactly, uncomment the following line instead:
@@ -71,3 +70,6 @@ jobs:
71
70
  uses: pypa/gh-action-pypi-publish@release/v1
72
71
  with:
73
72
  packages-dir: dist/
73
+ repository-url: https://upload.pypi.org/legacy/
74
+ password: ${{ secrets.PYPI_API_TOKEN}}
75
+ skip-existing: true
@@ -15,7 +15,6 @@ __pycache__/
15
15
  *results*
16
16
  *test/
17
17
  *outputs/
18
- example_*/
19
18
  data/
20
19
  POSCAR_*
21
20
  ori_POSCAR_*
@@ -31,6 +30,11 @@ OUTCAR_*
31
30
  slurm-*.out
32
31
  server_config
33
32
  *.yaml
33
+ !simple_config.yaml
34
+ !complete_config.yaml
35
+ !examples/server/*
36
+ !examples/example_1/*
37
+ !examples/example_2/*
34
38
  model_ori.pt
35
39
  logs/*
36
40
  dist/*
@@ -1,2 +1,3 @@
1
1
  include README.md
2
2
  include LICENSE
3
+ include src/run/*.py
@@ -1,12 +1,12 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ion_CSP
3
- Version: 2.0.8
3
+ Version: 2.1.2
4
4
  Summary: Crystal Structure Design Software Based on Molecular/Ionic Configuration.
5
5
  Home-page: https://github.com/bagabaga007/ion_CSP
6
6
  Author: Ze Yang
7
7
  Author-email: Ze Yang <yangze1995007@163.com>
8
- License-Expression: MIT
9
- Keywords: ion_crystal, crystal_structure_prediction
8
+ License: MIT
9
+ Keywords: Ion_Crystal, Crystal_Structure_Prediction
10
10
  Classifier: Programming Language :: Python :: 3
11
11
  Classifier: Operating System :: OS Independent
12
12
  Requires-Python: >=3.11
@@ -27,10 +27,10 @@ Dynamic: home-page
27
27
  Dynamic: license-file
28
28
  Dynamic: requires-python
29
29
 
30
- # Crystal Structure Design Software V2.0
30
+ # Crystal Structure Design Software V2.1
31
31
 
32
32
  ## 项目概述
33
- 基于分子/离子构型的晶体结构设计软件通过结合经验公式、机器学习势函数微调、第一性原理分步优化和分子/离子识别技术,实现了从分子/离子构型出发的高效晶体结构筛选。该软件采用模块化设计,支持全流程自动化材料筛选,在保证预测精度的同时显著提升计算效率。
33
+ 基于分子/离子构型的晶体结构设计软件通过结合经验公式、机器学习势函数微调、第一性原理分步优化和分子/离子识别技术,实现了从分子/离子构型出发的高效晶体结构设计。该软件采用模块化设计,支持全流程自动化材料筛选,在保证预测精度的同时显著提升计算效率。
34
34
 
35
35
  ## 功能特性
36
36
  ### 核心功能
@@ -76,7 +76,9 @@ python -m venv venv
76
76
  source venv/bin/activate # Linux/Mac
77
77
 
78
78
  # 安装依赖
79
- pip install ion-csp
79
+ git clone https://github.com/Bagabaga007/ion_CSP.git
80
+ cd ion_CSP
81
+ pip install -e .
80
82
  ```
81
83
 
82
84
  ## 快速入门
@@ -127,15 +129,15 @@ graph TD
127
129
 
128
130
  ## 技术支持
129
131
  - **文档更新**:2025年5月
130
- - **最新版本**:v2.0.4
132
+ - **最新版本**:v2.1.0
131
133
  - **问题追踪**:https://github.com/bagabaga007/ion_CSP/issues
132
134
 
133
135
  ---
134
136
 
135
- # Crystal Structure Design Software V2.0
137
+ # Crystal Structure Design Software V2.1
136
138
 
137
139
  ## Project Overview
138
- This software enables efficient crystal structure screening from molecular/ion configurations by integrating empirical formulas, tuned machine learning potentials, stepwise first-principles optimization, and molecular/ion recognition techniques. The modular architecture ensures extensibility and maintainability while maintaining prediction accuracy.
140
+ This software enables efficient crystal structure design from molecular/ion configurations by integrating empirical formulas, tuned machine learning potentials, stepwise first-principles optimization, and molecular/ion recognition techniques. The modular architecture ensures extensibility and maintainability while maintaining prediction accuracy.
139
141
 
140
142
  ## Key Features
141
143
  ### Core Functionalities
@@ -181,7 +183,9 @@ python -m venv venv
181
183
  source venv/bin/activate # Linux/Mac
182
184
 
183
185
  # Install dependencies
184
- pip install ion-csp
186
+ git clone https://github.com/Bagabaga007/ion_CSP.git
187
+ cd ion_CSP
188
+ pip install -e .
185
189
  ```
186
190
 
187
191
  ## Quick Start
@@ -232,5 +236,5 @@ MIT License, see LICENSE file.
232
236
 
233
237
  ## Support
234
238
  - Documentation last updated: May 2025
235
- - Latest version: v2.0.4
239
+ - Latest version: v2.1.0
236
240
  - Issue tracker: https://github.com/bagabaga007/ion_CSP/issues
@@ -1,7 +1,7 @@
1
- # Crystal Structure Design Software V2.0
1
+ # Crystal Structure Design Software V2.1
2
2
 
3
3
  ## 项目概述
4
- 基于分子/离子构型的晶体结构设计软件通过结合经验公式、机器学习势函数微调、第一性原理分步优化和分子/离子识别技术,实现了从分子/离子构型出发的高效晶体结构筛选。该软件采用模块化设计,支持全流程自动化材料筛选,在保证预测精度的同时显著提升计算效率。
4
+ 基于分子/离子构型的晶体结构设计软件通过结合经验公式、机器学习势函数微调、第一性原理分步优化和分子/离子识别技术,实现了从分子/离子构型出发的高效晶体结构设计。该软件采用模块化设计,支持全流程自动化材料筛选,在保证预测精度的同时显著提升计算效率。
5
5
 
6
6
  ## 功能特性
7
7
  ### 核心功能
@@ -47,7 +47,9 @@ python -m venv venv
47
47
  source venv/bin/activate # Linux/Mac
48
48
 
49
49
  # 安装依赖
50
- pip install ion-csp
50
+ git clone https://github.com/Bagabaga007/ion_CSP.git
51
+ cd ion_CSP
52
+ pip install -e .
51
53
  ```
52
54
 
53
55
  ## 快速入门
@@ -98,15 +100,15 @@ graph TD
98
100
 
99
101
  ## 技术支持
100
102
  - **文档更新**:2025年5月
101
- - **最新版本**:v2.0.4
103
+ - **最新版本**:v2.1.0
102
104
  - **问题追踪**:https://github.com/bagabaga007/ion_CSP/issues
103
105
 
104
106
  ---
105
107
 
106
- # Crystal Structure Design Software V2.0
108
+ # Crystal Structure Design Software V2.1
107
109
 
108
110
  ## Project Overview
109
- This software enables efficient crystal structure screening from molecular/ion configurations by integrating empirical formulas, tuned machine learning potentials, stepwise first-principles optimization, and molecular/ion recognition techniques. The modular architecture ensures extensibility and maintainability while maintaining prediction accuracy.
111
+ This software enables efficient crystal structure design from molecular/ion configurations by integrating empirical formulas, tuned machine learning potentials, stepwise first-principles optimization, and molecular/ion recognition techniques. The modular architecture ensures extensibility and maintainability while maintaining prediction accuracy.
110
112
 
111
113
  ## Key Features
112
114
  ### Core Functionalities
@@ -152,7 +154,9 @@ python -m venv venv
152
154
  source venv/bin/activate # Linux/Mac
153
155
 
154
156
  # Install dependencies
155
- pip install ion-csp
157
+ git clone https://github.com/Bagabaga007/ion_CSP.git
158
+ cd ion_CSP
159
+ pip install -e .
156
160
  ```
157
161
 
158
162
  ## Quick Start
@@ -203,5 +207,5 @@ MIT License, see LICENSE file.
203
207
 
204
208
  ## Support
205
209
  - Documentation last updated: May 2025
206
- - Latest version: v2.0.4
210
+ - Latest version: v2.1.0
207
211
  - Issue tracker: https://github.com/bagabaga007/ion_CSP/issues
@@ -0,0 +1,38 @@
1
+ convert_SMILES:
2
+ csv_file: 'ions.csv' # 离子数据集csv文件名
3
+ screen: True # 是否要额外进行筛选
4
+ charge_screen: -1 # 对于电荷的筛选
5
+ group_screen: '[N+](=O)[O-]' # 对于官能团SMILES码的筛选
6
+ group_screen_invert: False # 对官能团的反选与否,默认为否
7
+ group_name: 'nitro' # 自定义官能团的名字
8
+ machine: '/your/cpu/machine/config/path' # 进行Gaussian优化计算的机器参数
9
+ resources: '/your/cpu/resources/config/path' # 进行Gaussian优化计算的资源参数
10
+ nodes: 2 # 占用CPU节点数
11
+
12
+ empirical_estimate:
13
+ folders: ['charge_-1', 'charge_2'] # 工作目录下存放各离子的文件夹名
14
+ ratios: [2, 1] # 要用于经验公式预测密度的离子配比
15
+ sort_by: 'density' # 对离子组合的排序依据,目前只有密度(density)与氮含量(nitrogen)
16
+ make_combo_dir: True # 是否根据密度排序生成对应组合文件夹(包含gjf文件)
17
+ target_dir: '../2_density_combos' # 生成组合文件夹的目标目录
18
+ num_combos: 50 # 要生成文件夹的组合个数
19
+ ion_numbers: [4, 2] # 在对应的文件夹中生成config.yaml中的gen_opt所需的参数
20
+ update: True # 默认每次运行都会更新组合文件夹
21
+
22
+ gen_opt:
23
+ num_per_group: 10 # 每个空间群要生成的晶体结构数量
24
+ space_groups_limit: 15 # 空间群搜索的限制
25
+ machine: '/your/gpu/machine/config/path' # 进行机器学习势优化计算的机器参数,建议GPU
26
+ resources: '/your/gpu/resources/config/path' # 进行机器学习势优化计算的资源参数
27
+ nodes: 1 # 占用GPU节点数
28
+
29
+ read_mlp_density:
30
+ n_screen: 2 # 筛选机器学习势优化后密度最大的n个CONTCAR与对应的OUTCAR
31
+ molecules_screen: True # 是否排除离子改变的晶体结构
32
+ detail_log: False # 是否额外生成详细的筛选日志文件
33
+
34
+ vasp_processing:
35
+ machine: '/your/cpu/machine/config/path' # 进行VASP分步优化计算的机器参数
36
+ resources: '/your/cpu/resources/config/path' # 进行VASP分步优化计算的资源参数
37
+ nodes: 2 # 占用CPU节点数
38
+ molecules_prior: True # 是否检查离子晶体结构中所有离子的结构
@@ -0,0 +1,21 @@
1
+ convert_SMILES:
2
+ csv_file: 'ions.csv' # 离子数据集csv文件名
3
+ machine: '/your/cpu/machine/config/path' # 进行Gaussian优化计算的机器参数
4
+ resources: '/your/cpu/resources/config/path' # 进行Gaussian优化计算的资源参数
5
+ nodes: 2 # 占用CPU节点数
6
+
7
+ empirical_estimate:
8
+ folders: ['charge_-1', 'charge_2'] # 工作目录下存放各离子的文件夹名
9
+ ratios: [2, 1] # 要用于经验公式预测密度的离子配比
10
+ sort_by: 'nitrogen' # 对离子组合的排序依据,目前只有密度(density)与氮含量(nitrogen)
11
+ ion_numbers: [4, 2] # 在对应的文件夹中生成config.yaml中的gen_opt所需的参数
12
+
13
+ gen_opt:
14
+ machine: '/your/gpu/machine/config/path' # 进行机器学习势优化计算的机器参数,建议GPU
15
+ resources: '/your/gpu/resources/config/path' # 进行机器学习势优化计算的资源参数
16
+ nodes: 1 # 占用GPU节点数
17
+
18
+ vasp_processing:
19
+ machine: '/your/cpu/machine/config/path' # 进行VASP分步优化计算的机器参数
20
+ resources: '/your/cpu/resources/config/path' # 进行VASP分步优化计算的资源参数
21
+ nodes: 2 # 占用CPU节点数
@@ -0,0 +1,11 @@
1
+ ## 模板配置文件使用
2
+
3
+ - 在项目根目录下的config文件夹中存放有complete_config.yaml与simple_config.yaml两个模板配置文件,分别为完整版的参数配置与最简的参数配置。
4
+
5
+ - 在实际使用时,根据自己的计算集群信息修改后,需要把文件名重命名为config.yaml再放到所需的工作路径下。
6
+
7
+ ## Template configuration file usage
8
+
9
+ - In the config folder under the root directory of the project, there are two template configuration files, complete_config.yaml and simple_config. yaml, which are the complete version of parameter configuration and the simplest parameter configuration, respectively.
10
+
11
+ - In practical use, after modifying the computing cluster information based on oneself, it is necessary to rename the file name to 'config.yaml' and place it in the desired working path.
@@ -22,6 +22,7 @@ DEFAULT_CONFIG = {
22
22
  "target_dir": "", # 默认目标目录
23
23
  "num_combos": 100, # 默认组合数量
24
24
  "ion_numbers": [], # 默认离子数量
25
+ "update": True, # 默认每次运行都会更新组合文件夹
25
26
  },
26
27
  "gen_opt": {
27
28
  "num_per_group": 500, # 每个空间群要生成的晶体结构数量
@@ -13,7 +13,7 @@ dependencies:
13
13
  - paramiko=3.5.1
14
14
  - pyxtal=1.0.4
15
15
  - phonopy=2.28.0
16
- - rdkit=2023.03.3
16
+ - rdkit=2024.03.3
17
17
  - pip:
18
18
  - torch==2.5.0
19
19
  - deepmd-kit==3.0.1
@@ -0,0 +1,35 @@
1
+ convert_SMILES:
2
+ csv_file: 'ions.csv' # 离子数据集csv文件名
3
+ screen: True # 是否要额外进行筛选
4
+ charge_screen: -1 # 对于电荷的筛选
5
+ group_screen: '[N+](=O)[O-]' # 对于官能团SMILES码的筛选
6
+ group_screen_invert: False # 对官能团的反选与否,默认为否
7
+ group_name: 'nitro' # 自定义官能团的名字
8
+ machine: '/workplace/yz/ion_CSP/server_config/JLU_184/JLU_184_machine.yaml' # 进行Gaussian优化计算的机器参数
9
+ resources: '/workplace/yz/ion_CSP/server_config/JLU_184/JLU_184_resources.yaml' # 进行Gaussian优化计算的资源参数
10
+ nodes: 2 # 占用CPU节点数
11
+
12
+ empirical_estimate:
13
+ folders: ['charge_2', 'charge_-1'] # 工作目录下存放各离子的文件夹名
14
+ ratios: [1, 2] # 要用于经验公式预测密度的离子配比
15
+ make_combo_dir: True # 是否根据密度排序生成对应组合文件夹(包含gjf文件)
16
+ num_combos: 20 # 要生成文件夹的组合个数
17
+ ion_numbers: [2, 4] # 各离子在晶体中的数量
18
+
19
+ gen_opt:
20
+ num_per_group: 10 # 每个空间群要生成的晶体结构数量
21
+ space_groups_limit: 15 # 空间群搜索的限制
22
+ machine: '/workplace/yz/ion_CSP/server_config/6001_local/6001_local_machine.yaml' # 进行机器学习势优化计算的机器参数,建议GPU
23
+ resources: '/workplace/yz/ion_CSP/server_config/6001_local/6001_local_resources.yaml' # 进行机器学习势优化计算的资源参数
24
+ nodes: 1 # 占用GPU节点数
25
+
26
+ read_mlp_density:
27
+ n_screen: 2 # 筛选机器学习势优化后密度最大的n个CONTCAR与对应的OUTCAR
28
+ molecules_screen: True # 是否排除离子改变的晶体结构
29
+ detail_log: False # 是否额外生成详细的筛选日志文件
30
+
31
+ vasp_processing:
32
+ machine: '/workplace/yz/ion_CSP/server_config/JLU_184/JLU_184_machine.yaml' # 进行VASP分步优化计算的机器参数
33
+ resources: '/workplace/yz/ion_CSP/server_config/JLU_184/JLU_184_resources.yaml' # 进行VASP分步优化计算的资源参数
34
+ nodes: 2 # 占用CPU节点数
35
+ molecules_prior: True # 是否检查离子晶体结构中所有离子的结构
@@ -0,0 +1,8 @@
1
+ SMILES,Refcode,Charge
2
+ [NH3+]CC(=O)NCC(=O)NCCCNC(=O)CNC(=O)C[NH3+],ACEGUL,2
3
+ [NH3+]CC(=O)NCC(=O)NCCCCNC(=O)CNC(=O)C[NH3+],ACEHAS,2
4
+ Nc1cc[nH]c(=O)[nH+]1,ACITEM,1
5
+ [NH3+]C1(C(=O)O)CCCC1,ACPABR,1
6
+ O=C([O-])C(O)C(O)C(=O)O,ACTART11,-1
7
+ COC(=O)c1nn[nH]c1[C-]([N+](=O)[O-])[N+](=O)[O-],AGIDOM,-1
8
+ O=C([O-])c1[nH]nnc1[C-]([N+](=O)[O-])[N+](=O)[O-],AGIDUS,-2
@@ -0,0 +1,13 @@
1
+ # (必须)批处理作业系统类型。选项:LSF、Bohrium、DistributedShell、JH_UniScheduler、Slurm、Fugaku、SGE、Torque、OpenAPI、PBS、Shell、SlurmJobArray
2
+ batch_type: "Shell"
3
+ # (必须)任务和相关文件所在的目录。通常是项目目录。
4
+ local_root: "./"
5
+ # (必须)在远程计算机上执行任务的目录,且必须是绝对路径。只有当上下文不是lazy-local时才需要。
6
+ remote_root: "/your/remote/workplace"
7
+ # (必须)用于远程机器的连接。可能的选择:LazyLocalContext、BohriumContext、OpenAPIContext、SSHContext、HDFS Context、LocalContext
8
+ context_type: "LocalContext"
9
+ # (必须)用于保持本地计算机的信息。
10
+ remote_profile:
11
+ # 是否使用符号链接替换副本。如果批处理系统上无法访问本地目录,则应关闭此选项。
12
+ symlink: false
13
+
@@ -0,0 +1,11 @@
1
+ # (必须)每个作业所需的节点数。
2
+ number_node: 1
3
+ # (必须)分配给每个作业的每个节点的CPU数量。
4
+ cpu_per_node: 6
5
+ # (必须)分配给每个作业的每个节点的GPU数量。
6
+ gpu_per_node: 1
7
+ # (必须)每个作业中的任务数。0表示无穷大。
8
+ group_size: 1
9
+ # (可选)批处理作业调度系统的队列名称。
10
+ queue_name: "local"
11
+
@@ -0,0 +1,28 @@
1
+ # (必须)批处理作业系统类型。选项:LSF、Bohrium、DistributedShell、JH_UniScheduler、Slurm、Fugaku、SGE、Torque、OpenAPI、PBS、Shell、SlurmJobArray
2
+ batch_type: "LSF"
3
+ # (必须)任务和相关文件所在的目录。通常是项目目录。
4
+ local_root: "./"
5
+ # (必须)在远程计算机上执行任务的目录,且必须是绝对路径。当上下文不是lazy-local时就需要。
6
+ remote_root: "/your/remote/workplace"
7
+ # (必须)用于远程机器的连接。可能的选择:LazyLocalContext、BohriumContext、OpenAPIContext、SSHContext、HDFS Context、LocalContext
8
+ context_type: "SSHContext"
9
+ # 用于保持与远程计算机连接的信息。
10
+ remote_profile:
11
+ # (必须)ssh连接的主机名或ip。
12
+ hostname: "202.198.21.184"
13
+ # (必须)目标linux系统的用户名。
14
+ username: "your_username"
15
+ # (可选,新版本已弃用)linux系统的密码。建议改用SSH密钥以提高安全性。
16
+ password: "your_password"
17
+ # (可选,默认为22)ssh连接端口。
18
+ port: 22
19
+ # (可选,默认为True)是否启用在~/.ssh/中搜索可发现的私钥文件,如果使用密码登录则应设False。
20
+ look_for_keys: False
21
+ # (可选,默认为22)ssh连接使用的密钥文件名。如果保留为None,请在~/.ssh中查找密钥或使用密码登录。
22
+ key_filename: "~/.ssh/id_rsa"
23
+ # (可选,默认为10)ssh连接超时限制。
24
+ timeout: 10
25
+ # (可选,默认为None)ssh连接建立后执行的命令。
26
+ execute_command: "pwd"
27
+
28
+ # 更详细的参数说明文档: https://docs.deepmodeling.com/projects/dpdispatcher/en/latest/machine.html
@@ -0,0 +1,21 @@
1
+ # (必须)每个作业所需的节点数。
2
+ number_node: 1
3
+ # (必须)分配给每个作业的每个节点的CPU数量。
4
+ cpu_per_node: 56
5
+ # (必须)分配给每个作业的每个节点的GPU数量。
6
+ gpu_per_node: 0
7
+ # (必须)每个作业中的任务数。0表示无穷大。
8
+ group_size: 1
9
+ # (必须)批处理作业调度系统的队列名称。
10
+ queue_name: "normal"
11
+ # (可选)在执行命令之前要进行source命令的文件。以List[str]形式给出路径。
12
+ source_list: ["/data/env/inteloneapi2021"]
13
+ # (可选)提交作业前要导出的环境变量。以dict形式分别给出变量名与变量内容。
14
+ envs:
15
+ PATH: "/data/home/username/soft/vasp.6.3.0/bin:$PATH"
16
+ # (可选)提交作业前要加载到HPC系统上的模块。以List[str]形式给出路径后,执行module load命令。
17
+ module_list: ["intel/parallelstudio/2021.1.1"]
18
+ # (可选)额外的命令行传递给作业提交脚本头部,建议添加-J参数用于指定JOB_NAME
19
+ # SLURM队列系统中通过 #SBATCH -J your_job_name 指定,LSF队列系统中通过#BSUB -J your_job_name 指定
20
+ custom_flags: ["#BSUB -J Stepwise_VASP"]
21
+ # 更详细的参数说明文档:https://docs.deepmodeling.com/projects/dpdispatcher/en/latest/resources.html
@@ -1,4 +1,4 @@
1
- SYSTEM = VAG
1
+ SYSTEM = ION_CSP
2
2
  NPAR = 4
3
3
  PREC = Accurate
4
4
  ENCUT = 800
@@ -1,4 +1,4 @@
1
- SYSTEM = VAG
1
+ SYSTEM = ION_CSP
2
2
  NPAR = 4
3
3
  PREC = Accurate
4
4
  ENCUT = 600 # 800
@@ -1,4 +1,4 @@
1
- SYSTEM = VAG
1
+ SYSTEM = ION_CSP
2
2
  NPAR = 4
3
3
  PREC = Accurate
4
4
  ENCUT = 800
@@ -0,0 +1,19 @@
1
+ SYSTEM = ION_CSP
2
+ NPAR = 4
3
+ PREC = Accurate
4
+ ENCUT = 800
5
+ EDIFF = 1e-6
6
+ IBRION = 2
7
+ ISIF = 3
8
+ NSW = 300 # 200
9
+ ISMEAR = 0 ; SIGMA = 0.05
10
+ POTIM = 0.05
11
+ #No writing charge density and wavefunction
12
+ LCHARG = FALSE
13
+ LWAVE = FALSE
14
+ #Target Pressure
15
+ #PSTRESS = 100
16
+ #Finer optimization
17
+ EDIFFG = -0.02
18
+ KSPACING = 0.5
19
+ IVDW = 12
@@ -0,0 +1,91 @@
1
+ #!/bin/bash
2
+
3
+ # 设置变量
4
+ BASE_DIR="./"
5
+ INCAR_1="INCAR_1"
6
+ INCAR_2="INCAR_2"
7
+ INCAR_3="INCAR_3"
8
+ POTCAR_H="POTCAR_H"
9
+ POTCAR_C="POTCAR_C"
10
+ POTCAR_N="POTCAR_N"
11
+ POTCAR_O="POTCAR_O"
12
+
13
+ # 检查必要文件是否存在
14
+ if [[ ! -f "$INCAR_1" || ! -f "$INCAR_2" || ! -f "$INCAR_3" || ! -f "$POTCAR_H" || ! -f "$POTCAR_C" || ! -f "$POTCAR_N" || ! -f "$POTCAR_O" ]]; then
15
+ echo "Necessary files are missing, please check the path."
16
+ exit 1
17
+ fi
18
+
19
+ # 创建 POTCAR 文件
20
+ create_potcar_from_poscar() {
21
+ poscar_file="$1"
22
+ output_file="POTCAR"
23
+ > "$output_file" # 清空文件
24
+
25
+ # 读取 POSCAR 文件的第六行(元素行)
26
+ read -r element_line < <(sed -n '6p' "$poscar_file")
27
+
28
+ # 将元素转换为数组
29
+ IFS=' ' read -r -a elements <<< "$element_line"
30
+
31
+ # 根据元素拼接 POTCAR
32
+ for element in "${elements[@]}"; do
33
+ case $element in
34
+ H) cat "$POTCAR_H" >> "$output_file" ;;
35
+ C) cat "$POTCAR_C" >> "$output_file" ;;
36
+ N) cat "$POTCAR_N" >> "$output_file" ;;
37
+ O) cat "$POTCAR_O" >> "$output_file" ;;
38
+ *) echo "Warning: POTCAR for element $element not found." ;;
39
+ esac
40
+ done
41
+ }
42
+
43
+ # 提交第一步优化任务
44
+ for contcar in ${BASE_DIR}/CONTCAR_*; do
45
+ if [[ $contcar =~ CONTCAR_(.*) ]]; then
46
+ sample=${BASH_REMATCH[1]}
47
+ sample_dir="${BASE_DIR}/${sample}"
48
+ mkdir -p "$sample_dir"
49
+ cp "$contcar" "${sample_dir}/POSCAR"
50
+ cp "$INCAR_1" "${sample_dir}/INCAR"
51
+ create_potcar_from_poscar "${sample_dir}/POSCAR" # 根据 POSCAR 创建 POTCAR
52
+ mv "POTCAR" "${sample_dir}/" # 使用自动生成的 POTCAR
53
+ original_dir=$(pwd) # 保存当前目录
54
+ cd "${sample_dir}" && mpirun -n ${DPDISPATCHER_CPU_PER_NODE} vasp_std > vasp.log 2>&1
55
+ cd $original_dir # 返回原始工作目录
56
+ fi
57
+ done
58
+
59
+ echo "All first step tasks have been submitted."
60
+
61
+ # 提交第二步优化任务
62
+ for sample in $(ls ${BASE_DIR}); do
63
+ if [ -f "${BASE_DIR}/${sample}/CONTCAR" ]; then
64
+ sample_dir="${BASE_DIR}/${sample}"
65
+ mkdir -p "${sample_dir}/fine"
66
+ cp "${sample_dir}/CONTCAR" "${sample_dir}/fine/POSCAR"
67
+ cp "$INCAR_2" "${sample_dir}/fine/INCAR"
68
+ cp "${sample_dir}/POTCAR" "${sample_dir}/fine/POTCAR"
69
+ original_dir=$(pwd) # 保存当前目录
70
+ cd "${sample_dir}/fine" && mpirun -n ${DPDISPATCHER_CPU_PER_NODE} vasp_std > vasp.log 2>&1
71
+ cd $original_dir # 返回原始工作目录
72
+ fi
73
+ done
74
+
75
+ echo "All second step tasks have been submitted."
76
+
77
+ # 提交第三步优化任务
78
+ for sample in $(ls ${BASE_DIR}); do
79
+ if [ -f "${BASE_DIR}/${sample}/fine/CONTCAR" ]; then
80
+ sample_dir="${BASE_DIR}/${sample}"
81
+ mkdir -p "${sample_dir}/fine/final"
82
+ cp "${sample_dir}/fine/CONTCAR" "${sample_dir}/fine/final/POSCAR"
83
+ cp "$INCAR_3" "${sample_dir}/fine/final/INCAR"
84
+ cp "${sample_dir}/fine/POTCAR" "${sample_dir}/fine/final/POTCAR"
85
+ original_dir=$(pwd) # 保存当前目录
86
+ cd "${sample_dir}/fine/final" && mpirun -n ${DPDISPATCHER_CPU_PER_NODE} vasp_std > vasp.log 2>&1
87
+ cd $original_dir # 返回原始工作目录
88
+ fi
89
+ done
90
+
91
+ echo "All third step tasks have been submitted."