pymdkit 1.7.3__tar.gz → 1.7.5__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 (104) hide show
  1. pymdkit-1.7.5/CHANGELOG.md +35 -0
  2. {pymdkit-1.7.3/src/pymdkit.egg-info → pymdkit-1.7.5}/PKG-INFO +145 -25
  3. {pymdkit-1.7.3 → pymdkit-1.7.5}/README.md +143 -24
  4. {pymdkit-1.7.3 → pymdkit-1.7.5}/pyproject.toml +2 -1
  5. {pymdkit-1.7.3 → pymdkit-1.7.5}/src/pymdkit/__init__.py +1 -1
  6. pymdkit-1.7.5/src/pymdkit/commands/_ionhop.py +703 -0
  7. pymdkit-1.7.5/src/pymdkit/commands/_msd_reuse.py +249 -0
  8. pymdkit-1.7.5/src/pymdkit/commands/ionhop.py +54 -0
  9. {pymdkit-1.7.3 → pymdkit-1.7.5}/src/pymdkit/commands/msd.py +97 -24
  10. {pymdkit-1.7.3 → pymdkit-1.7.5/src/pymdkit.egg-info}/PKG-INFO +145 -25
  11. {pymdkit-1.7.3 → pymdkit-1.7.5}/src/pymdkit.egg-info/SOURCES.txt +5 -0
  12. {pymdkit-1.7.3 → pymdkit-1.7.5}/src/pymdkit.egg-info/requires.txt +1 -0
  13. pymdkit-1.7.5/tests/test_ionhop.py +248 -0
  14. {pymdkit-1.7.3 → pymdkit-1.7.5}/tests/test_msd_large.py +1 -1
  15. {pymdkit-1.7.3 → pymdkit-1.7.5}/tests/test_msd_phase3.py +134 -7
  16. pymdkit-1.7.5/tests/test_msd_reuse.py +256 -0
  17. pymdkit-1.7.3/CHANGELOG.md +0 -16
  18. {pymdkit-1.7.3 → pymdkit-1.7.5}/LICENSE +0 -0
  19. {pymdkit-1.7.3 → pymdkit-1.7.5}/MANIFEST.in +0 -0
  20. {pymdkit-1.7.3 → pymdkit-1.7.5}/setup.cfg +0 -0
  21. {pymdkit-1.7.3 → pymdkit-1.7.5}/src/pymdkit/_config.py +0 -0
  22. {pymdkit-1.7.3 → pymdkit-1.7.5}/src/pymdkit/_logging.py +0 -0
  23. {pymdkit-1.7.3 → pymdkit-1.7.5}/src/pymdkit/commands/__init__.py +0 -0
  24. {pymdkit-1.7.3 → pymdkit-1.7.5}/src/pymdkit/commands/_cifio.py +0 -0
  25. {pymdkit-1.7.3 → pymdkit-1.7.5}/src/pymdkit/commands/_extxyz.py +0 -0
  26. {pymdkit-1.7.3 → pymdkit-1.7.5}/src/pymdkit/commands/_fileio.py +0 -0
  27. {pymdkit-1.7.3 → pymdkit-1.7.5}/src/pymdkit/commands/_geometry.py +0 -0
  28. {pymdkit-1.7.3 → pymdkit-1.7.5}/src/pymdkit/commands/_gpumd.py +0 -0
  29. {pymdkit-1.7.3 → pymdkit-1.7.5}/src/pymdkit/commands/_gpumd_final_structure.py +0 -0
  30. {pymdkit-1.7.3 → pymdkit-1.7.5}/src/pymdkit/commands/_gpumd_msd.py +0 -0
  31. {pymdkit-1.7.3 → pymdkit-1.7.5}/src/pymdkit/commands/_gpumd_run.py +0 -0
  32. {pymdkit-1.7.3 → pymdkit-1.7.5}/src/pymdkit/commands/_gpumd_status.py +0 -0
  33. {pymdkit-1.7.3 → pymdkit-1.7.5}/src/pymdkit/commands/_gpumd_thermo.py +0 -0
  34. {pymdkit-1.7.3 → pymdkit-1.7.5}/src/pymdkit/commands/_lattice.py +0 -0
  35. {pymdkit-1.7.3 → pymdkit-1.7.5}/src/pymdkit/commands/_msd_auto.py +0 -0
  36. {pymdkit-1.7.3 → pymdkit-1.7.5}/src/pymdkit/commands/_msd_conductivity.py +0 -0
  37. {pymdkit-1.7.3 → pymdkit-1.7.5}/src/pymdkit/commands/_msd_coordinates.py +0 -0
  38. {pymdkit-1.7.3 → pymdkit-1.7.5}/src/pymdkit/commands/_msd_fit.py +0 -0
  39. {pymdkit-1.7.3 → pymdkit-1.7.5}/src/pymdkit/commands/_msd_io.py +0 -0
  40. {pymdkit-1.7.3 → pymdkit-1.7.5}/src/pymdkit/commands/_msd_provenance.py +0 -0
  41. {pymdkit-1.7.3 → pymdkit-1.7.5}/src/pymdkit/commands/_msd_range.py +0 -0
  42. {pymdkit-1.7.3 → pymdkit-1.7.5}/src/pymdkit/commands/_msd_thermo.py +0 -0
  43. {pymdkit-1.7.3 → pymdkit-1.7.5}/src/pymdkit/commands/_msd_uncertainty.py +0 -0
  44. {pymdkit-1.7.3 → pymdkit-1.7.5}/src/pymdkit/commands/_oxidation.py +0 -0
  45. {pymdkit-1.7.3 → pymdkit-1.7.5}/src/pymdkit/commands/_parallel.py +0 -0
  46. {pymdkit-1.7.3 → pymdkit-1.7.5}/src/pymdkit/commands/_precision.py +0 -0
  47. {pymdkit-1.7.3 → pymdkit-1.7.5}/src/pymdkit/commands/_pred_msd_plan.py +0 -0
  48. {pymdkit-1.7.3 → pymdkit-1.7.5}/src/pymdkit/commands/_pred_msd_reference.py +0 -0
  49. {pymdkit-1.7.3 → pymdkit-1.7.5}/src/pymdkit/commands/_reduction.py +0 -0
  50. {pymdkit-1.7.3 → pymdkit-1.7.5}/src/pymdkit/commands/_submit.py +0 -0
  51. {pymdkit-1.7.3 → pymdkit-1.7.5}/src/pymdkit/commands/_submit_vasp.py +0 -0
  52. {pymdkit-1.7.3 → pymdkit-1.7.5}/src/pymdkit/commands/_supercell.py +0 -0
  53. {pymdkit-1.7.3 → pymdkit-1.7.5}/src/pymdkit/commands/_symmetry.py +0 -0
  54. {pymdkit-1.7.3 → pymdkit-1.7.5}/src/pymdkit/commands/_vasp_ehull.py +0 -0
  55. {pymdkit-1.7.3 → pymdkit-1.7.5}/src/pymdkit/commands/_vasp_final_structure.py +0 -0
  56. {pymdkit-1.7.3 → pymdkit-1.7.5}/src/pymdkit/commands/_vasp_nep.py +0 -0
  57. {pymdkit-1.7.3 → pymdkit-1.7.5}/src/pymdkit/commands/_vasp_output.py +0 -0
  58. {pymdkit-1.7.3 → pymdkit-1.7.5}/src/pymdkit/commands/_vaspset.py +0 -0
  59. {pymdkit-1.7.3 → pymdkit-1.7.5}/src/pymdkit/commands/chemsys_entry.py +0 -0
  60. {pymdkit-1.7.3 → pymdkit-1.7.5}/src/pymdkit/commands/compute_rmsd.py +0 -0
  61. {pymdkit-1.7.3 → pymdkit-1.7.5}/src/pymdkit/commands/config.py +0 -0
  62. {pymdkit-1.7.3 → pymdkit-1.7.5}/src/pymdkit/commands/convert.py +0 -0
  63. {pymdkit-1.7.3 → pymdkit-1.7.5}/src/pymdkit/commands/dope.py +0 -0
  64. {pymdkit-1.7.3 → pymdkit-1.7.5}/src/pymdkit/commands/ewald.py +0 -0
  65. {pymdkit-1.7.3 → pymdkit-1.7.5}/src/pymdkit/commands/gpumd_job.py +0 -0
  66. {pymdkit-1.7.3 → pymdkit-1.7.5}/src/pymdkit/commands/gpumd_out.py +0 -0
  67. {pymdkit-1.7.3 → pymdkit-1.7.5}/src/pymdkit/commands/nep_rmse.py +0 -0
  68. {pymdkit-1.7.3 → pymdkit-1.7.5}/src/pymdkit/commands/perturb.py +0 -0
  69. {pymdkit-1.7.3 → pymdkit-1.7.5}/src/pymdkit/commands/pred_msd_time.py +0 -0
  70. {pymdkit-1.7.3 → pymdkit-1.7.5}/src/pymdkit/commands/rd.py +0 -0
  71. {pymdkit-1.7.3 → pymdkit-1.7.5}/src/pymdkit/commands/realloc_occ.py +0 -0
  72. {pymdkit-1.7.3 → pymdkit-1.7.5}/src/pymdkit/commands/submit.py +0 -0
  73. {pymdkit-1.7.3 → pymdkit-1.7.5}/src/pymdkit/commands/supercell.py +0 -0
  74. {pymdkit-1.7.3 → pymdkit-1.7.5}/src/pymdkit/commands/trjconv.py +0 -0
  75. {pymdkit-1.7.3 → pymdkit-1.7.5}/src/pymdkit/commands/vasp_job.py +0 -0
  76. {pymdkit-1.7.3 → pymdkit-1.7.5}/src/pymdkit/commands/vasp_out.py +0 -0
  77. {pymdkit-1.7.3 → pymdkit-1.7.5}/src/pymdkit/pymdkit_main.py +0 -0
  78. {pymdkit-1.7.3 → pymdkit-1.7.5}/src/pymdkit.egg-info/dependency_links.txt +0 -0
  79. {pymdkit-1.7.3 → pymdkit-1.7.5}/src/pymdkit.egg-info/entry_points.txt +0 -0
  80. {pymdkit-1.7.3 → pymdkit-1.7.5}/src/pymdkit.egg-info/top_level.txt +0 -0
  81. {pymdkit-1.7.3 → pymdkit-1.7.5}/tests/data/88-Li2YCl3-63-d1.cif +0 -0
  82. {pymdkit-1.7.3 → pymdkit-1.7.5}/tests/test_config_logging.py +0 -0
  83. {pymdkit-1.7.3 → pymdkit-1.7.5}/tests/test_convert.py +0 -0
  84. {pymdkit-1.7.3 → pymdkit-1.7.5}/tests/test_ehull.py +0 -0
  85. {pymdkit-1.7.3 → pymdkit-1.7.5}/tests/test_gpumd_out.py +0 -0
  86. {pymdkit-1.7.3 → pymdkit-1.7.5}/tests/test_lattice_symmetry.py +0 -0
  87. {pymdkit-1.7.3 → pymdkit-1.7.5}/tests/test_msd_auto.py +0 -0
  88. {pymdkit-1.7.3 → pymdkit-1.7.5}/tests/test_msd_fit.py +0 -0
  89. {pymdkit-1.7.3 → pymdkit-1.7.5}/tests/test_msd_range.py +0 -0
  90. {pymdkit-1.7.3 → pymdkit-1.7.5}/tests/test_msd_uncertainty.py +0 -0
  91. {pymdkit-1.7.3 → pymdkit-1.7.5}/tests/test_parallel.py +0 -0
  92. {pymdkit-1.7.3 → pymdkit-1.7.5}/tests/test_pred_msd_time.py +0 -0
  93. {pymdkit-1.7.3 → pymdkit-1.7.5}/tests/test_progress.py +0 -0
  94. {pymdkit-1.7.3 → pymdkit-1.7.5}/tests/test_realloc_occ.py +0 -0
  95. {pymdkit-1.7.3 → pymdkit-1.7.5}/tests/test_rmsd_gpu.py +0 -0
  96. {pymdkit-1.7.3 → pymdkit-1.7.5}/tests/test_rmsd_max.py +0 -0
  97. {pymdkit-1.7.3 → pymdkit-1.7.5}/tests/test_rmsd_two_folder.py +0 -0
  98. {pymdkit-1.7.3 → pymdkit-1.7.5}/tests/test_submit.py +0 -0
  99. {pymdkit-1.7.3 → pymdkit-1.7.5}/tests/test_v165.py +0 -0
  100. {pymdkit-1.7.3 → pymdkit-1.7.5}/tests/test_v170_job_infrastructure.py +0 -0
  101. {pymdkit-1.7.3 → pymdkit-1.7.5}/tests/test_v170_vasp_consolidation.py +0 -0
  102. {pymdkit-1.7.3 → pymdkit-1.7.5}/tests/test_v172_vasp_writing.py +0 -0
  103. {pymdkit-1.7.3 → pymdkit-1.7.5}/tests/test_vasp_out.py +0 -0
  104. {pymdkit-1.7.3 → pymdkit-1.7.5}/tests/test_vaspset.py +0 -0
