pymdkit 1.4.2__tar.gz → 1.4.3__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 (45) hide show
  1. {pymdkit-1.4.2/src/pymdkit.egg-info → pymdkit-1.4.3}/PKG-INFO +2 -2
  2. {pymdkit-1.4.2 → pymdkit-1.4.3}/README.md +1 -1
  3. {pymdkit-1.4.2 → pymdkit-1.4.3}/pyproject.toml +1 -1
  4. {pymdkit-1.4.2 → pymdkit-1.4.3}/src/pymdkit/__init__.py +1 -1
  5. {pymdkit-1.4.2 → pymdkit-1.4.3}/src/pymdkit/commands/_gpumd.py +27 -36
  6. {pymdkit-1.4.2 → pymdkit-1.4.3/src/pymdkit.egg-info}/PKG-INFO +2 -2
  7. {pymdkit-1.4.2 → pymdkit-1.4.3}/LICENSE +0 -0
  8. {pymdkit-1.4.2 → pymdkit-1.4.3}/setup.cfg +0 -0
  9. {pymdkit-1.4.2 → pymdkit-1.4.3}/src/pymdkit/commands/__init__.py +0 -0
  10. {pymdkit-1.4.2 → pymdkit-1.4.3}/src/pymdkit/commands/_extxyz.py +0 -0
  11. {pymdkit-1.4.2 → pymdkit-1.4.3}/src/pymdkit/commands/_fileio.py +0 -0
  12. {pymdkit-1.4.2 → pymdkit-1.4.3}/src/pymdkit/commands/_geometry.py +0 -0
  13. {pymdkit-1.4.2 → pymdkit-1.4.3}/src/pymdkit/commands/_reduction.py +0 -0
  14. {pymdkit-1.4.2 → pymdkit-1.4.3}/src/pymdkit/commands/_vasp_output.py +0 -0
  15. {pymdkit-1.4.2 → pymdkit-1.4.3}/src/pymdkit/commands/_vaspset.py +0 -0
  16. {pymdkit-1.4.2 → pymdkit-1.4.3}/src/pymdkit/commands/add_config_type.py +0 -0
  17. {pymdkit-1.4.2 → pymdkit-1.4.3}/src/pymdkit/commands/chemsys_entry.py +0 -0
  18. {pymdkit-1.4.2 → pymdkit-1.4.3}/src/pymdkit/commands/compute_ehull.py +0 -0
  19. {pymdkit-1.4.2 → pymdkit-1.4.3}/src/pymdkit/commands/compute_msd_all_groups.py +0 -0
  20. {pymdkit-1.4.2 → pymdkit-1.4.3}/src/pymdkit/commands/compute_rmsd.py +0 -0
  21. {pymdkit-1.4.2 → pymdkit-1.4.3}/src/pymdkit/commands/convert.py +0 -0
  22. {pymdkit-1.4.2 → pymdkit-1.4.3}/src/pymdkit/commands/ewald.py +0 -0
  23. {pymdkit-1.4.2 → pymdkit-1.4.3}/src/pymdkit/commands/gather_contcar.py +0 -0
  24. {pymdkit-1.4.2 → pymdkit-1.4.3}/src/pymdkit/commands/gpumd_group.py +0 -0
  25. {pymdkit-1.4.2 → pymdkit-1.4.3}/src/pymdkit/commands/gpumd_thermo.py +0 -0
  26. {pymdkit-1.4.2 → pymdkit-1.4.3}/src/pymdkit/commands/gpumd_trjcat.py +0 -0
  27. {pymdkit-1.4.2 → pymdkit-1.4.3}/src/pymdkit/commands/nep_rmse.py +0 -0
  28. {pymdkit-1.4.2 → pymdkit-1.4.3}/src/pymdkit/commands/pca.py +0 -0
  29. {pymdkit-1.4.2 → pymdkit-1.4.3}/src/pymdkit/commands/perturb.py +0 -0
  30. {pymdkit-1.4.2 → pymdkit-1.4.3}/src/pymdkit/commands/submit_vasp.py +0 -0
  31. {pymdkit-1.4.2 → pymdkit-1.4.3}/src/pymdkit/commands/substitute.py +0 -0
  32. {pymdkit-1.4.2 → pymdkit-1.4.3}/src/pymdkit/commands/supercell.py +0 -0
  33. {pymdkit-1.4.2 → pymdkit-1.4.3}/src/pymdkit/commands/symmetrize.py +0 -0
  34. {pymdkit-1.4.2 → pymdkit-1.4.3}/src/pymdkit/commands/trj_extract.py +0 -0
  35. {pymdkit-1.4.2 → pymdkit-1.4.3}/src/pymdkit/commands/umap.py +0 -0
  36. {pymdkit-1.4.2 → pymdkit-1.4.3}/src/pymdkit/commands/vasp2xyz.py +0 -0
  37. {pymdkit-1.4.2 → pymdkit-1.4.3}/src/pymdkit/commands/vasp_fe.py +0 -0
  38. {pymdkit-1.4.2 → pymdkit-1.4.3}/src/pymdkit/commands/vasp_relax.py +0 -0
  39. {pymdkit-1.4.2 → pymdkit-1.4.3}/src/pymdkit/commands/vasp_static.py +0 -0
  40. {pymdkit-1.4.2 → pymdkit-1.4.3}/src/pymdkit/pymdkit_main.py +0 -0
  41. {pymdkit-1.4.2 → pymdkit-1.4.3}/src/pymdkit.egg-info/SOURCES.txt +0 -0
  42. {pymdkit-1.4.2 → pymdkit-1.4.3}/src/pymdkit.egg-info/dependency_links.txt +0 -0
  43. {pymdkit-1.4.2 → pymdkit-1.4.3}/src/pymdkit.egg-info/entry_points.txt +0 -0
  44. {pymdkit-1.4.2 → pymdkit-1.4.3}/src/pymdkit.egg-info/requires.txt +0 -0
  45. {pymdkit-1.4.2 → pymdkit-1.4.3}/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.2
