ion-CSP 2.1.3__py3-none-any.whl → 2.1.5__py3-none-any.whl
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.
- ion_CSP/__init__.py +2 -2
- ion_CSP/gen_opt.py +19 -15
- ion_CSP/model/model.pt +0 -0
- ion_CSP/model/options/README.md +5 -0
- ion_CSP/model/options/model.ckpt-4000000.pt +0 -0
- ion_CSP/param/INCAR_0 +16 -0
- ion_CSP/param/INCAR_1 +19 -0
- ion_CSP/param/INCAR_2 +19 -0
- ion_CSP/param/INCAR_3 +19 -0
- ion_CSP/param/POTCAR_C +2319 -0
- ion_CSP/param/POTCAR_H +1563 -0
- ion_CSP/param/POTCAR_N +2351 -0
- ion_CSP/param/POTCAR_O +2487 -0
- ion_CSP/param/g16_sub.sh +21 -0
- ion_CSP/param/sub_final.sh +91 -0
- ion_CSP/param/sub_ori.sh +74 -0
- ion_CSP/param/sub_supple.sh +56 -0
- ion_CSP/task_manager.py +6 -9
- {ion_csp-2.1.3.dist-info → ion_csp-2.1.5.dist-info}/METADATA +6 -5
- ion_csp-2.1.5.dist-info/RECORD +44 -0
- run/update_changelog.py +68 -0
- ion_csp-2.1.3.dist-info/RECORD +0 -28
- {ion_csp-2.1.3.dist-info → ion_csp-2.1.5.dist-info}/WHEEL +0 -0
- {ion_csp-2.1.3.dist-info → ion_csp-2.1.5.dist-info}/entry_points.txt +0 -0
- {ion_csp-2.1.3.dist-info → ion_csp-2.1.5.dist-info}/licenses/LICENSE +0 -0
- {ion_csp-2.1.3.dist-info → ion_csp-2.1.5.dist-info}/top_level.txt +0 -0
ion_CSP/param/g16_sub.sh
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
BASE_DIR="./"
|
4
|
+
|
5
|
+
# 遍历所有.gjf文件
|
6
|
+
for gjf in "$BASE_DIR"/*.gjf; do
|
7
|
+
# 安全校验文件存在性
|
8
|
+
[ -f "$gjf" ] || { echo "Skipping invalid file: $gjf"; continue; }
|
9
|
+
|
10
|
+
# 提取带路径的文件名
|
11
|
+
full_name=$(basename "$gjf")
|
12
|
+
|
13
|
+
# 安全提取基名(严格去除最后一个.gjf后缀)
|
14
|
+
base_name="${full_name%.*}"
|
15
|
+
|
16
|
+
# 执行命令(示例)
|
17
|
+
g16 "$gjf" && formchk "${base_name}.chk"
|
18
|
+
if [ $? -ne 0 ] ; then
|
19
|
+
touch "${base_name}.fchk"
|
20
|
+
fi
|
21
|
+
done
|
@@ -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."
|
ion_CSP/param/sub_ori.sh
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
# 设置变量
|
4
|
+
BASE_DIR="./"
|
5
|
+
INCAR_1="INCAR_1"
|
6
|
+
INCAR_2="INCAR_2"
|
7
|
+
POTCAR_H="POTCAR_H"
|
8
|
+
POTCAR_C="POTCAR_C"
|
9
|
+
POTCAR_N="POTCAR_N"
|
10
|
+
POTCAR_O="POTCAR_O"
|
11
|
+
|
12
|
+
# 检查必要文件是否存在
|
13
|
+
if [[ ! -f "$INCAR_1" || ! -f "$INCAR_2" || ! -f "$POTCAR_H" || ! -f "$POTCAR_C" || ! -f "$POTCAR_N" || ! -f "$POTCAR_O" ]]; then
|
14
|
+
echo "Necessary files are missing, please check the path."
|
15
|
+
exit 1
|
16
|
+
fi
|
17
|
+
|
18
|
+
# 创建 POTCAR 文件
|
19
|
+
create_potcar_from_poscar() {
|
20
|
+
poscar_file="$1"
|
21
|
+
output_file="POTCAR"
|
22
|
+
> "$output_file" # 清空文件
|
23
|
+
|
24
|
+
# 读取 POSCAR 文件的第六行(元素行)
|
25
|
+
read -r element_line < <(sed -n '6p' "$poscar_file")
|
26
|
+
|
27
|
+
# 将元素转换为数组
|
28
|
+
IFS=' ' read -r -a elements <<< "$element_line"
|
29
|
+
|
30
|
+
# 根据元素拼接 POTCAR
|
31
|
+
for element in "${elements[@]}"; do
|
32
|
+
case $element in
|
33
|
+
H) cat "$POTCAR_H" >> "$output_file" ;;
|
34
|
+
C) cat "$POTCAR_C" >> "$output_file" ;;
|
35
|
+
N) cat "$POTCAR_N" >> "$output_file" ;;
|
36
|
+
O) cat "$POTCAR_O" >> "$output_file" ;;
|
37
|
+
*) echo "Warning: POTCAR for element $element not found." ;;
|
38
|
+
esac
|
39
|
+
done
|
40
|
+
}
|
41
|
+
|
42
|
+
# 提交第一步优化任务
|
43
|
+
for contcar in ${BASE_DIR}/CONTCAR_*; do
|
44
|
+
if [[ $contcar =~ CONTCAR_(.*) ]]; then
|
45
|
+
sample=${BASH_REMATCH[1]}
|
46
|
+
sample_dir="${BASE_DIR}/${sample}"
|
47
|
+
mkdir -p "$sample_dir"
|
48
|
+
cp "$contcar" "${sample_dir}/POSCAR"
|
49
|
+
cp "$INCAR_1" "${sample_dir}/INCAR"
|
50
|
+
create_potcar_from_poscar "${sample_dir}/POSCAR" # 根据 POSCAR 创建 POTCAR
|
51
|
+
mv "POTCAR" "${sample_dir}/" # 使用自动生成的 POTCAR
|
52
|
+
original_dir=$(pwd) # 保存当前目录
|
53
|
+
cd "${sample_dir}" && mpirun -n ${DPDISPATCHER_CPU_PER_NODE} vasp_std > vasp.log 2>&1
|
54
|
+
cd $original_dir # 返回原始工作目录
|
55
|
+
fi
|
56
|
+
done
|
57
|
+
|
58
|
+
echo "All first step tasks have been submitted."
|
59
|
+
|
60
|
+
# 提交第二步优化任务
|
61
|
+
for sample in $(ls ${BASE_DIR}); do
|
62
|
+
if [ -f "${BASE_DIR}/${sample}/CONTCAR" ]; then
|
63
|
+
sample_dir="${BASE_DIR}/${sample}"
|
64
|
+
mkdir -p "${sample_dir}/fine"
|
65
|
+
cp "${sample_dir}/CONTCAR" "${sample_dir}/fine/POSCAR"
|
66
|
+
cp "$INCAR_2" "${sample_dir}/fine/INCAR"
|
67
|
+
cp "${sample_dir}/POTCAR" "${sample_dir}/fine/"
|
68
|
+
original_dir=$(pwd) # 保存当前目录
|
69
|
+
cd "${sample_dir}/fine" && mpirun -n ${DPDISPATCHER_CPU_PER_NODE} vasp_std > vasp.log 2>&1
|
70
|
+
cd $original_dir # 返回原始工作目录
|
71
|
+
fi
|
72
|
+
done
|
73
|
+
|
74
|
+
echo "All second step tasks have been submitted."
|
@@ -0,0 +1,56 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
# 设置变量
|
4
|
+
BASE_DIR="./"
|
5
|
+
INCAR_3="INCAR_3"
|
6
|
+
POTCAR_H="POTCAR_H"
|
7
|
+
POTCAR_C="POTCAR_C"
|
8
|
+
POTCAR_N="POTCAR_N"
|
9
|
+
POTCAR_O="POTCAR_O"
|
10
|
+
|
11
|
+
# 检查必要文件是否存在
|
12
|
+
if [[ ! -f "$INCAR_3" || ! -f "$POTCAR_H" || ! -f "$POTCAR_C" || ! -f "$POTCAR_N" || ! -f "$POTCAR_O" ]]; then
|
13
|
+
echo "Necessary files are missing, please check the path."
|
14
|
+
exit 1
|
15
|
+
fi
|
16
|
+
|
17
|
+
# 创建 POTCAR 文件
|
18
|
+
create_potcar_from_poscar() {
|
19
|
+
poscar_file="$1"
|
20
|
+
output_file="POTCAR"
|
21
|
+
> "$output_file" # 清空文件
|
22
|
+
|
23
|
+
# 读取 POSCAR 文件的第六行(元素行)
|
24
|
+
read -r element_line < <(sed -n '6p' "$poscar_file")
|
25
|
+
|
26
|
+
# 将元素转换为数组
|
27
|
+
IFS=' ' read -r -a elements <<< "$element_line"
|
28
|
+
|
29
|
+
# 根据元素拼接 POTCAR
|
30
|
+
for element in "${elements[@]}"; do
|
31
|
+
case $element in
|
32
|
+
H) cat "$POTCAR_H" >> "$output_file" ;;
|
33
|
+
C) cat "$POTCAR_C" >> "$output_file" ;;
|
34
|
+
N) cat "$POTCAR_N" >> "$output_file" ;;
|
35
|
+
O) cat "$POTCAR_O" >> "$output_file" ;;
|
36
|
+
*) echo "Warning: POTCAR for element $element not found." ;;
|
37
|
+
esac
|
38
|
+
done
|
39
|
+
}
|
40
|
+
|
41
|
+
# 提交第三步优化任务
|
42
|
+
for sample in $(ls ${BASE_DIR}); do
|
43
|
+
if [ -f "${BASE_DIR}/${sample}/fine/CONTCAR" ]; then
|
44
|
+
sample_dir="${BASE_DIR}/${sample}"
|
45
|
+
mkdir -p "${sample_dir}/fine/final"
|
46
|
+
cp "${sample_dir}/fine/CONTCAR" "${sample_dir}/fine/final/POSCAR"
|
47
|
+
cp "$INCAR_3" "${sample_dir}/fine/final/INCAR"
|
48
|
+
create_potcar_from_poscar "${sample_dir}/fine/final/POSCAR" # 根据 POSCAR 创建 POTCAR
|
49
|
+
mv "POTCAR" "${sample_dir}/fine/final/" # 使用自动生成的 POTCAR
|
50
|
+
original_dir=$(pwd) # 保存当前目录
|
51
|
+
cd "${sample_dir}/fine/final" && mpirun -n ${DPDISPATCHER_CPU_PER_NODE} vasp_std > vasp.log 2>&1
|
52
|
+
cd $original_dir # 返回原始工作目录
|
53
|
+
fi
|
54
|
+
done
|
55
|
+
|
56
|
+
echo "All third step tasks have been submitted."
|
ion_CSP/task_manager.py
CHANGED
@@ -29,18 +29,15 @@ class TaskManager:
|
|
29
29
|
def _get_version(self):
|
30
30
|
"""版本获取"""
|
31
31
|
try:
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
)
|
37
|
-
module = importlib.util.module_from_spec(spec)
|
38
|
-
spec.loader.exec_module(module)
|
39
|
-
return module.__version__
|
32
|
+
return importlib.metadata.version("ion_CSP")
|
33
|
+
except importlib.metadata.PackageNotFoundError:
|
34
|
+
logging.error("Version detection failed")
|
35
|
+
return "unknown"
|
40
36
|
except Exception as e:
|
41
37
|
logging.error(f"Version detection failed: {e}")
|
42
38
|
return "unknown"
|
43
39
|
|
40
|
+
|
44
41
|
def _detect_env(self):
|
45
42
|
"""检测运行环境 - Detect execution environment"""
|
46
43
|
if Path("/.dockerenv").exists() or "DOCKER" in os.environ:
|
@@ -367,7 +364,7 @@ class TaskManager:
|
|
367
364
|
"""主菜单循环 - Main menu loop"""
|
368
365
|
while True:
|
369
366
|
os.system("clear" if os.name == "posix" else "cls")
|
370
|
-
print("========== Task Execution
|
367
|
+
print("========== Task Execution System ==========")
|
371
368
|
print(f"Current Version: {self.version}")
|
372
369
|
print(f"Current Environment: {self.envs}")
|
373
370
|
print(f"Current Directory: {self.workspace}")
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: ion_CSP
|
3
|
-
Version: 2.1.
|
3
|
+
Version: 2.1.5
|
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
|
@@ -13,6 +13,7 @@ Requires-Python: >=3.11
|
|
13
13
|
Description-Content-Type: text/markdown
|
14
14
|
License-File: LICENSE
|
15
15
|
Requires-Dist: ase==3.23.0
|
16
|
+
Requires-Dist: scipy==1.15.2
|
16
17
|
Requires-Dist: deepmd-kit==3.0.1
|
17
18
|
Requires-Dist: torch==2.5.0
|
18
19
|
Requires-Dist: dpdispatcher==0.6.7
|
@@ -132,8 +133,8 @@ graph TD
|
|
132
133
|
本项目采用MIT许可证,详见LICENSE文件。
|
133
134
|
|
134
135
|
## 技术支持
|
135
|
-
- **文档更新**:2025年
|
136
|
-
- **最新版本**:v2.1.
|
136
|
+
- **文档更新**:2025年6月
|
137
|
+
- **最新版本**:v2.1.5
|
137
138
|
- **问题追踪**:https://github.com/bagabaga007/ion_CSP/issues
|
138
139
|
|
139
140
|
---
|
@@ -239,6 +240,6 @@ graph TD
|
|
239
240
|
MIT License, see LICENSE file.
|
240
241
|
|
241
242
|
## Support
|
242
|
-
- Documentation last updated:
|
243
|
-
- Latest version: v2.1.
|
243
|
+
- Documentation last updated: June 2025
|
244
|
+
- Latest version: v2.1.5
|
244
245
|
- Issue tracker: https://github.com/bagabaga007/ion_CSP/issues
|
@@ -0,0 +1,44 @@
|
|
1
|
+
ion_CSP/__init__.py,sha256=L5DyCHC4xoiu_KnOW1rVheNbNVooNtuyr75m1z6YbkU,374
|
2
|
+
ion_CSP/__main__.py,sha256=XlNCx5eMSrL7yld9ddSYXhjXvg2ZYGD_uk9LdqNabvs,74
|
3
|
+
ion_CSP/convert_SMILES.py,sha256=4fndMcuIEypYtkXWBoS7W7uEXkZXVLeMDshdXEIk5kY,13864
|
4
|
+
ion_CSP/empirical_estimate.py,sha256=_U5VRWSIAiJGcxnP3mnCHn8zKzviFEQhQwN7TjPTnCU,29089
|
5
|
+
ion_CSP/gen_opt.py,sha256=e_B0OIRb7nnrNGKuM8PttuRdwOkOH1YtZwBkP7GIZv8,19660
|
6
|
+
ion_CSP/identify_molecules.py,sha256=hFKXS0Jjd7LyMsYGc9RmnoRPu1ibXF9fYO_9lR3wTfo,4634
|
7
|
+
ion_CSP/log_and_time.py,sha256=-RCycW1VB7sa3bjQZiF7c8i73iam8S41qgJxlHRqJaw,9406
|
8
|
+
ion_CSP/mlp_opt.py,sha256=ox4Qxg4D6WzrB8dxVnUWmAngnOA_wdcInP5UhBWsH4c,5535
|
9
|
+
ion_CSP/read_mlp_density.py,sha256=3N7kgM2RCe1gbP8QxpgtwYRaj77w4niNglWA5VDoQsk,11209
|
10
|
+
ion_CSP/steps_opt_monitor.sh,sha256=1klPjnK0gqkDbvI9PtjdK5qidJ5G0Mo8q1SfrlLW5xM,3330
|
11
|
+
ion_CSP/task_manager.py,sha256=pz9xPkCFBpKmeZFgylfUV5iSs4tgbasTZkX0m3lIlWE,16568
|
12
|
+
ion_CSP/upload_download.py,sha256=Hiz5jKOy9x26hJJdcpt-owQdVUbzzGuGOelro6JozY8,23801
|
13
|
+
ion_CSP/vasp_processing.py,sha256=TshMNs7fA0zABvk4sKlVjofJFwGH9DVYcCGbcUpoH1s,31542
|
14
|
+
ion_CSP/model/model.pt,sha256=5D9HTP5b7jUOv3kHltT71ORzhgt5p96awjbqC4oZVjQ,24649402
|
15
|
+
ion_CSP/model/options/README.md,sha256=ifoeNXF2CfwqUjt3Xmh5qUl-e4hfP4eMV4EkqV7GU30,182
|
16
|
+
ion_CSP/model/options/model.ckpt-4000000.pt,sha256=5D9HTP5b7jUOv3kHltT71ORzhgt5p96awjbqC4oZVjQ,24649402
|
17
|
+
ion_CSP/param/INCAR_0,sha256=qh0cOez9-Lv0wVyf6bCrQ92kWiioOsx-tXthcx2GXtE,295
|
18
|
+
ion_CSP/param/INCAR_1,sha256=GhWmKUcG01XYISIBOoPRSEEtTgbLeZd7-VeZE5WvXnY,351
|
19
|
+
ion_CSP/param/INCAR_2,sha256=951-1SxWO3pZjXmTWcOeDAnaSpUuepyn2FzOXegwRIU,319
|
20
|
+
ion_CSP/param/INCAR_3,sha256=zX6W-oX2xTYc8OEkbfzJiyapI2-uBrMpAJcyyypRJ1E,319
|
21
|
+
ion_CSP/param/POTCAR_C,sha256=BygEoI0xTgy87Xvqko948Rfj5Nw-qAkwhfd5CvJQ5yA,209530
|
22
|
+
ion_CSP/param/POTCAR_H,sha256=ypnE6_RSPVdygq79elXWiZ7gIj6rGVP2VeRXbzY6c74,142686
|
23
|
+
ion_CSP/param/POTCAR_N,sha256=n9-vHqk9sJ6A3C3e1yTw9r9SZKDJc1mArgcfdJ0APA4,213434
|
24
|
+
ion_CSP/param/POTCAR_O,sha256=S5LYsbk2ZWoDj6hLxRucM48wNHgf7BQcCylgwGdL4hA,222698
|
25
|
+
ion_CSP/param/g16_sub.sh,sha256=WOxXhBiPjpZ8eJwdLdLtCfVsWPWh0USxrBbX9u3cunk,519
|
26
|
+
ion_CSP/param/sub_final.sh,sha256=jQSEgNThM8UJT4Vd6AzBFeccn-xoqG-fpSTiXmwzZhM,3222
|
27
|
+
ion_CSP/param/sub_ori.sh,sha256=JBERlc-VOVCNaKGwiJR8oq7Nyf0KV4JpHEVT5sE5s8E,2497
|
28
|
+
ion_CSP/param/sub_supple.sh,sha256=23cam7WyW7-80J8O-Bs45qYkabk3mxZDgiHZvf48KBM,1887
|
29
|
+
ion_csp-2.1.5.dist-info/licenses/LICENSE,sha256=2J6A8GT2iIf2LhuWO1_0ilgx7ijzzpQ2BXU7rHKe8Cc,1068
|
30
|
+
run/__init__.py,sha256=_9EAXp4cv41ARbxahCkihwqY4F00Y18tBeTauWeD9mw,186
|
31
|
+
run/main_CSP.py,sha256=UaYHlh7BSxar4uGppPi-V0cFDpB14212Oy6gta59LfA,5898
|
32
|
+
run/main_EE.py,sha256=4L0VbbgUaYaDJM-6EjffphxMoWAHaZchEaSCVJxsdls,6345
|
33
|
+
run/run_convert_SMILES.py,sha256=85a8-UXPxPo3Yw_iYED_QF47yNTvYRnJHm3PC1d-d_Q,2056
|
34
|
+
run/run_empirical_estimate.py,sha256=U_yvQ5gMiBkDEabHXLJSAEm0EzGHhSKs6xmWoEC_gjc,2831
|
35
|
+
run/run_gen_opt.py,sha256=_Zcsu0FkuZTfiGKSWNaK17LiyQ3qrP30F66UN5QemCo,2727
|
36
|
+
run/run_read_mlp_density.py,sha256=aSJjWS1jH-D7qzx7RnpMPSTH7KEZp2b35dg1b2OQSCM,1864
|
37
|
+
run/run_upload_download.py,sha256=wuTAdy4bgdduD7TJtgHwo_fTpHKlkAwmgRknClDLYDo,2436
|
38
|
+
run/run_vasp_processing.py,sha256=hziE4cZwmIWvVaZtwHn9Dl35apYSLlMvSVIbCyd5mFg,1612
|
39
|
+
run/update_changelog.py,sha256=ShnVG7v3qSQAzWUA90bFbWGwI3lwfbA_ugov6avS3jU,2121
|
40
|
+
ion_csp-2.1.5.dist-info/METADATA,sha256=YmomKcyGXzBZ-e9GWVpM2txQjPBlF6sAORk3sZ7Fw-0,6554
|
41
|
+
ion_csp-2.1.5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
42
|
+
ion_csp-2.1.5.dist-info/entry_points.txt,sha256=NexQJDs9f69kJA2DgoU6tsA3V8a66nadJRem1U_c_6g,54
|
43
|
+
ion_csp-2.1.5.dist-info/top_level.txt,sha256=Vp0RHefYscYU7uQ4Fu6bOKhC_ASrdGOzZxYfN5r0f2M,12
|
44
|
+
ion_csp-2.1.5.dist-info/RECORD,,
|
run/update_changelog.py
ADDED
@@ -0,0 +1,68 @@
|
|
1
|
+
import subprocess
|
2
|
+
|
3
|
+
|
4
|
+
def get_commit_details():
|
5
|
+
# 获取提交信息,包括哈希、日期和消息
|
6
|
+
result = subprocess.run(
|
7
|
+
["git", "log", "--pretty=format:%h %ad %s", "--date=short"],
|
8
|
+
capture_output=True,
|
9
|
+
text=True,
|
10
|
+
)
|
11
|
+
return result.stdout.splitlines()
|
12
|
+
|
13
|
+
|
14
|
+
def get_commit_tags():
|
15
|
+
# 获取每个提交的标签信息
|
16
|
+
tags = {}
|
17
|
+
commits = get_commit_details()
|
18
|
+
for commit in commits:
|
19
|
+
hash_value = commit.split(" ")[0]
|
20
|
+
result = subprocess.run(
|
21
|
+
["git", "tag", "--points-at", hash_value], capture_output=True, text=True
|
22
|
+
)
|
23
|
+
tag_list = result.stdout.strip().splitlines()
|
24
|
+
tags[hash_value] = tag_list
|
25
|
+
return tags
|
26
|
+
|
27
|
+
|
28
|
+
def generate_changelog(commit_details, tags):
|
29
|
+
changelog_path = "CHANGELOG.md"
|
30
|
+
|
31
|
+
# 生成变更日志内容
|
32
|
+
new_changelog_content = []
|
33
|
+
|
34
|
+
# 添加标题
|
35
|
+
new_changelog_content.append("# Changelog\n\n")
|
36
|
+
|
37
|
+
# 添加每个提交的详细信息
|
38
|
+
for detail in commit_details:
|
39
|
+
hash_value, date, *message = detail.split(" ")
|
40
|
+
message = " ".join(message) # 重新组合提交信息
|
41
|
+
|
42
|
+
# 检查是否有标签
|
43
|
+
if tags.get(hash_value):
|
44
|
+
# 添加标签信息
|
45
|
+
for tag in tags[hash_value]:
|
46
|
+
new_changelog_content.append(f"## {tag}\n")
|
47
|
+
|
48
|
+
# 添加提交信息
|
49
|
+
new_changelog_content.append(f"### {hash_value} ({date})\n")
|
50
|
+
new_changelog_content.append(f"{message}\n\n")
|
51
|
+
else:
|
52
|
+
# 如果没有标签,直接添加提交信息
|
53
|
+
new_changelog_content.append(f"### {hash_value} ({date})\n")
|
54
|
+
new_changelog_content.append(f"{message}\n\n")
|
55
|
+
|
56
|
+
# 写入 CHANGELOG.md
|
57
|
+
with open(changelog_path, "w") as file:
|
58
|
+
file.writelines(new_changelog_content)
|
59
|
+
|
60
|
+
|
61
|
+
if __name__ == "__main__":
|
62
|
+
commit_details = get_commit_details()
|
63
|
+
tags = get_commit_tags() # 获取每个提交的标签信息
|
64
|
+
if commit_details:
|
65
|
+
generate_changelog(commit_details, tags)
|
66
|
+
print("CHANGELOG.md has been updated.")
|
67
|
+
else:
|
68
|
+
print("No new commits found.")
|
ion_csp-2.1.3.dist-info/RECORD
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
ion_CSP/__init__.py,sha256=axZa2cdqI7GY7iU5xGNsBIcYL4SqyozbGJ-76Blzf9I,374
|
2
|
-
ion_CSP/__main__.py,sha256=XlNCx5eMSrL7yld9ddSYXhjXvg2ZYGD_uk9LdqNabvs,74
|
3
|
-
ion_CSP/convert_SMILES.py,sha256=4fndMcuIEypYtkXWBoS7W7uEXkZXVLeMDshdXEIk5kY,13864
|
4
|
-
ion_CSP/empirical_estimate.py,sha256=_U5VRWSIAiJGcxnP3mnCHn8zKzviFEQhQwN7TjPTnCU,29089
|
5
|
-
ion_CSP/gen_opt.py,sha256=aVZmf2RqePCwZShgpNvzqfntNAW0I0yctWHGXoe3mgw,19463
|
6
|
-
ion_CSP/identify_molecules.py,sha256=hFKXS0Jjd7LyMsYGc9RmnoRPu1ibXF9fYO_9lR3wTfo,4634
|
7
|
-
ion_CSP/log_and_time.py,sha256=-RCycW1VB7sa3bjQZiF7c8i73iam8S41qgJxlHRqJaw,9406
|
8
|
-
ion_CSP/mlp_opt.py,sha256=ox4Qxg4D6WzrB8dxVnUWmAngnOA_wdcInP5UhBWsH4c,5535
|
9
|
-
ion_CSP/read_mlp_density.py,sha256=3N7kgM2RCe1gbP8QxpgtwYRaj77w4niNglWA5VDoQsk,11209
|
10
|
-
ion_CSP/steps_opt_monitor.sh,sha256=1klPjnK0gqkDbvI9PtjdK5qidJ5G0Mo8q1SfrlLW5xM,3330
|
11
|
-
ion_CSP/task_manager.py,sha256=TZPsbwUWoUIG_Kmsa-WcEh_rWx8WaKkj6SworG_qk9w,16733
|
12
|
-
ion_CSP/upload_download.py,sha256=Hiz5jKOy9x26hJJdcpt-owQdVUbzzGuGOelro6JozY8,23801
|
13
|
-
ion_CSP/vasp_processing.py,sha256=TshMNs7fA0zABvk4sKlVjofJFwGH9DVYcCGbcUpoH1s,31542
|
14
|
-
ion_csp-2.1.3.dist-info/licenses/LICENSE,sha256=2J6A8GT2iIf2LhuWO1_0ilgx7ijzzpQ2BXU7rHKe8Cc,1068
|
15
|
-
run/__init__.py,sha256=_9EAXp4cv41ARbxahCkihwqY4F00Y18tBeTauWeD9mw,186
|
16
|
-
run/main_CSP.py,sha256=UaYHlh7BSxar4uGppPi-V0cFDpB14212Oy6gta59LfA,5898
|
17
|
-
run/main_EE.py,sha256=4L0VbbgUaYaDJM-6EjffphxMoWAHaZchEaSCVJxsdls,6345
|
18
|
-
run/run_convert_SMILES.py,sha256=85a8-UXPxPo3Yw_iYED_QF47yNTvYRnJHm3PC1d-d_Q,2056
|
19
|
-
run/run_empirical_estimate.py,sha256=U_yvQ5gMiBkDEabHXLJSAEm0EzGHhSKs6xmWoEC_gjc,2831
|
20
|
-
run/run_gen_opt.py,sha256=_Zcsu0FkuZTfiGKSWNaK17LiyQ3qrP30F66UN5QemCo,2727
|
21
|
-
run/run_read_mlp_density.py,sha256=aSJjWS1jH-D7qzx7RnpMPSTH7KEZp2b35dg1b2OQSCM,1864
|
22
|
-
run/run_upload_download.py,sha256=wuTAdy4bgdduD7TJtgHwo_fTpHKlkAwmgRknClDLYDo,2436
|
23
|
-
run/run_vasp_processing.py,sha256=hziE4cZwmIWvVaZtwHn9Dl35apYSLlMvSVIbCyd5mFg,1612
|
24
|
-
ion_csp-2.1.3.dist-info/METADATA,sha256=_Ij1Ms_VyN0ZxGkw0FEs_3BcEaW-dvcaJKTakHeHsmQ,6524
|
25
|
-
ion_csp-2.1.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
26
|
-
ion_csp-2.1.3.dist-info/entry_points.txt,sha256=NexQJDs9f69kJA2DgoU6tsA3V8a66nadJRem1U_c_6g,54
|
27
|
-
ion_csp-2.1.3.dist-info/top_level.txt,sha256=Vp0RHefYscYU7uQ4Fu6bOKhC_ASrdGOzZxYfN5r0f2M,12
|
28
|
-
ion_csp-2.1.3.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|