@@ -0,0 +1,35 @@
1
+ # Changelog
2
+
3
+ ## 1.7.5
4
+
5
+ - `pmk msd` reuses validated full-trajectory and range results with version-1
6
+ provenance, including compatible 1.7.4 results. Newly calculated and reused
7
+ results share the total-only batch summaries, with rollback if publication
8
+ fails.
9
+ - Add `pmk ionhop` for iodine-aligned Li site hopping in GPUMD trajectories,
10
+ with single and multi-temperature modes and nearest-neighbor hop frequencies.
11
+ SciPy is a direct dependency for the cKDTree CPU backend.
12
+
13
+ ## 1.7.4
14
+
15
+ - `pmk msd -ne` retains finite, positive Einstein diffusion coefficients and
16
+ Nernst–Einstein conductivity when the fit-quality diagnostics would reject the
17
+ window. The result is reported and aggregated as WARNING, with the original
18
+ diagnostic details preserved. This applies to automatic and manual windows.
19
+ - Missing valid regression, failed requested estimators, and invalid NE inputs
20
+ still fail the calculation and preserve existing aggregate summaries.
21
+
22
+ ## 1.7.3
23
+
24
+ - `pmk msd` analyzes fixed-cell GPUMD NVT trajectories, selects or accepts a
25
+ fitting window, and optionally reports Nernst–Einstein conductivity. It uses
26
+ free-intercept OLS by default. Optional WLS and GLS also estimate the intercept.
27
+ Forced-origin fitting has been removed from production.
28
+ - `pmk pred-msd-time` uses validated full-trajectory OLS references to forecast
29
+ higher-temperature Li conductivity, diffusion, and NVT production duration.
30
+ The Arrhenius forecast and square-root duration scaling are planning heuristics.
31
+ The durations carry no guarantee of MSD convergence.
32
+ - `pmk gpumd-job -msd-time` generates GPUMD 4.2-compatible jobs with explicit
33
+ NVT temperatures, run lengths, and optional `compute_msd` sample counts.
34
+ Fixed-cell NVT production is required for MSD analysis. Earlier NPT equilibration
35
+ is supported when its frames are excluded from the analyzed trajectory.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pymdkit
3
- Version: 1.7.3
3
+ Version: 1.7.5
4
4
  Summary: A Python command-line toolkit for high-throughput atomistic workflows in AI-driven materials design.