3
+ Version: 1.4.3
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
@@ -175,7 +175,7 @@ When `pca` or `umap` receives `-it train.xyz`, it reads `Config_type` from every
175
175
 
176
176
  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`.
177
177
 
178
- `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. Potential energy is the primary equilibrium signal: sustained potential-energy shifts, drifts, or localized departures define an abnormal job or time region. Lattice parameters, volume, temperature, pressure, and angles remain supporting diagnostics. 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.
178
+ `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. 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. Lattice parameters, volume, temperature, pressure, and angles remain supporting diagnostics. 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.
179
179
 
180
180
  `gpumd-trjcat` recursively scans job subfolders for `traj.xyz`, `thermo.out`, and `run.in`. Stable trajectories are merged in deterministic folder order into `train.xyz` (or `-o`). For an abnormal job, only frames whose times fall in potential-energy abnormal regions are written to `abnormal.xyz` (or `-ao`); frame times are obtained from `time_step` and `dump_xyz` in that job's `run.in`. Missing, unreadable, or unmappable jobs are skipped. When `<job>/model.xyz` contains `Config_type`, that value is applied to every exported frame while all other extended-XYZ bytes remain unchanged.
181
181
 
@@ -149,7 +149,7 @@ When `pca` or `umap` receives `-it train.xyz`, it reads `Config_type` from every
149
149
 
150
150
  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`.
151
151
 
152
- `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. Potential energy is the primary equilibrium signal: sustained potential-energy shifts, drifts, or localized departures define an abnormal job or time region. Lattice parameters, volume, temperature, pressure, and angles remain supporting diagnostics. 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.
152
+ `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. 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. Lattice parameters, volume, temperature, pressure, and angles remain supporting diagnostics. 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.
153
153
 
154
154
  `gpumd-trjcat` recursively scans job subfolders for `traj.xyz`, `thermo.out`, and `run.in`. Stable trajectories are merged in deterministic folder order into `train.xyz` (or `-o`). For an abnormal job, only frames whose times fall in potential-energy abnormal regions are written to `abnormal.xyz` (or `-ao`); frame times are obtained from `time_step` and `dump_xyz` in that job's `run.in`. Missing, unreadable, or unmappable jobs are skipped. When `<job>/model.xyz` contains `Config_type`, that value is applied to every exported frame while all other extended-XYZ bytes remain unchanged.
155
155
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "pymdkit"
7
- version = "1.4.2"
7
+ version = "1.4.3"
8
8
  description = "A unified command-line toolkit for atomistic / MD structure workflows."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.9"
@@ -1,3 +1,3 @@
1
1
  """pymdkit -- a unified CLI for atomistic / MD structure workflows."""
2
2
 
3
- __version__ = "1.4.2"
3
+ __version__ = "1.4.3"
@@ -195,7 +195,7 @@ def _clean_mask(mask):
195
195
 
196
196
 
197
197
  def potential_abnormal_mask(values):
198
- """Locate sustained potential-energy transitions or departures."""
198
+ """Locate persistent potential-energy transitions or abnormal plateaus."""
199
199
  values = np.asarray(values, dtype=float)
200
200
  size = len(values)
201
201
  if size < 20 or not np.all(np.isfinite(values)):
