ion-CSP 2.0.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 (68) hide show
  1. ion_csp-2.0.2/.dockerignore +7 -0
  2. ion_csp-2.0.2/.gitignore +35 -0
  3. ion_csp-2.0.2/.vscode/settings.json +3 -0
  4. ion_csp-2.0.2/CHANGELOG.md +18 -0
  5. ion_csp-2.0.2/CODE_OF_CONDUCT.md +38 -0
  6. ion_csp-2.0.2/CONTRIBUTING.md +0 -0
  7. ion_csp-2.0.2/Dockerfile +70 -0
  8. ion_csp-2.0.2/LICENSE +21 -0
  9. ion_csp-2.0.2/PKG-INFO +83 -0
  10. ion_csp-2.0.2/README.md +33 -0
  11. ion_csp-2.0.2/docs/example_usage_CSP.py +57 -0
  12. ion_csp-2.0.2/docs/example_usage_EE.py +58 -0
  13. ion_csp-2.0.2/docs/index.md +0 -0
  14. ion_csp-2.0.2/docs/usage.md +0 -0
  15. ion_csp-2.0.2/examples/example_usage.py +6 -0
  16. ion_csp-2.0.2/makefile +37 -0
  17. ion_csp-2.0.2/model/model.pt +0 -0
  18. ion_csp-2.0.2/model/options/README.md +5 -0
  19. ion_csp-2.0.2/model/options/model.ckpt-4000000.pt +0 -0
  20. ion_csp-2.0.2/param/INCAR_0 +16 -0
  21. ion_csp-2.0.2/param/INCAR_1 +19 -0
  22. ion_csp-2.0.2/param/INCAR_2 +19 -0
  23. ion_csp-2.0.2/param/POTCAR_C +2319 -0
  24. ion_csp-2.0.2/param/POTCAR_H +1563 -0
  25. ion_csp-2.0.2/param/POTCAR_N +2351 -0
  26. ion_csp-2.0.2/param/POTCAR_O +2487 -0
  27. ion_csp-2.0.2/param/g16_sub.sh +21 -0
  28. ion_csp-2.0.2/param/sub.sh +74 -0
  29. ion_csp-2.0.2/pyproject.toml +36 -0
  30. ion_csp-2.0.2/requirements.txt +9 -0
  31. ion_csp-2.0.2/scripts/main.sh +201 -0
  32. ion_csp-2.0.2/scripts/main_CSP.sh +4 -0
  33. ion_csp-2.0.2/scripts/main_EE.sh +4 -0
  34. ion_csp-2.0.2/scripts/main_usage.py +6 -0
  35. ion_csp-2.0.2/setup.cfg +32 -0
  36. ion_csp-2.0.2/setup.py +20 -0
  37. ion_csp-2.0.2/src/__init__.py +19 -0
  38. ion_csp-2.0.2/src/ion_CSP/__init__.py +8 -0
  39. ion_csp-2.0.2/src/ion_CSP/app.py +201 -0
  40. ion_csp-2.0.2/src/ion_CSP/convert_SMILES.py +291 -0
  41. ion_csp-2.0.2/src/ion_CSP/empirical_estimate.py +505 -0
  42. ion_csp-2.0.2/src/ion_CSP/gen_opt.py +378 -0
  43. ion_csp-2.0.2/src/ion_CSP/identify_molecules.py +88 -0
  44. ion_csp-2.0.2/src/ion_CSP/log_and_time.py +234 -0
  45. ion_csp-2.0.2/src/ion_CSP/mlp_opt.py +154 -0
  46. ion_csp-2.0.2/src/ion_CSP/read_mlp_density.py +144 -0
  47. ion_csp-2.0.2/src/ion_CSP/steps_opt_monitor.sh +110 -0
  48. ion_csp-2.0.2/src/ion_CSP/upload_download.py +487 -0
  49. ion_csp-2.0.2/src/ion_CSP/vasp_processing.py +299 -0
  50. ion_csp-2.0.2/src/ion_CSP.egg-info/PKG-INFO +83 -0
  51. ion_csp-2.0.2/src/ion_CSP.egg-info/SOURCES.txt +67 -0
  52. ion_csp-2.0.2/src/ion_CSP.egg-info/dependency_links.txt +1 -0
  53. ion_csp-2.0.2/src/ion_CSP.egg-info/entry_points.txt +2 -0
  54. ion_csp-2.0.2/src/ion_CSP.egg-info/requires.txt +9 -0
  55. ion_csp-2.0.2/src/ion_CSP.egg-info/top_level.txt +1 -0
  56. ion_csp-2.0.2/src/main_CSP.py +116 -0
  57. ion_csp-2.0.2/src/main_EE.py +133 -0
  58. ion_csp-2.0.2/src/run_convert_SMILES.py +63 -0
  59. ion_csp-2.0.2/src/run_empirical_estimate.py +69 -0
  60. ion_csp-2.0.2/src/run_gen_opt.py +66 -0
  61. ion_csp-2.0.2/src/run_read_mlp_density.py +43 -0
  62. ion_csp-2.0.2/src/run_upload_download.py +68 -0
  63. ion_csp-2.0.2/src/run_vasp_processing.py +43 -0
  64. ion_csp-2.0.2/tests/__init__.py +0 -0
  65. ion_csp-2.0.2/tests/example.txt +1 -0
  66. ion_csp-2.0.2/tests/test.py +23 -0
  67. ion_csp-2.0.2/tests/test_main.py +16 -0
  68. ion_csp-2.0.2/uv.lock +1933 -0