5
5
  Author-email: Yueda Wang <ydwang0608@ustc.edu.cn>
6
6
  License-Expression: GPL-3.0-or-later
@@ -14,6 +14,7 @@ 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
17
18
  Requires-Dist: ase
18
19
  Requires-Dist: pymatgen
19
20
  Requires-Dist: mp-api
@@ -36,6 +37,24 @@ materials design. Install `pymdkit` once and call its tools from anywhere as
36
37
  Commands expose explicit, documented CLI interfaces designed for reproducible shell,
37
38
  HPC, and AI-agent workflows, and each underlying script is still runnable on its own.
38
39
 
40
+ ## 1.7.5 release notes
41
+
42
+ - `pmk msd` reuses compatible full-trajectory or segment results, including
43
+ validated 1.7.4 WARNING results. Reused and newly calculated results contribute
44
+ to the same batch summaries after every directory succeeds.
45
+ - `pmk ionhop` analyzes completed Li octahedral-to-octahedral hops in
46
+ iodine-aligned GPUMD trajectories. It supports single and multi-temperature
47
+ runs with SciPy cKDTree and batched NumPy CPU assignment.
48
+
49
+ ## 1.7.4 release notes
50
+
51
+ - `pmk msd -ne` retains valid Einstein diffusion coefficients and conductivity
52
+ as WARNING when fit quality would otherwise be REJECT. This applies to
53
+ automatic and manual windows and preserves the individual diagnostic results.
54
+ - Missing valid regression, failed requested estimators, and invalid NE inputs
55
+ still cause calculation errors. Without `-ne`, fit-quality rejection still
56
+ withholds diffusion coefficients.
57
+
39
58
  ## 1.7.3 release notes
40
59
 
41
60
  - `pmk msd` analyzes GPUMD trajectories from fixed-cell NVT production. OLS is
@@ -97,7 +116,7 @@ installed.
97
116
  On a machine with Internet access, run:
98
117
 
99
118
  ```bash
100
- python -m pip download pymdkit==1.7.3 -d pymdkit-offline
119
+ python -m pip download pymdkit==1.7.5 -d pymdkit-offline
101
120
  ```
102
121
 
103
122
  This downloads `pymdkit` and the dependencies resolved by pip into the
@@ -105,14 +124,14 @@ This downloads `pymdkit` and the dependencies resolved by pip into the
105
124
  system. Then, inside the target pymdkit Python or conda environment, run:
106
125
 
107
126
  ```bash
108
- python -m pip install --no-index --find-links=pymdkit-offline pymdkit==1.7.3
127
+ python -m pip install --no-index --find-links=pymdkit-offline pymdkit==1.7.5
109
128
  ```
110
129
 
111
130
  For optional GPU use, prepare the bundle on a networked machine compatible with
112
131
  the target HPC platform and Python environment:
113
132
 
114
133
  ```bash
115
- python -m pip download "pymdkit[gpu-cuda12]==1.7.3" -d pymdkit-offline
134
+ python -m pip download "pymdkit[gpu-cuda12]==1.7.5" -d pymdkit-offline
116
135
  ```