@@ -204,55 +204,46 @@ def potential_abnormal_mask(values):
204
204
  edge_count = max(5, size // 10)
205
205
  left_center, left_spread = _robust_spread(values[:edge_count])
206
206
  right_center, right_spread = _robust_spread(values[-edge_count:])
207
+ noise = max(left_spread, right_spread, 1e-12)
207
208
  difference = abs(right_center - left_center)
208
209
 
209
- window = max(5, size // 50)
210
+ # Average over 1% of the segment so isolated thermal excursions cannot
211
+ # trigger a warning. Raw values are used again to refine the boundaries.
212
+ window = max(5, size // 100)
210
213
  if window % 2 == 0:
211
214
  window += 1
212
215
  radius = window // 2
213
- smooth = np.asarray([
214
- np.median(values[max(0, i - radius):min(size, i + radius + 1)])
215
- for i in range(size)
216
- ])
216
+ padded = np.pad(values, (radius, radius), mode="edge")
217
+ cumulative = np.cumsum(np.insert(padded, 0, 0.0))
218
+ smooth = (cumulative[window:] - cumulative[:-window]) / window
217
219
 
218
- mean_threshold = max(
219
- 6.0 * np.hypot(left_spread, right_spread) / np.sqrt(edge_count),
220
+ practical_shift = max(
221
+ 1.5 * noise,
220
222
  1e-6 * max(abs(left_center), abs(right_center), 1.0),
221
223
  )
222
- if difference > mean_threshold:
223
- # Both edge plateaus are valid equilibrium levels. Mark only samples
224
- # between them, not either stable plateau.
225
- plateau_tolerance = max(
226
- 4.0 * max(left_spread, right_spread) / np.sqrt(window),
227
- 0.02 * difference,
228
- 1e-12,
229
- )
230
- distance = np.minimum(
224
+ if difference > practical_shift:
225
+ # The ends are two meaningfully different stable plateaus. Keep only
226
+ # the persistent transition between them.
227
+ tolerance = max(0.75 * noise, 0.05 * difference)
228
+ smooth_distance = np.minimum(
231
229
  np.abs(smooth - left_center), np.abs(smooth - right_center)
232
230
  )
233
- transition = _clean_mask(distance > plateau_tolerance)
234
- if transition.any():
235
- return transition
236
-
237
- # An abrupt jump may contain no intermediate values. In that case,
238
- # retain a narrow window around the change rather than one plateau.
239
- score = np.zeros(size)
240
- for index in range(window, size - window):
241
- score[index] = abs(
242
- np.mean(smooth[index:index + window])
243
- - np.mean(smooth[index - window:index])
244
- )
245
- threshold = max(
246
- 0.1 * difference,
247
- 4.0 * max(left_spread, right_spread) / np.sqrt(window),
231
+ raw_distance = np.minimum(
232
+ np.abs(values - left_center), np.abs(values - right_center)
233
+ )
234
+ return _clean_mask(
235
+ (smooth_distance > tolerance) & (raw_distance > tolerance)
248
236
  )
249
- return _clean_mask(score > threshold)
250
237
 
238
+ # The ends share one baseline. Detect only persistent excursions whose
239
+ # magnitude is at least twice the natural robust fluctuation scale.
251
240
  baseline = np.concatenate((values[:edge_count], values[-edge_count:]))
252
241
  center, spread = _robust_spread(baseline)
253
- threshold = max(6.0 * spread, 1e-6 * max(abs(center), 1.0), 1e-12)
254
- return _clean_mask(np.abs(smooth - center) > threshold)
255
-
242
+ threshold = max(2.0 * spread, 1e-6 * max(abs(center), 1.0), 1e-12)
243
+ return _clean_mask(
244
+ (np.abs(smooth - center) > threshold)
245
+ & (np.abs(values - center) > threshold)
246
+ )
256
247
 
257
248
  def mask_intervals(time, mask):
258
249
  """Return inclusive physical-time intervals for contiguous true mask regions."""
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pymdkit
3
- Version: 1.4.2
3
+ Version: 1.4.3
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
@@ -175,7 +175,7 @@ When `pca` or `umap` receives `-it train.xyz`, it reads `Config_type` from every
175
175
 
176
176
  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`.
177
177
 
178
- `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. Potential energy is the primary equilibrium signal: sustained potential-energy shifts, drifts, or localized departures define an abnormal job or time region. Lattice parameters, volume, temperature, pressure, and angles remain supporting diagnostics. 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.
178
+ `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. 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. Lattice parameters, volume, temperature, pressure, and angles remain supporting diagnostics. 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.
179
179
 
180
180
  `gpumd-trjcat` recursively scans job subfolders for `traj.xyz`, `thermo.out`, and `run.in`. Stable trajectories are merged in deterministic folder order into `train.xyz` (or `-o`). For an abnormal job, only frames whose times fall in potential-energy abnormal regions are written to `abnormal.xyz` (or `-ao`); frame times are obtained from `time_step` and `dump_xyz` in that job's `run.in`. Missing, unreadable, or unmappable jobs are skipped. When `<job>/model.xyz` contains `Config_type`, that value is applied to every exported frame while all other extended-XYZ bytes remain unchanged.
181
181
 
File without changes
File without changes