rsspolymlp 0.3.4__tar.gz → 0.4.1__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.
- {rsspolymlp-0.3.4 → rsspolymlp-0.4.1}/LICENSE +1 -1
- {rsspolymlp-0.3.4/src/rsspolymlp.egg-info → rsspolymlp-0.4.1}/PKG-INFO +19 -16
- {rsspolymlp-0.3.4 → rsspolymlp-0.4.1}/README.md +18 -15
- {rsspolymlp-0.3.4 → rsspolymlp-0.4.1}/pyproject.toml +1 -1
- {rsspolymlp-0.3.4 → rsspolymlp-0.4.1}/src/rsspolymlp/analysis/eos.py +1 -1
- {rsspolymlp-0.3.4 → rsspolymlp-0.4.1}/src/rsspolymlp/analysis/ghost_minima.py +14 -18
- {rsspolymlp-0.3.4 → rsspolymlp-0.4.1}/src/rsspolymlp/analysis/phase_analysis.py +8 -11
- rsspolymlp-0.4.1/src/rsspolymlp/analysis/rss_summarize.py +640 -0
- rsspolymlp-0.4.1/src/rsspolymlp/analysis/struct_matcher/gen_redrep.py +338 -0
- {rsspolymlp-0.3.4 → rsspolymlp-0.4.1}/src/rsspolymlp/analysis/struct_matcher/reduced_position.py +45 -112
- rsspolymlp-0.4.1/src/rsspolymlp/analysis/struct_matcher/struct_match.py +331 -0
- {rsspolymlp-0.3.4 → rsspolymlp-0.4.1}/src/rsspolymlp/api/cli_rsspolymlp.py +18 -8
- {rsspolymlp-0.3.4 → rsspolymlp-0.4.1}/src/rsspolymlp/api/cli_rsspolymlp_devkit.py +23 -31
- {rsspolymlp-0.3.4 → rsspolymlp-0.4.1}/src/rsspolymlp/api/cli_rsspolymlp_utils.py +14 -0
- {rsspolymlp-0.3.4 → rsspolymlp-0.4.1}/src/rsspolymlp/api/rsspolymlp.py +23 -19
- {rsspolymlp-0.3.4 → rsspolymlp-0.4.1}/src/rsspolymlp/api/rsspolymlp_devkit.py +24 -31
- {rsspolymlp-0.3.4 → rsspolymlp-0.4.1}/src/rsspolymlp/api/rsspolymlp_plot.py +7 -10
- {rsspolymlp-0.3.4 → rsspolymlp-0.4.1}/src/rsspolymlp/api/rsspolymlp_utils.py +74 -49
- {rsspolymlp-0.3.4 → rsspolymlp-0.4.1}/src/rsspolymlp/common/atomic_energy.py +1 -1
- {rsspolymlp-0.3.4 → rsspolymlp-0.4.1}/src/rsspolymlp/common/composition.py +2 -3
- rsspolymlp-0.4.1/src/rsspolymlp/common/interface_vasp.py +318 -0
- {rsspolymlp-0.3.4 → rsspolymlp-0.4.1}/src/rsspolymlp/mlp_dev/dataset/gen_mlp_dataset.py +9 -8
- rsspolymlp-0.3.4/src/rsspolymlp/mlp_dev/dataset/divide_dataset.py → rsspolymlp-0.4.1/src/rsspolymlp/mlp_dev/dataset/split_dataset.py +63 -89
- rsspolymlp-0.4.1/src/rsspolymlp/mlp_dev/model_selection/binary/gen_single_model.py +74 -0
- {rsspolymlp-0.3.4/src/rsspolymlp/mlp_dev/model_selection → rsspolymlp-0.4.1/src/rsspolymlp/mlp_dev/model_selection/elemental}/gen_single_model.py +3 -3
- {rsspolymlp-0.3.4 → rsspolymlp-0.4.1}/src/rsspolymlp/mlp_dev/model_selection/n_feature.py +16 -4
- {rsspolymlp-0.3.4 → rsspolymlp-0.4.1}/src/rsspolymlp/mlp_dev/model_selection/pypolymlp_gridsearch.py +3 -3
- {rsspolymlp-0.3.4 → rsspolymlp-0.4.1}/src/rsspolymlp/mlp_dev/model_selection/reduce_grid.py +7 -1
- {rsspolymlp-0.3.4 → rsspolymlp-0.4.1}/src/rsspolymlp/mlp_dev/polymlp_dev.py +2 -1
- {rsspolymlp-0.3.4 → rsspolymlp-0.4.1}/src/rsspolymlp/rss/eliminate_duplicates.py +209 -199
- {rsspolymlp-0.3.4 → rsspolymlp-0.4.1}/src/rsspolymlp/rss/load_logfile.py +4 -1
- {rsspolymlp-0.3.4 → rsspolymlp-0.4.1}/src/rsspolymlp/rss/optimization_mlp.py +15 -6
- {rsspolymlp-0.3.4 → rsspolymlp-0.4.1}/src/rsspolymlp/utils/matplot_util/examples/template.py +2 -2
- {rsspolymlp-0.3.4 → rsspolymlp-0.4.1}/src/rsspolymlp/utils/opt_sscha/opt_geometry_sscha.py +4 -5
- {rsspolymlp-0.3.4 → rsspolymlp-0.4.1}/src/rsspolymlp/utils/opt_sscha/sscha_property.py +10 -2
- {rsspolymlp-0.3.4 → rsspolymlp-0.4.1}/src/rsspolymlp/utils/pymatgen_utils.py +32 -5
- {rsspolymlp-0.3.4 → rsspolymlp-0.4.1}/src/rsspolymlp/utils/spglib_utils.py +1 -1
- {rsspolymlp-0.3.4 → rsspolymlp-0.4.1}/src/rsspolymlp/utils/vasp_util/gen_script.py +3 -2
- {rsspolymlp-0.3.4 → rsspolymlp-0.4.1}/src/rsspolymlp/utils/vasp_util/write_poscar.py +12 -1
- {rsspolymlp-0.3.4 → rsspolymlp-0.4.1/src/rsspolymlp.egg-info}/PKG-INFO +19 -16
- {rsspolymlp-0.3.4 → rsspolymlp-0.4.1}/src/rsspolymlp.egg-info/SOURCES.txt +6 -10
- {rsspolymlp-0.3.4 → rsspolymlp-0.4.1}/tests/test_cli_help.py +0 -1
- rsspolymlp-0.3.4/src/rsspolymlp/analysis/rss_summarize.py +0 -476
- rsspolymlp-0.3.4/src/rsspolymlp/analysis/struct_matcher/deprecated/invert_and_swap.py +0 -106
- rsspolymlp-0.3.4/src/rsspolymlp/analysis/struct_matcher/deprecated/irrep_position.py +0 -379
- rsspolymlp-0.3.4/src/rsspolymlp/analysis/struct_matcher/deprecated/niggli.py +0 -10
- rsspolymlp-0.3.4/src/rsspolymlp/analysis/struct_matcher/deprecated/struct_match.py +0 -264
- rsspolymlp-0.3.4/src/rsspolymlp/analysis/struct_matcher/deprecated/utils.py +0 -83
- rsspolymlp-0.3.4/src/rsspolymlp/analysis/struct_matcher/struct_match.py +0 -295
- rsspolymlp-0.3.4/src/rsspolymlp/analysis/unique_struct.py +0 -478
- rsspolymlp-0.3.4/src/rsspolymlp/utils/opt_sscha/harmonic_real.py +0 -379
- {rsspolymlp-0.3.4 → rsspolymlp-0.4.1}/setup.cfg +0 -0
- {rsspolymlp-0.3.4 → rsspolymlp-0.4.1}/src/rsspolymlp/__init__.py +0 -0
- {rsspolymlp-0.3.4 → rsspolymlp-0.4.1}/src/rsspolymlp/analysis/__init__.py +0 -0
- {rsspolymlp-0.3.4 → rsspolymlp-0.4.1}/src/rsspolymlp/analysis/struct_matcher/__init__.py +0 -0
- {rsspolymlp-0.3.4 → rsspolymlp-0.4.1}/src/rsspolymlp/analysis/struct_matcher/chiral_spg.py +0 -0
- {rsspolymlp-0.3.4 → rsspolymlp-0.4.1}/src/rsspolymlp/analysis/struct_matcher/invert_and_swap.py +0 -0
- {rsspolymlp-0.3.4 → rsspolymlp-0.4.1}/src/rsspolymlp/api/__init__.py +0 -0
- {rsspolymlp-0.3.4 → rsspolymlp-0.4.1}/src/rsspolymlp/api/cli_rsspolymlp_plot.py +0 -0
- {rsspolymlp-0.3.4 → rsspolymlp-0.4.1}/src/rsspolymlp/common/__init__.py +0 -0
- {rsspolymlp-0.3.4 → rsspolymlp-0.4.1}/src/rsspolymlp/common/convert_dict.py +0 -0
- {rsspolymlp-0.3.4 → rsspolymlp-0.4.1}/src/rsspolymlp/common/property.py +0 -0
- {rsspolymlp-0.3.4 → rsspolymlp-0.4.1}/src/rsspolymlp/mlp_dev/dataset/compress_vasprun.py +0 -0
- {rsspolymlp-0.3.4 → rsspolymlp-0.4.1}/src/rsspolymlp/mlp_dev/estimate_cost.py +0 -0
- {rsspolymlp-0.3.4/src/rsspolymlp/mlp_dev/model_selection → rsspolymlp-0.4.1/src/rsspolymlp/mlp_dev/model_selection/elemental}/gen_hybrid_model.py +0 -0
- {rsspolymlp-0.3.4 → rsspolymlp-0.4.1}/src/rsspolymlp/mlp_dev/pareto_opt_mlp.py +0 -0
- {rsspolymlp-0.3.4 → rsspolymlp-0.4.1}/src/rsspolymlp/rss/__init__.py +0 -0
- {rsspolymlp-0.3.4 → rsspolymlp-0.4.1}/src/rsspolymlp/rss/random_struct.py +0 -0
- {rsspolymlp-0.3.4 → rsspolymlp-0.4.1}/src/rsspolymlp/utils/__init__.py +0 -0
- {rsspolymlp-0.3.4 → rsspolymlp-0.4.1}/src/rsspolymlp/utils/lammps_utils.py +0 -0
- {rsspolymlp-0.3.4 → rsspolymlp-0.4.1}/src/rsspolymlp/utils/matplot_util/__init__.py +0 -0
- {rsspolymlp-0.3.4 → rsspolymlp-0.4.1}/src/rsspolymlp/utils/matplot_util/custom_plt.py +0 -0
- {rsspolymlp-0.3.4 → rsspolymlp-0.4.1}/src/rsspolymlp/utils/matplot_util/examples/__init__.py +0 -0
- {rsspolymlp-0.3.4 → rsspolymlp-0.4.1}/src/rsspolymlp/utils/matplot_util/examples/example.py +0 -0
- {rsspolymlp-0.3.4 → rsspolymlp-0.4.1}/src/rsspolymlp/utils/matplot_util/make_plot.py +0 -0
- {rsspolymlp-0.3.4 → rsspolymlp-0.4.1}/src/rsspolymlp/utils/opt_sscha/opt_position_sscha.py +0 -0
- {rsspolymlp-0.3.4 → rsspolymlp-0.4.1}/src/rsspolymlp/utils/opt_sscha/run_opt_sscha.py +0 -0
- {rsspolymlp-0.3.4 → rsspolymlp-0.4.1}/src/rsspolymlp/utils/vasp_util/__init__.py +0 -0
- {rsspolymlp-0.3.4 → rsspolymlp-0.4.1}/src/rsspolymlp/utils/vasp_util/api.py +0 -0
- {rsspolymlp-0.3.4 → rsspolymlp-0.4.1}/src/rsspolymlp/utils/vasp_util/gen_incar.py +0 -0
- {rsspolymlp-0.3.4 → rsspolymlp-0.4.1}/src/rsspolymlp.egg-info/dependency_links.txt +0 -0
- {rsspolymlp-0.3.4 → rsspolymlp-0.4.1}/src/rsspolymlp.egg-info/entry_points.txt +0 -0
- {rsspolymlp-0.3.4 → rsspolymlp-0.4.1}/src/rsspolymlp.egg-info/requires.txt +0 -0
- {rsspolymlp-0.3.4 → rsspolymlp-0.4.1}/src/rsspolymlp.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: rsspolymlp
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4.1
|
|
4
4
|
Summary: A framework for random structure search using polynomial MLPs
|
|
5
5
|
Author-email: Hayato Wakai <wakai@cms.mtl.kyoto-u.ac.jp>
|
|
6
6
|
Maintainer-email: Hayato Wakai <wakai@cms.mtl.kyoto-u.ac.jp>
|
|
@@ -29,23 +29,27 @@ Requires-Dist: matplotlib; extra == "tools"
|
|
|
29
29
|
Requires-Dist: seaborn; extra == "tools"
|
|
30
30
|
Dynamic: license-file
|
|
31
31
|
|
|
32
|
-
#
|
|
32
|
+
# Framework for random structure search using polynomial machine learning potentials
|
|
33
33
|
|
|
34
34
|
## Citation of rsspolymlp
|
|
35
35
|
|
|
36
36
|
If you use `rsspolymlp` in your study, please cite the following articles.
|
|
37
37
|
|
|
38
|
-
“
|
|
38
|
+
“Systematic global structure search of bismuth-based binary systems under pressure using machine learning potentials”, [Phys. Rev. Materials 10, 093801 (2026)](https://doi.org/10.1103/k9sg-v7hl)
|
|
39
39
|
```
|
|
40
|
-
@article{
|
|
41
|
-
title=
|
|
42
|
-
author={Hayato
|
|
43
|
-
journal={
|
|
44
|
-
volume={
|
|
45
|
-
|
|
46
|
-
pages={
|
|
47
|
-
|
|
48
|
-
|
|
40
|
+
@article{Phys.Rev.Mater.10.093801,
|
|
41
|
+
title = {Systematic global structure search of bismuth-based binary systems under pressure using machine learning potentials},
|
|
42
|
+
author = {Wakai, Hayato and Ishiwata, Shintaro and Seko, Atsuto},
|
|
43
|
+
journal = {Phys. Rev. Mater.},
|
|
44
|
+
volume = {10},
|
|
45
|
+
issue = {9},
|
|
46
|
+
pages = {093801},
|
|
47
|
+
numpages = {28},
|
|
48
|
+
year = {2026},
|
|
49
|
+
month = {Sep},
|
|
50
|
+
publisher = {American Physical Society},
|
|
51
|
+
doi = {10.1103/k9sg-v7hl},
|
|
52
|
+
url = {https://link.aps.org/doi/10.1103/k9sg-v7hl}
|
|
49
53
|
}
|
|
50
54
|
```
|
|
51
55
|
|
|
@@ -61,8 +65,8 @@ If you use `rsspolymlp` in your study, please cite the following articles.
|
|
|
61
65
|
- symfc
|
|
62
66
|
|
|
63
67
|
[Optional]
|
|
64
|
-
- matplotlib
|
|
65
|
-
-
|
|
68
|
+
- matplotlib, seaborn
|
|
69
|
+
- pymatgen
|
|
66
70
|
|
|
67
71
|
### How to install
|
|
68
72
|
- Install from conda-forge
|
|
@@ -91,9 +95,8 @@ pip install rsspolymlp
|
|
|
91
95
|
- Initial structure generation
|
|
92
96
|
- Global RSS with polynomial MLPs
|
|
93
97
|
- Unique structure identification and RSS result summarization
|
|
94
|
-
- Ghost minimum structure elimination
|
|
95
98
|
- Phase stability analysis
|
|
96
|
-
- [Development kit for polynomial MLPs](docs/
|
|
99
|
+
- [Development kit for polynomial MLPs](docs/rsspolymlp_dev.md)
|
|
97
100
|
- MLP dataset generation
|
|
98
101
|
- DFT dataset division
|
|
99
102
|
- Polynomial MLP development
|
|
@@ -1,20 +1,24 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Framework for random structure search using polynomial machine learning potentials
|
|
2
2
|
|
|
3
3
|
## Citation of rsspolymlp
|
|
4
4
|
|
|
5
5
|
If you use `rsspolymlp` in your study, please cite the following articles.
|
|
6
6
|
|
|
7
|
-
“
|
|
7
|
+
“Systematic global structure search of bismuth-based binary systems under pressure using machine learning potentials”, [Phys. Rev. Materials 10, 093801 (2026)](https://doi.org/10.1103/k9sg-v7hl)
|
|
8
8
|
```
|
|
9
|
-
@article{
|
|
10
|
-
title=
|
|
11
|
-
author={Hayato
|
|
12
|
-
journal={
|
|
13
|
-
volume={
|
|
14
|
-
|
|
15
|
-
pages={
|
|
16
|
-
|
|
17
|
-
|
|
9
|
+
@article{Phys.Rev.Mater.10.093801,
|
|
10
|
+
title = {Systematic global structure search of bismuth-based binary systems under pressure using machine learning potentials},
|
|
11
|
+
author = {Wakai, Hayato and Ishiwata, Shintaro and Seko, Atsuto},
|
|
12
|
+
journal = {Phys. Rev. Mater.},
|
|
13
|
+
volume = {10},
|
|
14
|
+
issue = {9},
|
|
15
|
+
pages = {093801},
|
|
16
|
+
numpages = {28},
|
|
17
|
+
year = {2026},
|
|
18
|
+
month = {Sep},
|
|
19
|
+
publisher = {American Physical Society},
|
|
20
|
+
doi = {10.1103/k9sg-v7hl},
|
|
21
|
+
url = {https://link.aps.org/doi/10.1103/k9sg-v7hl}
|
|
18
22
|
}
|
|
19
23
|
```
|
|
20
24
|
|
|
@@ -30,8 +34,8 @@ If you use `rsspolymlp` in your study, please cite the following articles.
|
|
|
30
34
|
- symfc
|
|
31
35
|
|
|
32
36
|
[Optional]
|
|
33
|
-
- matplotlib
|
|
34
|
-
-
|
|
37
|
+
- matplotlib, seaborn
|
|
38
|
+
- pymatgen
|
|
35
39
|
|
|
36
40
|
### How to install
|
|
37
41
|
- Install from conda-forge
|
|
@@ -60,9 +64,8 @@ pip install rsspolymlp
|
|
|
60
64
|
- Initial structure generation
|
|
61
65
|
- Global RSS with polynomial MLPs
|
|
62
66
|
- Unique structure identification and RSS result summarization
|
|
63
|
-
- Ghost minimum structure elimination
|
|
64
67
|
- Phase stability analysis
|
|
65
|
-
- [Development kit for polynomial MLPs](docs/
|
|
68
|
+
- [Development kit for polynomial MLPs](docs/rsspolymlp_dev.md)
|
|
66
69
|
- MLP dataset generation
|
|
67
70
|
- DFT dataset division
|
|
68
71
|
- Polynomial MLP development
|
|
@@ -8,9 +8,8 @@ import shutil
|
|
|
8
8
|
import numpy as np
|
|
9
9
|
from sklearn.cluster import KMeans
|
|
10
10
|
|
|
11
|
-
from pypolymlp.core.interface_vasp import Vasprun
|
|
12
11
|
from pypolymlp.core.units import EVtoGPa
|
|
13
|
-
from rsspolymlp.common.
|
|
12
|
+
from rsspolymlp.common.interface_vasp import parse_properties_from_vasprun
|
|
14
13
|
|
|
15
14
|
|
|
16
15
|
def detect_ghost_minima(energies: np.array, distances: np.array):
|
|
@@ -118,7 +117,7 @@ def get_ghost_minima_dists(dir_path):
|
|
|
118
117
|
|
|
119
118
|
def ghost_minima_candidates(result_paths):
|
|
120
119
|
# Prepare output directory: remove existing files if already exists
|
|
121
|
-
out_dir = "ghost_minima/
|
|
120
|
+
out_dir = "ghost_minima/ghost_minima_cands"
|
|
122
121
|
os.makedirs(out_dir, exist_ok=True)
|
|
123
122
|
for filename in os.listdir(out_dir):
|
|
124
123
|
if "POSCAR" in filename:
|
|
@@ -136,14 +135,14 @@ def ghost_minima_candidates(result_paths):
|
|
|
136
135
|
logname = os.path.basename(res_path).split(".json")[0]
|
|
137
136
|
for res in rss_results:
|
|
138
137
|
if res.get("is_ghost_minima"):
|
|
139
|
-
dest = f"ghost_minima/
|
|
138
|
+
dest = f"ghost_minima/ghost_minima_cands/POSCAR_{logname}_No{res['struct_tag']}"
|
|
140
139
|
shutil.copy(res["struct_path"], dest)
|
|
141
140
|
_res = res
|
|
142
141
|
_res.pop("structure", None)
|
|
143
|
-
_res["ghost_minima_poscar"] = f"POSCAR_{logname}_No{res['
|
|
142
|
+
_res["ghost_minima_poscar"] = f"POSCAR_{logname}_No{res['struct_tag']}"
|
|
144
143
|
ghost_minima_all.append(_res)
|
|
145
144
|
|
|
146
|
-
with open("ghost_minima/
|
|
145
|
+
with open("ghost_minima/ghost_minima_cands.dat", "w") as f:
|
|
147
146
|
for res in ghost_minima_all:
|
|
148
147
|
print(res, file=f)
|
|
149
148
|
print(f"Detected {len(ghost_minima_all)} potential ghost_minima")
|
|
@@ -152,7 +151,7 @@ def ghost_minima_candidates(result_paths):
|
|
|
152
151
|
def detect_actual_ghost_minima(dft_path):
|
|
153
152
|
# Load ghost_minima candidates
|
|
154
153
|
ghost_minima_all = []
|
|
155
|
-
with open("ghost_minima/
|
|
154
|
+
with open("ghost_minima/ghost_minima_cands.dat") as f:
|
|
156
155
|
for line in f:
|
|
157
156
|
ghost_minima_all.append(ast.literal_eval(line.strip()))
|
|
158
157
|
|
|
@@ -165,7 +164,9 @@ def detect_actual_ghost_minima(dft_path):
|
|
|
165
164
|
vasprun_get = False
|
|
166
165
|
for vasprun in vasprun_paths:
|
|
167
166
|
try:
|
|
168
|
-
|
|
167
|
+
structure, (energy_dft, _, stress_dft) = parse_properties_from_vasprun(
|
|
168
|
+
vasprun, units="GPa"
|
|
169
|
+
)
|
|
169
170
|
vasprun_get = True
|
|
170
171
|
except Exception:
|
|
171
172
|
continue
|
|
@@ -182,22 +183,17 @@ def detect_actual_ghost_minima(dft_path):
|
|
|
182
183
|
)
|
|
183
184
|
continue
|
|
184
185
|
|
|
185
|
-
energy_dft = vaspobj.energy
|
|
186
|
-
structure = vaspobj.structure
|
|
187
|
-
for element in structure.elements:
|
|
188
|
-
energy_dft -= atomic_energy(element)
|
|
189
|
-
energy_dft /= len(structure.elements)
|
|
190
186
|
vol_per_atom = structure.volume / len(structure.elements)
|
|
191
187
|
|
|
192
|
-
# Subtract pressure term from MLP enthalpy
|
|
193
188
|
mlp_energy = res["energy"]
|
|
194
189
|
mlp_energy -= pressure * vol_per_atom / EVtoGPa
|
|
190
|
+
energy_dft /= len(structure.elements)
|
|
191
|
+
e_diff = mlp_energy - energy_dft
|
|
195
192
|
|
|
196
|
-
stress_dft = [
|
|
193
|
+
stress_dft = [stress_dft[i][i] for i in range(3)]
|
|
197
194
|
press_diff = [pressure - stress_dft[i] for i in range(3)]
|
|
198
195
|
stress_diff = np.max(np.abs(press_diff)) * vol_per_atom / EVtoGPa
|
|
199
196
|
|
|
200
|
-
e_diff = mlp_energy - energy_dft
|
|
201
197
|
diff_all.append(
|
|
202
198
|
{
|
|
203
199
|
"energy_diff": e_diff,
|
|
@@ -221,8 +217,8 @@ def detect_actual_ghost_minima(dft_path):
|
|
|
221
217
|
|
|
222
218
|
print(f" - structure: {poscar}", file=f)
|
|
223
219
|
if not delta_e == "null":
|
|
224
|
-
print(f" energy_diff_meV_per_atom: {delta_e*1000:.3f}", file=f)
|
|
225
|
-
print(f" stress_diff_meV_per_atom: {delta_s*1000:.3f}", file=f)
|
|
220
|
+
print(f" energy_diff_meV_per_atom: {delta_e * 1000:.3f}", file=f)
|
|
221
|
+
print(f" stress_diff_meV_per_atom: {delta_s * 1000:.3f}", file=f)
|
|
226
222
|
e_threshold = -0.1 # unit: eV/atom
|
|
227
223
|
s_threshold = 0.5
|
|
228
224
|
if delta_e < e_threshold or delta_s > s_threshold:
|
|
@@ -7,9 +7,8 @@ import numpy as np
|
|
|
7
7
|
import yaml
|
|
8
8
|
from scipy.spatial import ConvexHull
|
|
9
9
|
|
|
10
|
-
from pypolymlp.core.interface_vasp import Vasprun
|
|
11
|
-
from rsspolymlp.common.atomic_energy import atomic_energy
|
|
12
10
|
from rsspolymlp.common.composition import compute_composition
|
|
11
|
+
from rsspolymlp.common.interface_vasp import parse_properties_from_vasprun
|
|
13
12
|
|
|
14
13
|
|
|
15
14
|
class ConvexHullAnalyzer:
|
|
@@ -247,9 +246,9 @@ class ConvexHullAnalyzer:
|
|
|
247
246
|
def parse_results(self, input_paths, ghost_minima_file=None, parse_vasp=False):
|
|
248
247
|
"""
|
|
249
248
|
Populate composition_data by parsing RSS JSON or VASP vasprun.xml outputs.
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
249
|
+
input_paths: List of RSS JSON files or VASP directories.
|
|
250
|
+
ghost_minima_file: YAML file listing ghost minima to exclude (RSS only).
|
|
251
|
+
parse_vasp: If True, parse VASP outputs; otherwise parse RSS JSON.
|
|
253
252
|
"""
|
|
254
253
|
if parse_vasp:
|
|
255
254
|
self._parse_vasp_results(input_paths)
|
|
@@ -294,7 +293,7 @@ class ConvexHullAnalyzer:
|
|
|
294
293
|
[r["is_ghost_minima"] for r in rss_results]
|
|
295
294
|
),
|
|
296
295
|
"struct_tag": np.array(
|
|
297
|
-
[f"POSCAR_{logname}_No{r['
|
|
296
|
+
[f"POSCAR_{logname}_No{r['struct_tag']}" for r in rss_results]
|
|
298
297
|
),
|
|
299
298
|
}
|
|
300
299
|
|
|
@@ -319,15 +318,13 @@ class ConvexHullAnalyzer:
|
|
|
319
318
|
for dft_path in input_paths:
|
|
320
319
|
vasprun_path = f"{dft_path}/vasprun.xml"
|
|
321
320
|
try:
|
|
322
|
-
|
|
321
|
+
structure, (energy_dft, _, _) = parse_properties_from_vasprun(
|
|
322
|
+
vasprun_path
|
|
323
|
+
)
|
|
323
324
|
except Exception:
|
|
324
325
|
print(vasprun_path, "failed")
|
|
325
326
|
continue
|
|
326
327
|
|
|
327
|
-
energy_dft = vaspobj.energy
|
|
328
|
-
structure = vaspobj.structure
|
|
329
|
-
for element in structure.elements:
|
|
330
|
-
energy_dft -= atomic_energy(element)
|
|
331
328
|
energy_dft /= len(structure.elements)
|
|
332
329
|
if energy_dft < -15:
|
|
333
330
|
print(vasprun_path, "exhibits very low energy:", energy_dft, "eV/atom")
|