117
136
 
118
137
  Transfer the whole `pymdkit-offline` directory, then install from it on the
@@ -120,7 +139,7 @@ target system:
120
139
 
121
140
  ```bash
122
141
  python -m pip install --no-index --find-links=pymdkit-offline \
123
- "pymdkit[gpu-cuda12]==1.7.3"
142
+ "pymdkit[gpu-cuda12]==1.7.5"
124
143
  ```
125
144
 
126
145
  This GPU bundle includes the optional `cupy-cuda12x` package. Its wheels must also
@@ -203,6 +222,7 @@ preserve occupancy, oxidation, symmetry, and Wyckoff metadata.
203
222
  | `gpumd-job` | Create supercell, temperature, potential, input, and grouped GPUMD jobs |
204
223
  | `pred-msd-time` | Predict Li conductivity, diffusion and NVT production durations from GPUMD MSD |
205
224
  | `gpumd-out` | Export GPUMD thermo/MSD results or gather final structures |
225
+ | `ionhop` | Count completed Li site hops and report nearest-neighbor hop frequencies from GPUMD trajectories |
206
226
  | `mp-chemsys` | Download stable Materials Project structures for a chemical system |
207
227
  | `nep-rmse` | Compute NEP energy/force/stress RMSE and select candidates |
208
228
  | `perturb` | Generate perturbed structures with dpdata |
@@ -877,22 +897,52 @@ diffusion in cm²/s, `%.2e`) and, only with `-ne`, `msd/sigma.txt` (x/y/z/total
877
897
  Nernst–Einstein conductivity in mS/cm, `%.2f`). Headers are comments. Total
878
898
  diffusion and conductivity are directional arithmetic means before rounding;
879
899
  display rounding may cause last-digit differences. PASS and WARNING write these
880
- coefficients with status in their comment headers. Fit rejection returns nonzero
881
- but preserves `msd/msd.txt`, `fit-windows.txt` (all evaluated candidates, rejection
882
- reasons, beta, directional D, R², intercept, RSS, points and upper-lag origin
883
- count, intercept diagnostics and selected-window segment D values), and
884
- `fit-diagnostic.txt` (settings, selection and sensitivity). Beta-qualified window
885
- sensitivity, all-valid-candidate sensitivity, and three-segment slope spread are
886
- reported separately. Segments and MSD time origins are not independent samples. Rejected
887
- fits write no diffusion or conductivity files. Window-to-window spread is a
888
- sensitivity diagnostic, not a statistical confidence interval. Formal statistical uncertainty is not estimated by default. Existing `msd` directories cause an error: move them aside
889
- before repeating a calculation. Temporary coordinate storage is always removed.
900
+ coefficients with the quality status in their comment headers. `provenance.json`
901
+ records the final quality and full-precision total coefficients.
902
+
903
+ With `-ne`, an automatic or manual window with finite, positive x/y/z/total
904
+ Einstein diffusion coefficients retains D and NE conductivity even when the fit
905
+ quality would otherwise be REJECT. The overall status becomes WARNING. The
906
+ original reason and the beta, intercept-consistency, and three-segment slope
907
+ diagnostics remain in the fit output. A WARNING can indicate that the physical
908
+ diffusion regime failed quality criteria. Without `-ne`, REJECT returns nonzero
909
+ and retains only raw MSD and fit diagnostics. PASS and WARNING retain D.
910
+
911
+ `fit-windows.txt` records evaluated candidates, rejection reasons, beta,
912
+ directional D, R², intercept, RSS, points, upper-lag origin count, intercept
913
+ diagnostics, and selected-window segment D values. `fit-diagnostic.txt` records
914
+ settings, selection, and sensitivity. Beta-qualified window sensitivity,
915
+ all-valid-candidate sensitivity, and three-segment slope spread are reported
916
+ separately. Segments and MSD time origins are correlated. Window-to-window spread
917
+ measures sensitivity. Formal statistical uncertainty requires an explicit
918
+ request. Temporary coordinate storage is removed when the calculation ends.
919
+
920
+ When the result directory is absent, `pmk msd` calculates it. When a compatible
921
+ result already exists, the command reuses its full-precision coefficients and
922
+ quality without reading trajectory coordinates or changing the saved result
923
+ files. It checks version-1 provenance, input and output sizes and modification
924
+ times, grouping method 0, atom counts, run cadence, fit settings, selected
925
+ window, and diagnostic and coefficient totals. With `-ne` it also checks the
926
+ charge and thermodynamic inputs and recomputes the stored conductivity from
927
+ full-precision D, temperature, volume, and ion count. Primary 1.7.4 results
928
+ can be reused when diagnostics establish compatibility, including the effective
929
+ lag bounds for a manual window. Missing provenance, stale files, incomplete
930
+ outputs, incompatible settings, and REJECT results cause an error and leave the
931
+ result directory intact. Move that directory aside before recalculating.
932
+
933
+ With `--uncertainty covariance`, reuse also requires the original uncertainty
934
+ settings, output fingerprints, and matching input hashes and paths. Older
935
+ results without those settings or fingerprints require recalculation for an
936
+ uncertainty request. The existing full-run NE covariance fallback can reuse
937
+ nominal temperature when `thermo.out` was unavailable. Ordinary NE and range
938
+ NE still require `thermo.out`.
890
939
 
891
940
  The five-column raw MSD is published immediately after FFT succeeds, before
892
941
  window search, optional uncertainty, or thermodynamic/NE processing. Later errors
893
- retain this curve and any completed fit diagnostics; parsing/FFT failures are
894
- reported separately and do not publish a valid curve. REJECT prints the saved
895
- path and withholds formal diffusion/conductivity files and new aggregates.
942
+ retain this curve and any completed fit diagnostics. A missing valid regression,
943
+ a failed requested WLS/GLS estimator, or invalid required thermodynamic inputs
944
+ returns nonzero and prevents publication of new coefficients and aggregates.
945
+ Parsing and FFT failures occur before the raw curve is published.
896
946
  FFT uses float64 atom chunks sized from an internal 128 MiB workspace budget,
897
947
  with bounded remapping of time slabs to avoid retaining the entire coordinate
