pymdkit 1.2.0__tar.gz → 1.2.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.
- {pymdkit-1.2.0/src/pymdkit.egg-info → pymdkit-1.2.1}/PKG-INFO +2 -7
- {pymdkit-1.2.0 → pymdkit-1.2.1}/README.md +1 -2
- {pymdkit-1.2.0 → pymdkit-1.2.1}/pyproject.toml +2 -6
- {pymdkit-1.2.0 → pymdkit-1.2.1}/src/pymdkit/__init__.py +1 -1
- {pymdkit-1.2.0 → pymdkit-1.2.1}/src/pymdkit/commands/compute_msd_all_groups.py +4 -3
- {pymdkit-1.2.0 → pymdkit-1.2.1}/src/pymdkit/commands/stable_entry.py +24 -3
- {pymdkit-1.2.0 → pymdkit-1.2.1/src/pymdkit.egg-info}/PKG-INFO +2 -7
- {pymdkit-1.2.0 → pymdkit-1.2.1}/src/pymdkit.egg-info/requires.txt +0 -4
- {pymdkit-1.2.0 → pymdkit-1.2.1}/LICENSE +0 -0
- {pymdkit-1.2.0 → pymdkit-1.2.1}/setup.cfg +0 -0
- {pymdkit-1.2.0 → pymdkit-1.2.1}/src/pymdkit/commands/__init__.py +0 -0
- {pymdkit-1.2.0 → pymdkit-1.2.1}/src/pymdkit/commands/_fileio.py +0 -0
- {pymdkit-1.2.0 → pymdkit-1.2.1}/src/pymdkit/commands/_vasp_output.py +0 -0
- {pymdkit-1.2.0 → pymdkit-1.2.1}/src/pymdkit/commands/_vaspset.py +0 -0
- {pymdkit-1.2.0 → pymdkit-1.2.1}/src/pymdkit/commands/add_groups.py +0 -0
- {pymdkit-1.2.0 → pymdkit-1.2.1}/src/pymdkit/commands/compute_ehull.py +0 -0
- {pymdkit-1.2.0 → pymdkit-1.2.1}/src/pymdkit/commands/compute_rmsd.py +0 -0
- {pymdkit-1.2.0 → pymdkit-1.2.1}/src/pymdkit/commands/electrostatic_energy.py +0 -0
- {pymdkit-1.2.0 → pymdkit-1.2.1}/src/pymdkit/commands/final_energy.py +0 -0
- {pymdkit-1.2.0 → pymdkit-1.2.1}/src/pymdkit/commands/gather_contcar.py +0 -0
- {pymdkit-1.2.0 → pymdkit-1.2.1}/src/pymdkit/commands/nep_rmse.py +0 -0
- {pymdkit-1.2.0 → pymdkit-1.2.1}/src/pymdkit/commands/perturb.py +0 -0
- {pymdkit-1.2.0 → pymdkit-1.2.1}/src/pymdkit/commands/stru2xyz.py +0 -0
- {pymdkit-1.2.0 → pymdkit-1.2.1}/src/pymdkit/commands/submit_vasp.py +0 -0
- {pymdkit-1.2.0 → pymdkit-1.2.1}/src/pymdkit/commands/substitute.py +0 -0
- {pymdkit-1.2.0 → pymdkit-1.2.1}/src/pymdkit/commands/supercell.py +0 -0
- {pymdkit-1.2.0 → pymdkit-1.2.1}/src/pymdkit/commands/symmetrize.py +0 -0
- {pymdkit-1.2.0 → pymdkit-1.2.1}/src/pymdkit/commands/vasp2xyz.py +0 -0
- {pymdkit-1.2.0 → pymdkit-1.2.1}/src/pymdkit/commands/vasp_relax.py +0 -0
- {pymdkit-1.2.0 → pymdkit-1.2.1}/src/pymdkit/commands/vasp_static.py +0 -0
- {pymdkit-1.2.0 → pymdkit-1.2.1}/src/pymdkit/pymdkit_main.py +0 -0
- {pymdkit-1.2.0 → pymdkit-1.2.1}/src/pymdkit.egg-info/SOURCES.txt +0 -0
- {pymdkit-1.2.0 → pymdkit-1.2.1}/src/pymdkit.egg-info/dependency_links.txt +0 -0
- {pymdkit-1.2.0 → pymdkit-1.2.1}/src/pymdkit.egg-info/entry_points.txt +0 -0
- {pymdkit-1.2.0 → pymdkit-1.2.1}/src/pymdkit.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pymdkit
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.1
|
|
4
4
|
Summary: A unified command-line toolkit for atomistic / MD structure workflows.
|
|
5
5
|
Author-email: Yueda Wang <ydwang0608@ustc.edu.cn>
|
|
6
6
|
License-Expression: GPL-3.0-or-later
|
|
@@ -14,13 +14,9 @@ Requires-Python: >=3.9
|
|
|
14
14
|
Description-Content-Type: text/markdown
|
|
15
15
|
License-File: LICENSE
|
|
16
16
|
Requires-Dist: numpy
|
|
17
|
-
Requires-Dist: scipy
|
|
18
17
|
Requires-Dist: ase
|
|
19
18
|
Requires-Dist: pymatgen
|
|
20
|
-
Requires-Dist: mp_api
|
|
21
19
|
Requires-Dist: pyxtal
|
|
22
|
-
Requires-Dist: gemmi
|
|
23
|
-
Requires-Dist: tqdm
|
|
24
20
|
Requires-Dist: dpdata
|
|
25
21
|
Dynamic: license-file
|
|
26
22
|
|
|
@@ -45,8 +41,7 @@ pip install pymdkit
|
|
|
45
41
|
```
|
|
46
42
|
|
|
47
43
|
This installs the `pymdkit` command into the active conda environment, together
|
|
48
|
-
with its dependencies (numpy,
|
|
49
|
-
tqdm).
|
|
44
|
+
with its direct dependencies (numpy, ase, pymatgen, pyxtal, dpdata). Some of these packages may install their own transitive dependencies.
|
|
50
45
|
|
|
51
46
|
Verify:
|
|
52
47
|
|
|
@@ -19,8 +19,7 @@ pip install pymdkit
|
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
This installs the `pymdkit` command into the active conda environment, together
|
|
22
|
-
with its dependencies (numpy,
|
|
23
|
-
tqdm).
|
|
22
|
+
with its direct dependencies (numpy, ase, pymatgen, pyxtal, dpdata). Some of these packages may install their own transitive dependencies.
|
|
24
23
|
|
|
25
24
|
Verify:
|
|
26
25
|
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "pymdkit"
|
|
7
|
-
version = "1.2.
|
|
7
|
+
version = "1.2.1"
|
|
8
8
|
description = "A unified command-line toolkit for atomistic / MD structure workflows."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.9"
|
|
@@ -25,13 +25,9 @@ classifiers = [
|
|
|
25
25
|
# individual commands, so the dispatcher and `pymdkit -help` stay fast.
|
|
26
26
|
dependencies = [
|
|
27
27
|
"numpy",
|
|
28
|
-
"scipy",
|
|
29
28
|
"ase",
|
|
30
29
|
"pymatgen",
|
|
31
|
-
"
|
|
32
|
-
"pyxtal",
|
|
33
|
-
"gemmi",
|
|
34
|
-
"tqdm",
|
|
30
|
+
"pyxtal",
|
|
35
31
|
"dpdata",
|
|
36
32
|
]
|
|
37
33
|
|
|
@@ -25,7 +25,6 @@ from pathlib import Path
|
|
|
25
25
|
from typing import Dict, Tuple
|
|
26
26
|
|
|
27
27
|
import numpy as np
|
|
28
|
-
import scipy.constants as consts
|
|
29
28
|
|
|
30
29
|
try:
|
|
31
30
|
from . import _fileio
|
|
@@ -37,6 +36,8 @@ HELP = "Diffusivity & conductivity from GPUMD MSD jobs (auto-scans <structure>/<
|
|
|
37
36
|
|
|
38
37
|
JOB_FILES = ("msd.out", "thermo.out", "model.xyz", "run.in")
|
|
39
38
|
SUMMARY_FILE = "msd_summary.txt"
|
|
39
|
+
ELEMENTARY_CHARGE_C = 1.602176634e-19
|
|
40
|
+
BOLTZMANN_J_PER_K = 1.380649e-23
|
|
40
41
|
|
|
41
42
|
|
|
42
43
|
class MDAnalyzer:
|
|
@@ -176,8 +177,8 @@ class MDAnalyzer:
|
|
|
176
177
|
def calculate_conductivity(self, diffusivities, num_ions, charge) -> np.ndarray:
|
|
177
178
|
"""Nernst-Einstein conductivity in mS/cm."""
|
|
178
179
|
vol_cm3 = self.volume * 1e-24
|
|
179
|
-
factor = (num_ions * charge ** 2 *
|
|
180
|
-
/ (vol_cm3 *
|
|
180
|
+
factor = (num_ions * charge ** 2 * ELEMENTARY_CHARGE_C ** 2
|
|
181
|
+
/ (vol_cm3 * BOLTZMANN_J_PER_K * self.temperature))
|
|
181
182
|
return diffusivities * factor * 1000 # S/cm -> mS/cm
|
|
182
183
|
|
|
183
184
|
def _format_summary(self, element, group_id, num_ions, temp, D, sigma=None) -> str:
|
|
@@ -11,7 +11,28 @@ HELP = "Download stable Materials Project structures for a chemical system."
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
def safe_formula(formula):
|
|
14
|
-
return re.sub(r"[^A-Za-z0-9_.-]+", "", formula)
|
|
14
|
+
return re.sub(r"[^A-Za-z0-9_.-]+", "", str(formula))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def entry_id_text(entry):
|
|
18
|
+
entry_id = getattr(entry, "entry_id", "")
|
|
19
|
+
if isinstance(entry_id, dict):
|
|
20
|
+
for key in ("material_id", "task_id", "entry_id", "id"):
|
|
21
|
+
if entry_id.get(key):
|
|
22
|
+
return str(entry_id[key])
|
|
23
|
+
return "-".join(f"{k}-{v}" for k, v in sorted(entry_id.items()))
|
|
24
|
+
if entry_id:
|
|
25
|
+
return str(entry_id)
|
|
26
|
+
data = getattr(entry, "data", {}) or {}
|
|
27
|
+
for key in ("material_id", "task_id", "entry_id", "id"):
|
|
28
|
+
if data.get(key):
|
|
29
|
+
return str(data[key])
|
|
30
|
+
return "unknown"
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def entry_sort_key(entry):
|
|
34
|
+
formula = str(entry.composition.reduced_formula)
|
|
35
|
+
return (len(entry.composition.elements), formula, entry_id_text(entry))
|
|
15
36
|
|
|
16
37
|
|
|
17
38
|
def add_arguments(parser: argparse.ArgumentParser) -> None:
|
|
@@ -36,10 +57,10 @@ def run(args) -> int:
|
|
|
36
57
|
additional_criteria={"thermo_types": ["GGA_GGA+U"], "is_stable": True},
|
|
37
58
|
)
|
|
38
59
|
|
|
39
|
-
entries = sorted(entries, key=
|
|
60
|
+
entries = sorted(entries, key=entry_sort_key)
|
|
40
61
|
written = 0
|
|
41
62
|
for entry in entries:
|
|
42
|
-
mpid =
|
|
63
|
+
mpid = safe_formula(entry_id_text(entry).split(" ")[0])
|
|
43
64
|
formula = safe_formula(entry.composition.reduced_formula)
|
|
44
65
|
path = out_dir / f"{mpid}-{formula}.cif"
|
|
45
66
|
CifWriter(entry.structure).write_file(str(path))
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pymdkit
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.1
|
|
4
4
|
Summary: A unified command-line toolkit for atomistic / MD structure workflows.
|
|
5
5
|
Author-email: Yueda Wang <ydwang0608@ustc.edu.cn>
|
|
6
6
|
License-Expression: GPL-3.0-or-later
|
|
@@ -14,13 +14,9 @@ Requires-Python: >=3.9
|
|
|
14
14
|
Description-Content-Type: text/markdown
|
|
15
15
|
License-File: LICENSE
|
|
16
16
|
Requires-Dist: numpy
|
|
17
|
-
Requires-Dist: scipy
|
|
18
17
|
Requires-Dist: ase
|
|
19
18
|
Requires-Dist: pymatgen
|
|
20
|
-
Requires-Dist: mp_api
|
|
21
19
|
Requires-Dist: pyxtal
|
|
22
|
-
Requires-Dist: gemmi
|
|
23
|
-
Requires-Dist: tqdm
|
|
24
20
|
Requires-Dist: dpdata
|
|
25
21
|
Dynamic: license-file
|
|
26
22
|
|
|
@@ -45,8 +41,7 @@ pip install pymdkit
|
|
|
45
41
|
```
|
|
46
42
|
|
|
47
43
|
This installs the `pymdkit` command into the active conda environment, together
|
|
48
|
-
with its dependencies (numpy,
|
|
49
|
-
tqdm).
|
|
44
|
+
with its direct dependencies (numpy, ase, pymatgen, pyxtal, dpdata). Some of these packages may install their own transitive dependencies.
|
|
50
45
|
|
|
51
46
|
Verify:
|
|
52
47
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|