pymdkit 1.4.8__tar.gz → 1.4.9__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 (50) hide show
  1. {pymdkit-1.4.8 → pymdkit-1.4.9}/PKG-INFO +37 -9
  2. {pymdkit-1.4.8 → pymdkit-1.4.9}/README.md +265 -236
  3. {pymdkit-1.4.8 → pymdkit-1.4.9}/pyproject.toml +1 -2
  4. {pymdkit-1.4.8 → pymdkit-1.4.9}/src/pymdkit/__init__.py +1 -1
  5. pymdkit-1.4.9/src/pymdkit/commands/_cifio.py +192 -0
  6. {pymdkit-1.4.8 → pymdkit-1.4.9}/src/pymdkit/commands/chemsys_entry.py +6 -6
  7. pymdkit-1.4.9/src/pymdkit/commands/compute_rmsd.py +280 -0
  8. {pymdkit-1.4.8 → pymdkit-1.4.9}/src/pymdkit/commands/convert.py +10 -2
  9. {pymdkit-1.4.8 → pymdkit-1.4.9}/src/pymdkit/commands/gather_fs.py +25 -5
  10. {pymdkit-1.4.8 → pymdkit-1.4.9}/src/pymdkit/commands/gpumd_group.py +7 -2
  11. {pymdkit-1.4.8 → pymdkit-1.4.9}/src/pymdkit/commands/substitute.py +3 -3
  12. {pymdkit-1.4.8 → pymdkit-1.4.9}/src/pymdkit/commands/supercell.py +13 -7
  13. pymdkit-1.4.9/src/pymdkit/commands/symmetrize.py +289 -0
  14. {pymdkit-1.4.8 → pymdkit-1.4.9}/src/pymdkit.egg-info/PKG-INFO +37 -9
  15. {pymdkit-1.4.8 → pymdkit-1.4.9}/src/pymdkit.egg-info/SOURCES.txt +1 -0
  16. {pymdkit-1.4.8 → pymdkit-1.4.9}/src/pymdkit.egg-info/requires.txt +0 -1
  17. pymdkit-1.4.8/src/pymdkit/commands/compute_rmsd.py +0 -139
  18. pymdkit-1.4.8/src/pymdkit/commands/symmetrize.py +0 -446
  19. {pymdkit-1.4.8 → pymdkit-1.4.9}/LICENSE +0 -0
  20. {pymdkit-1.4.8 → pymdkit-1.4.9}/setup.cfg +0 -0
  21. {pymdkit-1.4.8 → pymdkit-1.4.9}/src/pymdkit/commands/__init__.py +0 -0
  22. {pymdkit-1.4.8 → pymdkit-1.4.9}/src/pymdkit/commands/_extxyz.py +0 -0
  23. {pymdkit-1.4.8 → pymdkit-1.4.9}/src/pymdkit/commands/_fileio.py +0 -0
  24. {pymdkit-1.4.8 → pymdkit-1.4.9}/src/pymdkit/commands/_geometry.py +0 -0
  25. {pymdkit-1.4.8 → pymdkit-1.4.9}/src/pymdkit/commands/_gpumd.py +0 -0
  26. {pymdkit-1.4.8 → pymdkit-1.4.9}/src/pymdkit/commands/_reduction.py +0 -0
  27. {pymdkit-1.4.8 → pymdkit-1.4.9}/src/pymdkit/commands/_vasp_output.py +0 -0
  28. {pymdkit-1.4.8 → pymdkit-1.4.9}/src/pymdkit/commands/_vaspset.py +0 -0
  29. {pymdkit-1.4.8 → pymdkit-1.4.9}/src/pymdkit/commands/add_config_type.py +0 -0
  30. {pymdkit-1.4.8 → pymdkit-1.4.9}/src/pymdkit/commands/compute_ehull.py +0 -0
  31. {pymdkit-1.4.8 → pymdkit-1.4.9}/src/pymdkit/commands/compute_msd_all_groups.py +0 -0
  32. {pymdkit-1.4.8 → pymdkit-1.4.9}/src/pymdkit/commands/ewald.py +0 -0
  33. {pymdkit-1.4.8 → pymdkit-1.4.9}/src/pymdkit/commands/gpumd_relax.py +0 -0
  34. {pymdkit-1.4.8 → pymdkit-1.4.9}/src/pymdkit/commands/gpumd_thermo.py +0 -0
  35. {pymdkit-1.4.8 → pymdkit-1.4.9}/src/pymdkit/commands/gpumd_trjcat.py +0 -0
  36. {pymdkit-1.4.8 → pymdkit-1.4.9}/src/pymdkit/commands/nep_rmse.py +0 -0
  37. {pymdkit-1.4.8 → pymdkit-1.4.9}/src/pymdkit/commands/pca.py +0 -0
  38. {pymdkit-1.4.8 → pymdkit-1.4.9}/src/pymdkit/commands/perturb.py +0 -0
  39. {pymdkit-1.4.8 → pymdkit-1.4.9}/src/pymdkit/commands/submit_vasp.py +0 -0
  40. {pymdkit-1.4.8 → pymdkit-1.4.9}/src/pymdkit/commands/trj_extract.py +0 -0
  41. {pymdkit-1.4.8 → pymdkit-1.4.9}/src/pymdkit/commands/trj_sparse.py +0 -0
  42. {pymdkit-1.4.8 → pymdkit-1.4.9}/src/pymdkit/commands/umap.py +0 -0
  43. {pymdkit-1.4.8 → pymdkit-1.4.9}/src/pymdkit/commands/vasp2xyz.py +0 -0
  44. {pymdkit-1.4.8 → pymdkit-1.4.9}/src/pymdkit/commands/vasp_fe.py +0 -0
  45. {pymdkit-1.4.8 → pymdkit-1.4.9}/src/pymdkit/commands/vasp_relax.py +0 -0
  46. {pymdkit-1.4.8 → pymdkit-1.4.9}/src/pymdkit/commands/vasp_static.py +0 -0
  47. {pymdkit-1.4.8 → pymdkit-1.4.9}/src/pymdkit/pymdkit_main.py +0 -0
  48. {pymdkit-1.4.8 → pymdkit-1.4.9}/src/pymdkit.egg-info/dependency_links.txt +0 -0
  49. {pymdkit-1.4.8 → pymdkit-1.4.9}/src/pymdkit.egg-info/entry_points.txt +0 -0
  50. {pymdkit-1.4.8 → pymdkit-1.4.9}/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.4.8