898
948
  memmap in RAM. For 100000 frames and 784 selected atoms the temporary coordinate
@@ -952,19 +1002,23 @@ original inputs/results before and after, regenerates missing diagnostics,
952
1002
  reads the original trajectory and removes temporary coordinates. Normal tests
953
1003
  do not require this external dataset.
954
1004
 
955
- After every eligible calculation succeeds, root-level `self-diff-total.txt` and,
1005
+ After every directory is calculated or validated for reuse, root-level `self-diff-total.txt` and,
956
1006
  with `-ne`, `sigma-total.txt` summarize directory, temperature (K), and the
957
1007
  isotropic total D (cm²/s, `%.2e`) or conductivity (mS/cm, `%.2f`). Rows use
958
1008
  relative paths and sort by numeric temperature, then path. Summaries use internal
959
1009
  unrounded totals. NE uses measured mean production temperature; without NE a
960
1010
  single stationary production NVT target is required (ramps, multiple targets and
961
- missing NVT targets produce an explicit error). Genuine calculation failures return
962
- nonzero and preserve previous summaries; skipped templates are not failures.
963
- A successful run without `-ne` removes any stale root `sigma-total.txt`.
1011
+ missing NVT targets produce an explicit error). Calculation or validation
1012
+ failures return nonzero and preserve previous summaries. Unresolved templates
1013
+ are skipped. A successful run without `-ne` can reuse diffusion from a
1014
+ compatible previous NE result and removes any stale root `sigma-total.txt`.
1015
+ Range runs reuse only the matching segment result and publish totals under
1016
+ `root/msd/segments/START-ENDns/`, separately from full-trajectory root summaries.
964
1017
  The companion `msd-quality-total.txt` retains each directory's PASS/WARNING
965
- status without changing the existing three-column numeric summaries. A rejected
966
- directory prevents all new aggregate publication; prior summaries remain prior
967
- results and the terminal/log explicitly reports that they were preserved.
1018
+ status. In NE mode, a directory whose valid coefficients were retained despite
1019
+ fit-quality rejection appears as WARNING and contributes to both numeric
1020
+ summaries. Without `-ne`, a directory with overall REJECT prevents publication
1021
+ of new aggregates.
968
1022
  See [the automatic-fit report](devtools/MSD_AUTO_FIT_REPORT.md) for validation,
969
1023
  and [the intercept/stability update](devtools/MSD_AUTO_FIT_PHASE4A1_REPORT.md)
970
1024
  for the current policy, 500 K MSD comparison and limitations.
@@ -985,6 +1039,72 @@ Nernst–Einstein conductivity uses self-diffusion and neglects distinct-ion cro
985
1039
  correlations. It is not generally equal to experimental conductivity. The existing
986
1040
  `gpumd-out -msd` workflow is unchanged.
987
1041
 