@@ -0,0 +1,7 @@
1
+ .git/
2
+ __pycache__/
3
+ *.pyc
4
+ .env
5
+ .venv/
6
+ Dockerfile
7
+ docker-compose*
@@ -0,0 +1,35 @@
1
+ # Python 虚拟环境
2
+ venv/
3
+ .env
4
+
5
+ # 编译文件
6
+ __pycache__/
7
+ *.pyc
8
+
9
+ # IDE 配置
10
+ .idea/
11
+ *.sublime-project
12
+ *.sublime-workspace
13
+
14
+ # 在程序运行过程中产生的结构文件等,与代码库无关
15
+ *results*
16
+ *test/
17
+ *outputs/
18
+ example_*/
19
+ data/
20
+ POSCAR_*
21
+ ori_POSCAR_*
22
+ CONTCAR_*
23
+ OUTCAR_*
24
+ *.gjf
25
+ *.chk
26
+ *.fchk
27
+ *.log
28
+ *.csv
29
+ *.json
30
+ *.zip
31
+ slurm-*.out
32
+ server_config
33
+ *.yaml
34
+ model_ori.pt
35
+ yz_opt/
@@ -0,0 +1,3 @@
1
+ {
2
+ "python.analysis.typeCheckingMode": "off"
3
+ }
@@ -0,0 +1,18 @@
1
+ # CHANGELOG
2
+
3
+ ## 1. Standardization
4
+ The entire Python project has been standardized, and a fully automated workflow from ion combination to high-precision crystal structure can be achieved through main_CSP.py, which only requires the initial input of the working path parameter.
5
+ ## 2. StatusLogger Class
6
+ By using the StatusLogger class, the workflow's step execution status is recorded in .log and .yaml files. With the detection of content of .yaml files, the next work step can be automatically executed based on the progress of each step.
7
+ ## 3. Default config paramters
8
+ Add default configuration parameters for each workflow step, and merge them with the user configuration parameters of the actual work path, and record them in the corresponding log file. Significantly reduced the number of parameters that users must provide, providing templates for both simple and complete config.yaml parameter files, as well as annotations for each parameter
9
+ ## 4. Remote VASP calculation handling
10
+ In the VASP optimization step, the initial self-made server connection module was abandoned, and a method for performing VASP step-by-step calculation and processing on CPU servers was adapted to the dpdispatcher package.
11
+ ## 5. YAML Support for machine and resources
12
+ For machines and resources, support for YAML file types has been added, with sufficient annotations added to facilitate users to fill in according to their own situation.
13
+ ## 6. Shell script logic optimization for VASP
14
+ The shell script logic for VASP step-by-step optimization has been adjusted as a whole, and the monitor mechanism has been eliminated. By adapting the tasks of the dpdispatcher package, more efficient operation has been achieved.
15
+ ## 7. Automated POTCAR generation
16
+ Fixed a bug where the universal POTCAR is not applicable to certain systems composed only of a few elements of C/H/O/N. Now, the generation of POTCAR is achieved by automatically concatenating the corresponding element POTCAR based on the element information of POSCAR.
17
+ ## 8. Bad Gaussian results handling
18
+ In the file processing section of Gaussian optimization, the ability to handle and summarize files that have failed optimization has been added.
@@ -0,0 +1,38 @@
1
+ # Code of Conduct
2
+
3
+ ## 1. Purpose
4
+ We are committed to creating an open, welcoming, and inclusive community. This Code of Conduct aims to provide a safe environment for all participants, fostering positive interactions and collaboration.
5
+
6
+ ## 2. Scope
7
+ This Code of Conduct applies to all participants, including but not limited to: contributors, maintainers, users, and anyone involved with the project.
8
+
9
+ ## 3. Expected Behavior
10
+ We encourage all participants to:
11
+
12
+ - **Respect Others**: Honor each person’s viewpoints, experiences, and backgrounds.
13
+ - **Communicate Kindly**: Engage in discussions in a friendly and polite manner, avoiding offensive or derogatory language.
14
+ - **Offer Help**: Be willing to assist others and share knowledge and experience.
15
+ - **Accept Constructive Feedback**: Be open to feedback from others and engage in discussions with an open mind.
16
+
17
+ ## 4. Unacceptable Behavior
18
+ The following behaviors are considered unacceptable:
19
+
20
+ - **Harassment**: This includes threats, malicious attacks, sexism, racism, hate speech, etc.
21
+ - **Discrimination**: Discrimination or bias based on gender, sexual orientation, race, religion, age, disability, etc.
22
+ - **Disruptive Behavior**: Intentionally disrupting others' work or the community environment.
23
+
24
+ ## 5. Reporting Mechanism
25
+ If you witness or experience unacceptable behavior, please report it to the community maintainers promptly. We take every report seriously and will take appropriate action.
26
+
27
+ ## 6. Consequences
28
+ For participants who violate the Code of Conduct, we may take the following actions:
29
+
30
+ - Warning
31
+ - Temporary suspension of participation
32
+ - Permanent ban from participation
33
+
34
+ ## 7. Applicability
35
+ This Code of Conduct applies to all activities related to the project, including online and offline interactions.
36
+
37
+ ## 8. License
38
+ This Code of Conduct follows the [Contributor Covenant](https://opensource.org/osd) and welcomes suggestions and improvements from anyone.
File without changes
@@ -0,0 +1,70 @@
1
+ # 第一阶段:构建环境
2
+ FROM python:3.11-slim AS builder
3
+
4
+ WORKDIR /app
5
+
6
+ # 安装系统依赖
7
+ RUN apt-get update && apt-get install -y \
8
+ gcc \
9
+ libffi-dev \
10
+ libssl-dev \
11
+ python3-dev \
12
+ --no-install-recommends && \
13
+ rm -rf /var/lib/apt/lists/*
14
+
15
+ # 创建虚拟环境并安装依赖
16
+ RUN python -m venv /opt/venv
17
+ ENV PATH="/opt/venv/bin:$PATH"
18
+
19
+ COPY requirements.txt .
20
+ RUN pip install --no-cache-dir --upgrade pip \
21
+ && pip install --no-cache-dir -r requirements.txt
22
+
23
+ # 第二阶段:运行环境
24
+ FROM python:3.11-slim
25
+
26
+ # 系统基础依赖
27
+ RUN apt-get update && apt-get install -y \
28
+ gcc \
29
+ g++ \
30
+ ca-certificates \
31
+ && rm -rf /var/lib/apt/lists/*
32
+
33
+ # 创建非root用户并设置权限
34
+ RUN useradd -ms /bin/bash appuser && \
35
+ mkdir -p /app/data /app/logs /app/scripts && \
36
+ chown -R appuser:appuser /app
37
+
38
+ # 设置工作目录
39
+ WORKDIR /app
40
+
41
+ # 先复制脚本并设置权限
42
+ COPY scripts/main.sh /app/scripts/main.sh
43
+ RUN chmod 755 /app/scripts/main.sh && \
44
+ chown appuser:appuser /app/scripts/main.sh
45
+
46
+ # 从构建阶段复制虚拟环境
47
+ COPY --from=builder /opt/venv /opt/venv
48
+ ENV PATH="/opt/venv/bin:$PATH"
49
+
50
+ # 复制其余项目文件(最后执行以避免覆盖)
51
+ COPY --chown=appuser:appuser . /app/
52
+
53
+ # 环境变量配置
54
+ ENV PYTHONUNBUFFERED=1 \
55
+ PYTHONPATH=/app \
56
+ LOG_DIR=/app/logs \
57
+ ENV=DOCKER \
58
+ WORKSPACE=/app/data
59
+
60
+ # 创建日志目录
61
+ RUN mkdir -p ${LOG_DIR} && chmod 755 ${LOG_DIR}
62
+
63
+ # 安装当前 Python 项目
64
+ RUN pip install -e /app/
65
+
66
+ # 切换用户为appuser
67
+ USER appuser
68
+
69
+ # 默认命令
70
+ CMD ["/bin/bash", "/app/scripts/main.sh"]
ion_csp-2.0.2/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) [2025] [ion_CSP]
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
ion_csp-2.0.2/PKG-INFO ADDED
@@ -0,0 +1,83 @@
1
+ Metadata-Version: 2.4
2
+ Name: ion_CSP
3
+ Version: 2.0.2
4
+ Summary: Crystal Structure Design Software Based on Molecular/Ionic Configuration.
5
+ Home-page: https://github.com/bagabaga007/ion_CSP
6
+ Author: yangze
7
+ Author-email: Ze Yang <yangze1995007@163.com>
8
+ License: MIT License
9
+
10
+ Copyright (c) [2025] [ion_CSP]
11
+
12
+ Permission is hereby granted, free of charge, to any person obtaining a copy
13
+ of this software and associated documentation files (the "Software"), to deal
14
+ in the Software without restriction, including without limitation the rights
15
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16
+ copies of the Software, and to permit persons to whom the Software is
17
+ furnished to do so, subject to the following conditions:
18
+
19
+ The above copyright notice and this permission notice shall be included in all
20
+ copies or substantial portions of the Software.
21
+
22
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28
+ SOFTWARE.
29
+
30
+ Keywords: ion_crystal, crystal_structure_prediction
31
+ Classifier: Programming Language :: Python :: 3
32
+ Classifier: License :: OSI Approved :: MIT License
33
+ Classifier: Operating System :: OS Independent
34
+ Requires-Python: >=3.11
35
+ Description-Content-Type: text/markdown
36
+ License-File: LICENSE
37
+ Requires-Dist: ase==3.23.0
38
+ Requires-Dist: deepmd-kit==3.0.1
39
+ Requires-Dist: torch==2.5.0
40
+ Requires-Dist: dpdispatcher==0.6.7
41
+ Requires-Dist: numpy==1.26.4
42
+ Requires-Dist: paramiko==3.5.1
43
+ Requires-Dist: pyxtal==1.0.4
44
+ Requires-Dist: phonopy==2.28.0
45
+ Requires-Dist: rdkit==2023.03.3
46
+ Dynamic: author
47
+ Dynamic: home-page
48
+ Dynamic: license-file
49
+ Dynamic: requires-python
50
+
51
+ # 基于分子/离子构型的晶体结构设计软件 V2.0
52
+
53
+ 基于分子/离子构型的晶体结构设计软件可以从分子/离子构型出发,结合经验公式、微调的机器学习势、第一性原理分步优化以及分子/离子识别方法,可以高效且有导向地筛选同时满足结构要求和性质要求的分子/离子晶体结构。该软件实现了分子/离子晶体结构的设计、构建、分析、筛选、评估全流程的自动化与模块化,保证了流程的扩展性和可重用性,能够在保证结果精度的同时,显著提高材料筛选效率。在整个流程中提供了多种检查功能以及结果可视化功能,方便用户使用。该软件使用Python语言编写,提供了完整的面向对象编程支持,在具有较高运行效率的同时使程序更易于理解、扩展和维护。
54
+
55
+ # 安装
56
+
57
+ 在项目根目录下使用以下命令安装依赖:
58
+
59
+ pip install -r requirements.txt
60
+
61
+ pip install -e .
62
+
63
+ chmod +x ./scripts/*.sh
64
+
65
+ # 使用示例
66
+
67
+ ### 使用交互式功能自主选择
68
+ ./scripts/main.sh
69
+
70
+ #### 使用经验评估(EE)模块从SMILES表格开始生成离子组合
71
+ ./scripts/main_EE.sh examples/example_1
72
+
73
+
74
+ #### 使用离子晶体结构预测(CSP)模块从离子组合开始生成晶体并筛选和优化
75
+ ./scripts/main_CSP.sh examples/example_2
76
+
77
+ # 功能
78
+ 使用经验评估(EE)模块从SMILES表格开始生成离子组合。
79
+
80
+ 使用离子晶体结构预测(CSP)模块从离子组合开始生成晶体并筛选和优化。
81
+
82
+ # 联系
83
+ 如有问题,请联系 yangze1995007@163.com。
@@ -0,0 +1,33 @@
1
+ # 基于分子/离子构型的晶体结构设计软件 V2.0
2
+
3
+ 基于分子/离子构型的晶体结构设计软件可以从分子/离子构型出发,结合经验公式、微调的机器学习势、第一性原理分步优化以及分子/离子识别方法,可以高效且有导向地筛选同时满足结构要求和性质要求的分子/离子晶体结构。该软件实现了分子/离子晶体结构的设计、构建、分析、筛选、评估全流程的自动化与模块化,保证了流程的扩展性和可重用性,能够在保证结果精度的同时,显著提高材料筛选效率。在整个流程中提供了多种检查功能以及结果可视化功能,方便用户使用。该软件使用Python语言编写,提供了完整的面向对象编程支持,在具有较高运行效率的同时使程序更易于理解、扩展和维护。
4
+
5
+ # 安装
6
+
7
+ 在项目根目录下使用以下命令安装依赖:
8
+
9
+ pip install -r requirements.txt
10
+
11
+ pip install -e .
12
+
13
+ chmod +x ./scripts/*.sh
14
+
15
+ # 使用示例
16
+
17
+ ### 使用交互式功能自主选择
18
+ ./scripts/main.sh
19
+
20
+ #### 使用经验评估(EE)模块从SMILES表格开始生成离子组合
21
+ ./scripts/main_EE.sh examples/example_1
22
+
23
+
24
+ #### 使用离子晶体结构预测(CSP)模块从离子组合开始生成晶体并筛选和优化
25
+ ./scripts/main_CSP.sh examples/example_2
26
+
27
+ # 功能
28
+ 使用经验评估(EE)模块从SMILES表格开始生成离子组合。
29
+
30
+ 使用离子晶体结构预测(CSP)模块从离子组合开始生成晶体并筛选和优化。
31
+
32
+ # 联系
33
+ 如有问题,请联系 yangze1995007@163.com。
@@ -0,0 +1,57 @@
1
+ import os
2
+ from src.main_CSP import main as main_CSP
3
+ from ion_CSP.log_and_time import merge_config, get_work_dir_and_config
4
+
5
+ # 默认配置
6
+ DEFAULT_CONFIG = {
7
+ "convert_SMILES": {
8
+ "csv_file": "", # 默认CSV文件名
9
+ "screen": False, # 默认不进行筛选
10
+ "charge_screen": "", # 默认电荷筛选为空
11
+ "group_screen": "", # 默认官能团筛选为空
12
+ "group_name": "", # 默认分组名称
13
+ "group_screen_invert": False, # 默认不进行反向筛选
14
+ "machine": "/your/cpu/machine/config/path", # 进行Gaussian优化计算的机器参数
15
+ "resources": "/your/cpu/resources/config/path", # 进行Gaussian优化计算的资源参数
16
+ },
17
+ "empirical_estimate": {
18
+ "folders": [], # 默认文件夹列表
19
+ "ratios": [], # 默认离子配比
20
+ "sort_by": "density", # 默认排序方式
21
+ "make_combo_dir": True, # 默认不创建组合目录
22
+ "target_dir": "", # 默认目标目录
23
+ "num_combos": 100, # 默认组合数量
24
+ "ion_numbers": [], # 默认离子数量
25
+ },
26
+ "gen_opt": {
27
+ "num_per_group": 500, # 每个空间群要生成的晶体结构数量
28
+ "space_groups_limit": 75, # 空间群搜索的限制
29
+ "machine": "/your/gpu/machine/config/path", # 进行机器学习势优化计算的机器参数,建议GPU
30
+ "resources": "/your/gpu/resources/config/path", # 进行机器学习势优化计算的资源参数
31
+ "nodes": 1, # 占用GPU节点数
32
+ },
33
+ "read_mlp_density": {
34
+ "n_screen": 10, # 筛选机器学习势优化后密度最大的n个CONTCAR与对应的OUTCAR
35
+ "molecules_screen": True, # 是否排除离子改变的晶体结构
36
+ "detail_log": False, # 是否额外生成详细的筛选日志文件
37
+ },
38
+ "vasp_processing": {
39
+ "machine": "/your/cpu/machine/config/path", # 进行VASP分步优化计算的机器参数
40
+ "resources": "/your/cpu/resources/config/path", # 进行VASP分步优化计算的资源参数
41
+ "nodes": 2, # 占用CPU节点数
42
+ "molecules_prior": True, # 是否检查离子晶体结构中所有离子的结构
43
+ },
44
+ }
45
+
46
+
47
+ if __name__ == "__main__":
48
+ # 获取工作目录和配置
49
+ work_dir, config = get_work_dir_and_config()
50
+ # 合并配置
51
+ modules = ["gen_opt", "read_mlp_density", "vasp_processing"]
52
+ for module in modules:
53
+ config[module] = merge_config(
54
+ default_config=DEFAULT_CONFIG, user_config=config, key=module
55
+ )
56
+ # 调用主函数
57
+ main_CSP(os.path.basename(__file__), work_dir, config)
@@ -0,0 +1,58 @@
1
+ import os
2
+ from src.main_EE import main as main_EE
3
+ from ion_CSP.log_and_time import merge_config, get_work_dir_and_config
4
+
5
+ # 默认配置
6
+ DEFAULT_CONFIG = {
7
+ "convert_SMILES": {
8
+ "csv_file": "", # 默认CSV文件名
9
+ "screen": False, # 默认不进行筛选
10
+ "charge_screen": "", # 默认电荷筛选为空
11
+ "group_screen": "", # 默认官能团筛选为空
12
+ "group_name": "", # 默认分组名称
13
+ "group_screen_invert": False, # 默认不进行反向筛选
14
+ "machine": "/your/cpu/machine/config/path", # 进行Gaussian优化计算的机器参数
15
+ "resources": "/your/cpu/resources/config/path", # 进行Gaussian优化计算的资源参数
16
+ },
17
+ "empirical_estimate": {
18
+ "folders": [], # 默认文件夹列表
19
+ "ratios": [], # 默认离子配比
20
+ "sort_by": "density", # 默认排序方式
21
+ "make_combo_dir": True, # 默认不创建组合目录
22
+ "target_dir": "", # 默认目标目录
23
+ "num_combos": 100, # 默认组合数量
24
+ "ion_numbers": [], # 默认离子数量
25
+ },
26
+ "gen_opt": {
27
+ "num_per_group": 500, # 每个空间群要生成的晶体结构数量
28
+ "space_groups_limit": 75, # 空间群搜索的限制
29
+ "machine": "/your/gpu/machine/config/path", # 进行机器学习势优化计算的机器参数,建议GPU
30
+ "resources": "/your/gpu/resources/config/path", # 进行机器学习势优化计算的资源参数
31
+ "nodes": 1, # 占用GPU节点数
32
+ },
33
+ "read_mlp_density": {
34
+ "n_screen": 10, # 筛选机器学习势优化后密度最大的n个CONTCAR与对应的OUTCAR
35
+ "molecules_screen": True, # 是否排除离子改变的晶体结构
36
+ "detail_log": False, # 是否额外生成详细的筛选日志文件
37
+ },
38
+ "vasp_processing": {
39
+ "machine": "/your/cpu/machine/config/path", # 进行VASP分步优化计算的机器参数
40
+ "resources": "/your/cpu/resources/config/path", # 进行VASP分步优化计算的资源参数
41
+ "nodes": 2, # 占用CPU节点数
42
+ "molecules_prior": True, # 是否检查离子晶体结构中所有离子的结构
43
+ },
44
+ }
45
+
46
+
47
+ if __name__ == "__main__":
48
+ # 获取工作目录和配置
49
+ work_dir, config = get_work_dir_and_config()
50
+ # 合并配置
51
+ modules = ["convert_SMILES", "empirical_estimate"]
52
+ for module in modules:
53
+ config[module] = merge_config(
54
+ default_config=DEFAULT_CONFIG, user_config=config, key=module
55
+ )
56
+ # 调用主函数
57
+ main_EE(os.path.basename(__file__), work_dir, config)
58
+
File without changes
File without changes
@@ -0,0 +1,6 @@
1
+ from ion_CSP.app import TaskManager
2
+
3
+
4
+ if __name__ == "__main__":
5
+ manager = TaskManager()
6
+ manager.main_menu()
ion_csp-2.0.2/makefile ADDED
@@ -0,0 +1,37 @@
1
+ # Makefile
2
+
3
+ # 编译器
4
+ CC = python3
5
+
6
+ # 源文件
7
+ SRC = $(wildcard src/*.py) $(wildcard src/ion_CSP/*.py)
8
+
9
+ # 输出文件(可以根据需要修改)
10
+ OUT = app
11
+
12
+ # 虚拟环境目录
13
+ VENV = venv
14
+
15
+ # 默认目标
16
+ .PHONY: all
17
+ all: install run
18
+
19
+ # 创建虚拟环境
20
+ .PHONY: venv
21
+ venv:
22
+ $(CC) -m venv $(VENV)
23
+
24
+ # 安装依赖
25
+ .PHONY: install
26
+ install: venv
27
+ $(VENV)/bin/pip install -r requirements.txt
28
+
29
+ # 运行应用程序
30
+ .PHONY: run
31
+ run:
32
+ $(VENV)/bin/python $(SRC)
33
+
34
+ # 清理
35
+ .PHONY: clean
36
+ clean:
37
+ rm -rf $(VENV)
Binary file
@@ -0,0 +1,5 @@
1
+ ## 目录 ./model
2
+ 用于存放所调用的机器学习势文件,文件名必须为 model.pt。
3
+
4
+ # 目录 ./model/options
5
+ 用于存放其他机器学习势文件,文件名任意。
@@ -0,0 +1,16 @@
1
+ SYSTEM = VAG
2
+ NPAR = 4
3
+ PREC = Accurate
4
+ ENCUT = 800
5
+ EDIFF = 1e-4 # 1e-6
6
+ IBRION = -1
7
+ ISMEAR = 0 ; SIGMA = 0.05
8
+ #No writing charge density and wavefunction
9
+ LCHARG = FALSE
10
+ LWAVE = FALSE
11
+ #Target Pressure
12
+ #PSTRESS = 100
13
+ #Finer optimization
14
+ EDIFFG = -0.05 # 1e-4
15
+ KSPACING = 0.25
16
+ IVDW = 11
@@ -0,0 +1,19 @@
1
+ SYSTEM = VAG
2
+ NPAR = 4
3
+ PREC = Accurate
4
+ ENCUT = 600 # 800
5
+ EDIFF = 1e-4 # 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.05 # 1e-4
18
+ KSPACING = 0.7 # 0.25
19
+ IVDW = 11
@@ -0,0 +1,19 @@
1
+ SYSTEM = VAG
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 = 11