3
+ Version: 1.4.9
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
@@ -18,7 +18,6 @@ Requires-Dist: ase
18
18
  Requires-Dist: pymatgen
19
19
  Requires-Dist: mp-api
20
20
  Requires-Dist: py4vasp-core
21
- Requires-Dist: pyxtal
22
21
  Requires-Dist: dpdata
23
22
  Requires-Dist: matplotlib
24
23
  Requires-Dist: umap-learn
@@ -81,12 +80,12 @@ directory for job sub-folders automatically.
81
80
  | `perturb` | Generate perturbed structures with dpdata |
82
81
  | `vasp2xyz` | Collect SCF-converged VASP job folders (any name) into one extxyz file |
83
82
  | `submit-vasp` | Submit/resubmit VASP job folders while limiting active queue jobs |
84
- | `rmsd` | Compute RMSD between two structure files, or all pairs in a folder |
83
+ | `rmsd` | Compare structures by RMSD and optionally remove higher-energy duplicates |
85
84
  | `chemsys-entry` | Download stable Materials Project structures for a chemical system |
86
85
  | `convert` | Convert structures, trajectories, or folders between ASE/pymatgen formats |
87
86
  | `substitute` | Randomly substitute or remove selected atoms/sites from a structure |
88
87
  | `supercell` | Build a supercell with cell lengths capped at a maximum (Angstrom); optional per-temperature GPUMD setup |
89
- | `symmetrize` | Import space-group symmetry into a structure file (or folder) -> CIF |
88
+ | `symmetrize` | Detect/refine symmetry for structure files, folders, or CSV rows -> CIF |
90
89
  | `vasp-relax` | Write VASP relaxation inputs for a structure (or folder); INCAR tags overridable |