1042
+ ## Count Li site hops in GPUMD trajectories
1043
+
1044
+ ```bash
1045
+ pmk ionhop -model model.xyz -trajectory dump.xyz -prefix Li4YI7_300K
1046
+ pmk ionhop -prefix LiYI7
1047
+ ```
1048
+
1049
+ Supply both paths for single mode. It writes `<prefix>_sites.csv`,
1050
+ `<prefix>_jumps.csv`, and `<prefix>_summary.json`. The sites CSV lists the
1051
+ one-based site IDs, fractional coordinates, O/T type, and initial occupancy.
1052
+ The jumps CSV records the Li atom and site IDs, arrival and confirmation times
1053
+ in ps, displacement in Å, hop class, and sampled tetrahedral evidence.
1054
+ The JSON includes counts, site-link statistics, initial occupancy, iodine
1055
+ alignment, mean displacement, sampling and processing timings, and method
1056
+ limitations.
1057
+
1058
+ With both paths omitted, batch mode looks for immediate integer-temperature
1059
+ subdirectories with `model.xyz` and `dump.xyz`. It warns about incomplete
1060
+ directories, rejects duplicate integer temperatures, and processes complete
1061
+ directories in numeric order. Use a plain prefix such as `LiYI7` to write
1062
+ `LiYI7_300K_sites.csv`, `LiYI7_300K_jumps.csv`, and
1063
+ `LiYI7_300K_summary.json` inside `300/`. After every trajectory succeeds it
1064
+ atomically publishes root `hop_freq.txt`, with header `Temp(K) Hop_freq(s-1)`
1065
+ and one temperature and frequency per row. Existing batch outputs require
1066
+ `-overwrite`. A failed batch can leave per-temperature files already written.
1067
+
1068
+ | Option | Default | Meaning |
1069
+ |---|---|---|
1070
+ | `-model` | Omitted | Model XYZ path, paired with `-trajectory` |
1071
+ | `-trajectory` | Omitted | GPUMD dump XYZ path, paired with `-model` |
1072
+ | `-prefix` | Required | Output prefix in single mode, plain material label in batch mode |
1073
+ | `-radius` | 1.25 Å | Site-core radius, positive and below half the O–T spacing |
1074
+ | `-min-frames` | 2 | Consecutive destination frames needed to confirm a hop, at least one |
1075
+ | `-max-frames` | Omitted | Limit the number of frames read, at least two when supplied |
1076
+ | `-backend` | `cpu` | SciPy cKDTree or `numpy` for batched analytic CPU assignment |
1077
+ | `-batch-frames` | 256 | Positive batch size for the NumPy backend |
1078
+ | `-no-iodine-align` | Off | Disable iodine-frame alignment for legacy comparisons |
1079
+ | `-overwrite` | Off | Allow replacing existing batch outputs |
1080
+
1081
+ Each option also accepts its double-dash spelling. Both backends use the CPU.
1082
+ The model must contain Li, I, and either Y or La, with an fcc iodine sublattice.
1083
+ The trajectory must preserve atom order and have evenly spaced, increasing
1084
+ `Time=` values in fs. Axis-aligned cubic cells may vary in volume.
1085
+
1086
+ Octahedral O sites are the ideal fcc cation positions. Tetrahedral T sites are
1087
+ the ideal interstices. Periodic nearest-site assignment uses the site cores.
1088
+ Iodine atoms are matched to ideal references in the model and tracked by atom
1089
+ identity. Each frame removes the median three-dimensional minimum-image iodine
1090
+ displacement from the Li coordinates. Reported site fractions are in that
1091
+ aligned frame.
1092
+
1093
+ A completed hop starts at a persistent O site and ends at another O site
1094
+ after the configured consecutive destination frames. T visits contribute only
1095
+ pathway evidence. The reported frequency is the number of confirmed
1096
+ nearest-neighbor O-to-O hops divided by the number of Li ions and the elapsed
1097
+ seconds from the first to the last saved frame. The unit is s⁻¹. Long or
1098
+ unresolved multihops are counted separately. A trajectory can miss brief T
1099
+ visits and recrossings between frames, so an O-to-O hop with no sampled T visit
1100
+ leaves its pathway unresolved.
1101
+
1102
+ The site-core and residence-time approach follows de Klerk et al.,
1103
+ *ACS Applied Energy Materials* **1**, 3230–3242 (2018), and Lavrinenko et al.
1104
+ (GEMDAT), *npj Computational Materials* **12**, 259 (2026).
1105
+ [DOI 10.1021/acsaem.8b00457](https://doi.org/10.1021/acsaem.8b00457)
1106
+ and [DOI 10.1038/s41524-026-02133-7](https://doi.org/10.1038/s41524-026-02133-7).
1107
+
988
1108
  ## Plan GPUMD NVT production from Li MSD
989
1109
 
990
1110
  Run the predictor from a project directory containing completed GPUMD tasks.
@@ -7,6 +7,24 @@ materials design. Install `pymdkit` once and call its tools from anywhere as
7
7
  Commands expose explicit, documented CLI interfaces designed for reproducible shell,
8
8
  HPC, and AI-agent workflows, and each underlying script is still runnable on its own.
9
9
 
10
+ ## 1.7.5 release notes
11
+
12
+ - `pmk msd` reuses compatible full-trajectory or segment results, including
13
+ validated 1.7.4 WARNING results. Reused and newly calculated results contribute
14
+ to the same batch summaries after every directory succeeds.
15
+ - `pmk ionhop` analyzes completed Li octahedral-to-octahedral hops in
16
+ iodine-aligned GPUMD trajectories. It supports single and multi-temperature
17
+ runs with SciPy cKDTree and batched NumPy CPU assignment.
18
+
19
+ ## 1.7.4 release notes
20
+
21
+ - `pmk msd -ne` retains valid Einstein diffusion coefficients and conductivity
22
+ as WARNING when fit quality would otherwise be REJECT. This applies to
23
+ automatic and manual windows and preserves the individual diagnostic results.
24
+ - Missing valid regression, failed requested estimators, and invalid NE inputs
25
+ still cause calculation errors. Without `-ne`, fit-quality rejection still
26
+ withholds diffusion coefficients.
27
+
10
28
  ## 1.7.3 release notes
11
29
 
12
30
  - `pmk msd` analyzes GPUMD trajectories from fixed-cell NVT production. OLS is
@@ -68,7 +86,7 @@ installed.
68
86
  On a machine with Internet access, run:
69
87
 
70
88
  ```bash
71
- python -m pip download pymdkit==1.7.3 -d pymdkit-offline
89
+ python -m pip download pymdkit==1.7.5 -d pymdkit-offline
72
90
  ```
73
91
 
74
92
  This downloads `pymdkit` and the dependencies resolved by pip into the
@@ -76,14 +94,14 @@ This downloads `pymdkit` and the dependencies resolved by pip into the
76
94
  system. Then, inside the target pymdkit Python or conda environment, run:
77
95
 
78
96
  ```bash
79
- python -m pip install --no-index --find-links=pymdkit-offline pymdkit==1.7.3
97
+ python -m pip install --no-index --find-links=pymdkit-offline pymdkit==1.7.5
80
98
  ```
81
99
 
82
100
  For optional GPU use, prepare the bundle on a networked machine compatible with
83
101
  the target HPC platform and Python environment:
84
102
 
85
103
  ```bash
86
- python -m pip download "pymdkit[gpu-cuda12]==1.7.3" -d pymdkit-offline
104
+ python -m pip download "pymdkit[gpu-cuda12]==1.7.5" -d pymdkit-offline
87
105
  ```
88
106
 
89
107
  Transfer the whole `pymdkit-offline` directory, then install from it on the
@@ -91,7 +109,7 @@ target system:
91
109
 
92
110
  ```bash
93
111
  python -m pip install --no-index --find-links=pymdkit-offline \
94
- "pymdkit[gpu-cuda12]==1.7.3"
112
+ "pymdkit[gpu-cuda12]==1.7.5"
95
113
  ```
96
114
 
97
115
  This GPU bundle includes the optional `cupy-cuda12x` package. Its wheels must also
@@ -174,6 +192,7 @@ preserve occupancy, oxidation, symmetry, and Wyckoff metadata.
174
192
  | `gpumd-job` | Create supercell, temperature, potential, input, and grouped GPUMD jobs |
175
193
  | `pred-msd-time` | Predict Li conductivity, diffusion and NVT production durations from GPUMD MSD |
176
194
  | `gpumd-out` | Export GPUMD thermo/MSD results or gather final structures |
195
+ | `ionhop` | Count completed Li site hops and report nearest-neighbor hop frequencies from GPUMD trajectories |
177
196
  | `mp-chemsys` | Download stable Materials Project structures for a chemical system |
178
197
  | `nep-rmse` | Compute NEP energy/force/stress RMSE and select candidates |
179
198
  | `perturb` | Generate perturbed structures with dpdata |
@@ -848,22 +867,52 @@ diffusion in cm²/s, `%.2e`) and, only with `-ne`, `msd/sigma.txt` (x/y/z/total
848
867
  Nernst–Einstein conductivity in mS/cm, `%.2f`). Headers are comments. Total
849
868
  diffusion and conductivity are directional arithmetic means before rounding;
850
869
  display rounding may cause last-digit differences. PASS and WARNING write these
851
- coefficients with status in their comment headers. Fit rejection returns nonzero
852
- but preserves `msd/msd.txt`, `fit-windows.txt` (all evaluated candidates, rejection
853
- reasons, beta, directional D, R², intercept, RSS, points and upper-lag origin
854
- count, intercept diagnostics and selected-window segment D values), and
855
- `fit-diagnostic.txt` (settings, selection and sensitivity). Beta-qualified window
856
- sensitivity, all-valid-candidate sensitivity, and three-segment slope spread are
857
- reported separately. Segments and MSD time origins are not independent samples. Rejected
858
- fits write no diffusion or conductivity files. Window-to-window spread is a
859
- sensitivity diagnostic, not a statistical confidence interval. Formal statistical uncertainty is not estimated by default. Existing `msd` directories cause an error: move them aside
860
- before repeating a calculation. Temporary coordinate storage is always removed.
870
+ coefficients with the quality status in their comment headers. `provenance.json`
871
+ records the final quality and full-precision total coefficients.
872
+
873
+ With `-ne`, an automatic or manual window with finite, positive x/y/z/total
874
+ Einstein diffusion coefficients retains D and NE conductivity even when the fit
875
+ quality would otherwise be REJECT. The overall status becomes WARNING. The
876
+ original reason and the beta, intercept-consistency, and three-segment slope
877
+ diagnostics remain in the fit output. A WARNING can indicate that the physical
878
+ diffusion regime failed quality criteria. Without `-ne`, REJECT returns nonzero
879
+ and retains only raw MSD and fit diagnostics. PASS and WARNING retain D.
880
+
881
+ `fit-windows.txt` records evaluated candidates, rejection reasons, beta,
882
+ directional D, R², intercept, RSS, points, upper-lag origin count, intercept
883
+ diagnostics, and selected-window segment D values. `fit-diagnostic.txt` records
884
+ settings, selection, and sensitivity. Beta-qualified window sensitivity,
885
+ all-valid-candidate sensitivity, and three-segment slope spread are reported
886
+ separately. Segments and MSD time origins are correlated. Window-to-window spread
887
+ measures sensitivity. Formal statistical uncertainty requires an explicit
888
+ request. Temporary coordinate storage is removed when the calculation ends.
889
+
890
+ When the result directory is absent, `pmk msd` calculates it. When a compatible
891
+ result already exists, the command reuses its full-precision coefficients and
892
+ quality without reading trajectory coordinates or changing the saved result
893
+ files. It checks version-1 provenance, input and output sizes and modification
894
+ times, grouping method 0, atom counts, run cadence, fit settings, selected
895
+ window, and diagnostic and coefficient totals. With `-ne` it also checks the
896
+ charge and thermodynamic inputs and recomputes the stored conductivity from
897
+ full-precision D, temperature, volume, and ion count. Primary 1.7.4 results
898
+ can be reused when diagnostics establish compatibility, including the effective
899
+ lag bounds for a manual window. Missing provenance, stale files, incomplete
900
+ outputs, incompatible settings, and REJECT results cause an error and leave the
901
+ result directory intact. Move that directory aside before recalculating.
902
+
903
+ With `--uncertainty covariance`, reuse also requires the original uncertainty
904
+ settings, output fingerprints, and matching input hashes and paths. Older
905
+ results without those settings or fingerprints require recalculation for an
906
+ uncertainty request. The existing full-run NE covariance fallback can reuse
907
+ nominal temperature when `thermo.out` was unavailable. Ordinary NE and range
908
+ NE still require `thermo.out`.
861
909
 
862
910
  The five-column raw MSD is published immediately after FFT succeeds, before
863
911
  window search, optional uncertainty, or thermodynamic/NE processing. Later errors
864
- retain this curve and any completed fit diagnostics; parsing/FFT failures are
865
- reported separately and do not publish a valid curve. REJECT prints the saved
866
- path and withholds formal diffusion/conductivity files and new aggregates.
912
+ retain this curve and any completed fit diagnostics. A missing valid regression,
913
+ a failed requested WLS/GLS estimator, or invalid required thermodynamic inputs
914
+ returns nonzero and prevents publication of new coefficients and aggregates.
915
+ Parsing and FFT failures occur before the raw curve is published.
867
916
  FFT uses float64 atom chunks sized from an internal 128 MiB workspace budget,
868
917
  with bounded remapping of time slabs to avoid retaining the entire coordinate
869
918
  memmap in RAM. For 100000 frames and 784 selected atoms the temporary coordinate
@@ -923,19 +972,23 @@ original inputs/results before and after, regenerates missing diagnostics,
923
972
  reads the original trajectory and removes temporary coordinates. Normal tests
924
973
  do not require this external dataset.
925
974
 
926
- After every eligible calculation succeeds, root-level `self-diff-total.txt` and,
975
+ After every directory is calculated or validated for reuse, root-level `self-diff-total.txt` and,
927
976
  with `-ne`, `sigma-total.txt` summarize directory, temperature (K), and the
928
977
  isotropic total D (cm²/s, `%.2e`) or conductivity (mS/cm, `%.2f`). Rows use
929
978
  relative paths and sort by numeric temperature, then path. Summaries use internal
930
979
  unrounded totals. NE uses measured mean production temperature; without NE a
931
980
  single stationary production NVT target is required (ramps, multiple targets and
932
- missing NVT targets produce an explicit error). Genuine calculation failures return
933
- nonzero and preserve previous summaries; skipped templates are not failures.
934
- A successful run without `-ne` removes any stale root `sigma-total.txt`.
981
+ missing NVT targets produce an explicit error). Calculation or validation
982
+ failures return nonzero and preserve previous summaries. Unresolved templates
983
+ are skipped. A successful run without `-ne` can reuse diffusion from a
984
+ compatible previous NE result and removes any stale root `sigma-total.txt`.
985
+ Range runs reuse only the matching segment result and publish totals under
986
+ `root/msd/segments/START-ENDns/`, separately from full-trajectory root summaries.
935
987
  The companion `msd-quality-total.txt` retains each directory's PASS/WARNING
936
- status without changing the existing three-column numeric summaries. A rejected
937
- directory prevents all new aggregate publication; prior summaries remain prior
938
- results and the terminal/log explicitly reports that they were preserved.
988
+ status. In NE mode, a directory whose valid coefficients were retained despite
989
+ fit-quality rejection appears as WARNING and contributes to both numeric
990
+ summaries. Without `-ne`, a directory with overall REJECT prevents publication
991
+ of new aggregates.
939
992
  See [the automatic-fit report](devtools/MSD_AUTO_FIT_REPORT.md) for validation,
940
993
  and [the intercept/stability update](devtools/MSD_AUTO_FIT_PHASE4A1_REPORT.md)
941
994
  for the current policy, 500 K MSD comparison and limitations.
@@ -956,6 +1009,72 @@ Nernst–Einstein conductivity uses self-diffusion and neglects distinct-ion cro
956
1009
  correlations. It is not generally equal to experimental conductivity. The existing
957
1010
  `gpumd-out -msd` workflow is unchanged.
958
1011
 
1012
+ ## Count Li site hops in GPUMD trajectories
1013
+
1014
+ ```bash
1015
+ pmk ionhop -model model.xyz -trajectory dump.xyz -prefix Li4YI7_300K
1016
+ pmk ionhop -prefix LiYI7
1017
+ ```
1018
+
1019
+ Supply both paths for single mode. It writes `<prefix>_sites.csv`,
1020
+ `<prefix>_jumps.csv`, and `<prefix>_summary.json`. The sites CSV lists the
1021
+ one-based site IDs, fractional coordinates, O/T type, and initial occupancy.
1022
+ The jumps CSV records the Li atom and site IDs, arrival and confirmation times
1023
+ in ps, displacement in Å, hop class, and sampled tetrahedral evidence.
1024
+ The JSON includes counts, site-link statistics, initial occupancy, iodine
1025
+ alignment, mean displacement, sampling and processing timings, and method
1026
+ limitations.
1027
+
1028
+ With both paths omitted, batch mode looks for immediate integer-temperature
1029
+ subdirectories with `model.xyz` and `dump.xyz`. It warns about incomplete
1030
+ directories, rejects duplicate integer temperatures, and processes complete
1031
+ directories in numeric order. Use a plain prefix such as `LiYI7` to write
1032
+ `LiYI7_300K_sites.csv`, `LiYI7_300K_jumps.csv`, and
1033
+ `LiYI7_300K_summary.json` inside `300/`. After every trajectory succeeds it
1034
+ atomically publishes root `hop_freq.txt`, with header `Temp(K) Hop_freq(s-1)`
1035
+ and one temperature and frequency per row. Existing batch outputs require
1036
+ `-overwrite`. A failed batch can leave per-temperature files already written.
1037
+
1038
+ | Option | Default | Meaning |
1039
+ |---|---|---|
1040
+ | `-model` | Omitted | Model XYZ path, paired with `-trajectory` |
1041
+ | `-trajectory` | Omitted | GPUMD dump XYZ path, paired with `-model` |
1042
+ | `-prefix` | Required | Output prefix in single mode, plain material label in batch mode |
1043
+ | `-radius` | 1.25 Å | Site-core radius, positive and below half the O–T spacing |
1044
+ | `-min-frames` | 2 | Consecutive destination frames needed to confirm a hop, at least one |
1045
+ | `-max-frames` | Omitted | Limit the number of frames read, at least two when supplied |
1046
+ | `-backend` | `cpu` | SciPy cKDTree or `numpy` for batched analytic CPU assignment |
1047
+ | `-batch-frames` | 256 | Positive batch size for the NumPy backend |
1048
+ | `-no-iodine-align` | Off | Disable iodine-frame alignment for legacy comparisons |
1049
+ | `-overwrite` | Off | Allow replacing existing batch outputs |
1050
+
1051
+ Each option also accepts its double-dash spelling. Both backends use the CPU.
1052
+ The model must contain Li, I, and either Y or La, with an fcc iodine sublattice.
1053
+ The trajectory must preserve atom order and have evenly spaced, increasing
1054
+ `Time=` values in fs. Axis-aligned cubic cells may vary in volume.
1055
+
1056
+ Octahedral O sites are the ideal fcc cation positions. Tetrahedral T sites are
1057
+ the ideal interstices. Periodic nearest-site assignment uses the site cores.
1058
+ Iodine atoms are matched to ideal references in the model and tracked by atom
1059
+ identity. Each frame removes the median three-dimensional minimum-image iodine
1060
+ displacement from the Li coordinates. Reported site fractions are in that
1061
+ aligned frame.
1062
+
1063
+ A completed hop starts at a persistent O site and ends at another O site
1064
+ after the configured consecutive destination frames. T visits contribute only
1065
+ pathway evidence. The reported frequency is the number of confirmed
1066
+ nearest-neighbor O-to-O hops divided by the number of Li ions and the elapsed
1067
+ seconds from the first to the last saved frame. The unit is s⁻¹. Long or
1068
+ unresolved multihops are counted separately. A trajectory can miss brief T
1069
+ visits and recrossings between frames, so an O-to-O hop with no sampled T visit
1070
+ leaves its pathway unresolved.
1071
+
1072
+ The site-core and residence-time approach follows de Klerk et al.,
1073
+ *ACS Applied Energy Materials* **1**, 3230–3242 (2018), and Lavrinenko et al.
1074
+ (GEMDAT), *npj Computational Materials* **12**, 259 (2026).
1075
+ [DOI 10.1021/acsaem.8b00457](https://doi.org/10.1021/acsaem.8b00457)
1076
+ and [DOI 10.1038/s41524-026-02133-7](https://doi.org/10.1038/s41524-026-02133-7).
1077
+
959
1078
  ## Plan GPUMD NVT production from Li MSD
960
1079
 
961
1080
  Run the predictor from a project directory containing completed GPUMD tasks.
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "pymdkit"
7
- version = "1.7.3"
7
+ version = "1.7.5"
8
8
  description = "A Python command-line toolkit for high-throughput atomistic workflows in AI-driven materials design."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.9"
@@ -25,6 +25,7 @@ classifiers = [
25
25
  # individual commands, so the dispatcher and pmk -help stay fast.
26
26
  dependencies = [
27
27
  "numpy",
28
+ "scipy",
28
29
  "ase",
29
30
  "pymatgen",
30
31
  "mp-api",
@@ -1,3 +1,3 @@
1
1
  """A Python command-line toolkit for high-throughput atomistic workflows in AI-driven materials design."""
2
2
 
3
- __version__ = "1.7.3"
3
+ __version__ = "1.7.5"