91
90
  | `vasp-static` | Write VASP static / single-point inputs for a structure (or folder) |
92
91
 
@@ -145,10 +144,12 @@ pmk gpumd-trjcat -all # merge every readable trajectory in
145
144
  pmk trj-extract -it traj.xyz -in run.in -b 100 -e 200 -o traj-100ps-200ps.xyz
146
145
  pmk trj-sparse -it example.xyz -r 0.5 -o sparse-example.xyz
147
146
 
148
- pmk rmsd a.cif b.cif # RMSD of two files -> rmsd.txt
149
- pmk rmsd vasp-opted/ # all pairs in a folder -> rmsd.txt
150
- pmk symmetrize -i opted.cif -symprec 0.01 -add_oxidation yes -o opted-symm.cif
151
- pmk symmetrize -if my_cifs/ -symprec 0.01 -add_oxidation no -of my_cifs-symm
147
+ pmk rmsd -i structure-1.vasp structure-2.vasp # one pair -> rmsd.txt
148
+ pmk rmsd -if vasp-opted # every pair -> rmsd.txt
149
+ pmk rmsd -if example -rm-duplicate -of unique-example # RMSD <= 0.1: keep lowest energy
150
+ pmk symmetrize -i opted.cif -add_oxidation yes -o opted-symm.cif
151
+ pmk symmetrize -if my_cifs/ -symprec 0.02 -add_oxidation no -of my_cifs-symm
152
+ pmk symmetrize -csv output_Li2YCl3_struct.csv -of Li2YCl3
152
153
  ```
153
154
 
154
155
  VASP input commands (`vasp-relax`, `vasp-static`) always produce **individual**
@@ -191,11 +192,35 @@ run 1
191
192
 
192
193
  `gather-fs` recursively scans all job folders below the current directory. For
193
194
  VASP it follows the global `vaspout.h5 > vasprun.xml > OUTCAR` priority and
194
- requires full convergence before copying the selected `-fs-name` as `.vasp`.
195
+ requires full convergence before copying the selected `-fs-name` as `.vasp`. The gathered VASP file's first line is replaced with `energy=<final_energy> eV` for later screening.
195
196
  For GPUMD it requires `gpumd.out` to report a force tolerance and a final
196
197
  `f_max` no greater than that tolerance before copying the final structure.
197
198
  `-fs-name` defaults to `CONTCAR` for VASP and `relaxed.xyz` for GPUMD. The
198
199
  `-ehull` and `-ehull-file` filters are available only with `-job vasp`.
200
+ `rmsd -i STRUCTURE_1 STRUCTURE_2` compares one pair, while `rmsd -if FOLDER`
201
+ records every unique pair in `rmsd.txt`. With `-rm-duplicate -of OUTPUT`, files
202
+ are processed from lowest to highest energy; a structure is removed only when
203
+ its RMSD to an already retained lower-energy representative is no greater than `0.1`. Duplicate removal supports `.vasp`,
204
+ `.xyz`, and `.extxyz`: VASP energy is read from the first line, and extended-XYZ
205
+ energy from the second-line `energy=` tag. The report records every RMSD,
206
+ duplicate decision, energy, group, and retained representative.
207
+
208
+ `symmetrize` uses pymatgen's spglib-backed `SpacegroupAnalyzer` for authoritative
209
+ space-group detection and conventional-cell refinement. Its default Cartesian
210
+ symmetry tolerance is `0.02 Angstrom` (`-symprec`), with a `5 degree` angle
211
+ tolerance (`-angle-tolerance`). CIF occupancies are retained by the pymatgen
212
+ structure and written directly rather than reconstructed after symmetry finding.
213
+ CSV mode reads serialized pymatgen `Structure` dictionaries from a required `cif`
214
+ column. `-csv INPUT.csv -of NAME` writes `INDEX-NAME-SPACEGROUP.cif`, for
215
+ example `1-Li2YCl3-66.cif`.
216
+
217
+ Every CIF exported by `symmetrize`, `convert`, `substitute`, `chemsys-entry`,
218
+ `supercell`, or `gpumd-group` is written through the same symmetry-aware helper.
219
+ The atom-site loop contains both `_atom_site_symmetry_multiplicity` and
220
+ `_atom_site_Wyckoff_symbol`. Multiplicity-letter assignments use the conventional
221
+ International Tables setting from pymatgen/spglib and correspond to the
222
+ [Bilbao Crystallographic Server WYCKPOS tables](https://cryst.ehu.es/cryst/get_wp.html);
223
+ the provenance URL is also recorded inside each generated CIF.
199
224
 
200
225
  `add-config-type` updates its input atomically in place. With `-i`, the file must contain exactly one XYZ structure; use `-it` for a trajectory. Existing `Config_type` values are replaced, missing values are added, and all other extended-XYZ bytes remain unchanged.
201
226
 
@@ -204,6 +229,7 @@ For GPUMD it requires `gpumd.out` to report a force tolerance and a final
204
229
  When `pca` or `umap` receives `-it train.xyz`, it reads `Config_type` from every frame and writes one additional descriptor table per value, such as `pca-descriptor-P-3m1.txt` and `pca-descriptor-Pnma.txt`. With `-fps`, it also writes matching files such as `fps-0.01-pca-descriptor-P-3m1.txt` and `fps-0.01-train-P-3m1.xyz`. These files partition the single global FPS selection; FPS is not rerun independently for each `Config_type`. Frames without `Config_type` remain in the main outputs but do not receive a type-specific file.
205
230
 
206
231
  For folder conversion, `convert -if INPUT -of OUTPUT` writes `.xyz` by default. Set another target extension with `-oe`, for example `-oe cif` or `-oe vasp`. Single-file and trajectory modes infer the target format from `-o` and `-ot`.
232
+ Because Wyckoff metadata describes one crystal structure, each `.cif` output file accepts exactly one frame.
207
233
 
208
234
  `gpumd-thermo` writes `temperature.txt`, `potential-energy.txt`, `pressure.txt`, `lattice-parameters.txt`, `volume.txt`, `lattice-angles.txt`, and a headless `thermo.png` in every detected GPUMD job folder. For an abnormal run it also writes `abnormal-time.txt`, with one `BEGIN ps to END ps` interval per line; a normal rerun removes a stale file. Potential energy is the primary equilibrium signal. Detection requires a persistent change with a meaningful magnitude relative to the robust natural energy fluctuations, so ordinary correlated thermal noise and isolated spikes are not classified as abnormal. An abnormal classification always requires a mapped potential-energy change. When at least two lattice-parameter or volume signals show the same mapped transition, they may enable a more sensitive noise-relative energy test; this avoids a fixed eV or percentage-of-total-energy threshold that would depend on system size. Cell signals can corroborate and refine the energy interval, but can never classify a run by themselves. Temperature and all six pressure components remain diagnostics only and cannot classify an otherwise stationary run as abnormal by themselves. A lone cell-axis drift, an isolated spike, or an empty anomaly mask never triggers a whole-run fallback. Thermo plots use Arial when available and Matplotlib's built-in qualitative `Dark2` color cycle. They plot all six pressure components, use frameless upper-right legends with added vertical headroom, preserve correct Å units, and show abnormal regions as shaded legend entries on potential energy, lattice parameters, and volume. Potential energy and volume are divided by 1000 and labeled ×10³ only when their absolute plotted values reach 1000. The analysis uses the last `run` segment, or the last 80% when `run.in` has no `run` record; inspect the plot before making a final scientific judgment.
209
235
 
@@ -258,6 +284,7 @@ pymdkit/
258
284
  |-- _geometry.py # shared minimum-image geometry helper
259
285
  |-- _vaspset.py # shared VASP input-set helper (not a command)
260
286
  |-- gpumd_group.py
287
+ |-- gpumd_relax.py
261
288
  |-- gpumd_thermo.py
262
289
  |-- gpumd_trjcat.py
263
290
  |-- compute_ehull.py
@@ -267,6 +294,7 @@ pymdkit/
267
294
  |-- perturb.py
268
295
  |-- nep_rmse.py
269
296
  |-- add_config_type.py
297
+ |-- _cifio.py
270
298
  |-- chemsys_entry.py
271
299
  |-- submit_vasp.py
272
300
  |-- convert.py