pymdkit
A Python command-line toolkit for high-throughput atomistic workflows in AI-driven
materials design. Install pymdkit once and call its tools from anywhere as
pmk <command> [options].
Commands expose explicit, documented CLI interfaces designed for reproducible shell, HPC, and AI-agent workflows, and each underlying script is still runnable on its own.
1.7.9 release notes
Element-resolved MSD, species-specific NE conductivity, headless plots and independent binary WLS/GLS plateau fitting are available. GPUMD jobs add PGV filtering and transactional pre-production handoff. See the development report.
MSD provenance now identifies the whole-system mass-weighted COM correction.
pmk zip-traj provides verified lossless trajectory compression and
decompression. The project audit also fixed negative XYZ atom counts and
nonfinite trjconv time inputs. See the
1.7.9 audit and compression report.
Batch processing and result preservation
Batch writers preserve existing independent structures, trajectories, plots and
calculation results by default. A job with existing files is reported explicitly.
pmk msd reuses results when their provenance verifies the inputs, outputs and
analysis settings. Handle incompatible or incomplete results manually before
retrying the affected job. Command logs append to their previous contents and
use a separate name when an operand occupies the default log path.
MSD merges previously published rows with newly calculated or verified rows.
Relative directory paths and, where applicable, element names identify records.
The tables sort by numeric production temperature, path and element. Failed or
incompatible jobs leave the previous summaries and fits in place. MSD stores
full-precision, provenance-backed observations in .pmk_msd_index.json alongside
the public tables. Keep this file with the summaries to use accumulated
observations whose calculation directories are outside future scans.
See the 1.7.9 incremental batch report
for command coverage and validation.
Previous 1.7.8 improvements
Wrapped-only GPUMD trajectories now receive strict schema validation, a sampling
warning, and versioned coordinate provenance. Explicit unwrapped trajectories
retain the existing numerical analysis. Exact doping certification now filters
distance levels with applicable packing bounds and strengthens the graph model
with safe reductions, verified cliques, and corrected LP dual bounds.
See reports/1.7.8/development-report.md for measured results and limitations.
Previous 1.7.7 improvements
- Automatic
pmk dopeuses exact incremental exchange scores and bounded 2D work arrays, preserving the three ranking metrics and search budgets. --n-jobs Nruns independent restarts in N processes (default: 1). Choose N for your CPU allocation; large problems benefit most and speedup need not be proportional. This does not set MILP solver threads.- Restart seeds now use
SeedSequence.spawn: results are reproducible across worker counts, but a seed need not reproduce the 1.7.6 configurations. - Exact enumeration stays serial. Summary metadata reports actual workers, timings (worker times are summed), sweeps, and attempted/accepted exchanges.
pmk dope -i LiI-777.vasp -se Li -sn 392 -we vac -on 10 -o vacancies -ref vac vac -seed 42 --n-jobs 1
pmk dope -i LiI-777.vasp -se Li -sn 392 -we vac -on 10 -o vacancies-n4 -ref vac vac -seed 42 --n-jobs 4
pmk dope -i LiI-777.vasp -se Li -sn 392 -we vac -on 10 -o vacancies-n8 -ref vac vac -seed 42 --n-jobs 8
Values above 1 require automatic optimization; ordinary generation and legacy
removal reject them. One process creates no workers. The float64 distance matrix
is shared read-only; workers return candidates and the parent writes and validates
outputs. Optional threadpoolctl limits numerical threads within each worker.
--certify-optimum and --certify-time-limit retain their existing meaning.
1.7.6 release notes
pmk dope -ref ELEMENT ELEMENTnow optimizes minimum periodic separation when used with-snand-on;-we vac -ref vac vacoptimizes vacancy sites.-dis removed. Legacy reference removal uses--reference-cutoffs.- Optimized structures are validated after writing and accompanied by a ranked
optimization-summary.txt. Scientific data reuse replaces the radius table, symmetry-expression evaluation and duplicated exact SI constants.
1.7.5 release notes
pmk msdreuses compatible full-trajectory or segment results, including validated 1.7.4 WARNING results. Reused and newly calculated results contribute to the same batch summaries after every directory succeeds.pmk ionhopanalyzes completed Li octahedral-to-octahedral hops in iodine-aligned GPUMD trajectories. It supports single and multi-temperature runs with SciPy cKDTree and batched NumPy CPU assignment.
1.7.4 release notes
pmk msd -neretains valid Einstein diffusion coefficients and conductivity as WARNING when fit quality would otherwise be REJECT. This applies to automatic and manual windows and preserves the individual diagnostic results.- Missing valid regression, failed requested estimators, and invalid NE inputs
still cause calculation errors. Without
-ne, fit-quality rejection still withholds diffusion coefficients.
1.7.3 release notes
pmk msdanalyzes GPUMD trajectories from fixed-cell NVT production. OLS is the default with a free intercept; WLS/GLS now fit a binary diffusivity plateau. Forced-origin fitting has been removed from production. Changing-cell MSD is outside scope.pmk pred-msd-timeuses validated free-intercept OLS references for higher-temperature Li transport and production-time planning. The duration heuristic carries no guarantee of MSD convergence.pmk gpumd-job -msd-timeturns predictions into GPUMD 4.2-compatible NVT job inputs. Earlier NPT equilibration can precede the analyzed production.
Install
Online installation
When Internet access is available, install from PyPI. This is the recommended method:
pip install pymdkit
This installs the pmk command into the active Python or conda environment,
together with its direct dependencies, including ASE, pymatgen, py4vasp-core,
h5py,
dpdata, matplotlib, UMAP, tqdm, and zstandard. Some packages also install transitive
dependencies.
Optional CUDA 12 GPU support
The default installation is CPU-only. Optional support for the CUDA fingerprint
prefilter used by pmk rmsd -gpu is installed separately:
python -m pip install "pymdkit[gpu-cuda12]"
This extra installs cupy-cuda12x; CuPy is not a required dependency for normal
PMK use. The GPU path currently applies only to the batched fingerprint candidate
prefilter used during one-folder duplicate screening. Structure loading, fingerprint
construction, and exact pymatgen StructureMatcher RMSDs remain CPU operations.
-ncore can still parallelize those exact CPU RMSD tasks. GPU mode is not
guaranteed to outperform CPU mode for every workload.
CuPy must be able to see a working NVIDIA GPU/driver/CUDA environment. On an HPC
system, CUDA may be provided through environment modules, for example
module load cuda/12.6, but the exact module name and scheduler GPU-allocation
commands are site-specific. Follow the cluster documentation rather than assuming
that CUDA 12.6 is required everywhere.
Complete offline installation
For an HPC system or another network-isolated machine, prepare a complete local
package bundle. Transferring only the pymdkit wheel is not sufficient for a
fresh offline environment when its required dependencies are not already
installed.
On a machine with Internet access, run:
python -m pip download pymdkit==1.7.9 -d pymdkit-offline
This downloads pymdkit and the dependencies resolved by pip into the
pymdkit-offline directory. Transfer that entire directory to the offline HPC
system. Then, inside the target pymdkit Python or conda environment, run:
python -m pip install --no-index --find-links=pymdkit-offline pymdkit==1.7.9
For optional GPU use, prepare the bundle on a networked machine compatible with the target HPC platform and Python environment:
python -m pip download "pymdkit[gpu-cuda12]==1.7.9" -d pymdkit-offline
Transfer the whole pymdkit-offline directory, then install from it on the
target system:
python -m pip install --no-index --find-links=pymdkit-offline \
"pymdkit[gpu-cuda12]==1.7.9"
This GPU bundle includes the optional cupy-cuda12x package. Its wheels must also
be compatible with the target platform, Python version, and CUDA environment.
--no-indexprevents pip from accessing PyPI.--find-links=pymdkit-offlinetells pip to install packages from the transferred local directory.
Compiled dependencies can have platform- and Python-version-specific wheels.
Although the pymdkit wheel may be platform-independent (py3-none-any),
packages such as NumPy and SciPy may not be. Prepare the offline bundle for a
Python version and platform compatible with the target HPC environment; wheels
downloaded for Windows will not necessarily work on Linux.
Ideally, prepare the offline bundle on a Linux system with a Python version
compatible with the target HPC environment.
Verify:
pmk -version
pmk -help # lists every command
pmk <command> -help # shows that command's flags
Global configuration and logs
On first use, PMK creates .pmkrc.yaml in the active Python environment root.
For example, an executable at ~/anaconda3/envs/pymdkit/bin/pmk uses
~/anaconda3/envs/pymdkit/.pmkrc.yaml. View or update configuration with:
pmk config
pmk config silence -on
pmk config silence -off
pmk config pmg-mp-api <MP_API_KEY>
pmk config pmg-vasp-potcar -type <TYPE> -path <PATH>
The two pmg-* forms write their pymatgen keys to both the active PMK
.pmkrc.yaml and ~/.config/.pmgrc.yaml, creating the latter and its parent
directory when needed. Existing unrelated keys are preserved and matching keys
are replaced. pmg-mp-api stores PMG_MAPI_KEY; its value is redacted from
terminal configuration listings and command logs.
pmg-vasp-potcar expands and resolves PATH to an absolute
PMG_VASP_PSP_DIR and stores TYPE verbatim as
PMG_DEFAULT_FUNCTIONAL. The resolved directory must contain
<PATH>/POT_GGA_PAW_PBE/. Validation happens before either configuration
file is updated.
With silence enabled, successful commands do not print to the terminal. Errors
that prevent an operation are still shown. Command details are never discarded:
every normal, non-help pmk <command> ... invocation appends its command,
timestamp, exit status, and screen output to <command>.log in the directory
where PMK was invoked. Repeated runs remain in chronological order in the same
file. Values registered by a command as sensitive are shown as <redacted> in
the logged command line. The log stays in the invocation directory even when a
command changes the working directory or -of selects an output folder.
Command help (pmk <command> -h or -help) and argument parsing errors exit
before loading configuration or writing an execution log. Argument parsing
errors are printed to stderr. Scientific result files such as rmsd.txt,
ehull.txt, d2o.txt, and quantity reports remain separate command-owned
artifacts; their contents are never merged into the execution log.
Commands
Commands that transform structures accept a single file (-i/-o), a folder
(-if/-of), or a trajectory where applicable. PMK delegates ordinary format
recognition to ASE, while CIF uses the specialized pymatgen path needed to
preserve occupancy, oxidation, symmetry, and Wyckoff metadata.
| Command | What it does |
|---|---|
config |
View or edit global PMK settings in .pmkrc.yaml |
convert |
Convert ASE/pymatgen structures, folders, and trajectories; set Config_type; refine CIF symmetry; order disorder |
dope |
Dope structures by substituting or removing selected atoms/sites |
ewald |
Compute CIF electrostatic energy |
gpumd-job |
Create supercell, temperature, potential, input, and grouped GPUMD jobs |
pred-msd-time |
Predict Li conductivity, diffusion and NVT production durations from GPUMD MSD |
gpumd-out |
Export GPUMD thermo/MSD results or gather final structures |
ionhop |
Count completed Li site hops and report nearest-neighbor hop frequencies from GPUMD trajectories |
msd |
Calculate atom-resolved mean squared displacement, self-diffusion, and optional Nernst–Einstein conductivity |
mp-chemsys |
Download stable Materials Project structures for a chemical system |
nep-rmse |
Compute NEP energy/force/stress RMSE and select candidates |
perturb |
Generate perturbed structures with dpdata |
rd |
Reduce descriptors to 2D with PCA or UMAP; optional FPS sampling |
realloc-occ |
Generate charge-balanced CIF occupancy allocations |
rmsd |
Compare structures and optionally remove higher-energy duplicates |
submit |
Submit VASP or GPUMD jobs through Slurm or PBS with queue throttling |
supercell |
Build a structural supercell by matrix, maximum length, or nearest target length |
trjconv |
Extract or stride trajectory frames by frame number or physical time |
vasp-job |
Create or inspect VASP jobs |
vasp-out |
Extract VASP quantities, compute E_hull, build NEP data, or gather final structures |
zip-traj |
Compress or restore trajectory bytes with a verified Zstandard frame |
Examples
pmk convert -i NaCl.vasp -o NaCl.xyz # always extended XYZ
pmk convert -i NaCl.vasp -o NaCl.xyz -config-type Fm-3m
pmk convert -if structures -of structures-pdb -oe pdb
pmk convert -it trajectory.traj -ot trajectory.xyz # ASE trajectory conversion
pmk convert -i NaCl.vasp -o NaCl-symm.cif -symm
pmk convert -if cifs -of ordered -d2o -supercell-matrix 1x1x1 -ncore 64
pmk supercell -i model.vasp -o model-sc.vasp -matrix 1x1x2
pmk supercell -if structures -of capped -max-abc 40
pmk supercell -if structures -of close -close-abc 50
pmk gpumd-job -if Li3YCl6-all -supercell-close-abc 50 -nep nep.txt -in run.in -temp 300 320 340 360 -group Li Y Cl -pgv-only no
pmk gpumd-job -it train.xyz -supercell-matrix 2x2x2 -nep nep.txt -group Li Y Cl -pgv-only no
pmk submit -gpumd
pmk submit -gpumd -subscript custom_gpumd.pbs -queue pbs -max-job-num 30
pmk vasp-job -if Li3YCl6-all -incar INCAR
pmk vasp-job -it train.xyz -incar INCAR -supercell-max-abc 40
pmk submit -vasp -subscript sub_vasp -queue slurm -max-job-num 30
pmk vasp-job -status -queue slurm
nohup pmk submit -vasp -queue slurm -max-job-num 30 > submit-terminal.out 2>&1 &
pmk trjconv -i example.xyz -b 10 -e 20 -o frames-10-20.xyz
pmk trjconv -i example.xyz -dt 10 -o every-10-frames.xyz
pmk trjconv -i example.xyz -b 10 -e 20 -timestep 1 -o time-10-20ps.xyz
pmk trjconv -i example.xyz -dt 10 -timestep 1 -o every-10ps.xyz
pmk rd -pca -i descriptor.out -o pca-descriptor.txt -it train.xyz
pmk rd -pca -i descriptor.out -fps 0.01 -it train.xyz
pmk rd -umap -i descriptor.out -o umap-descriptor.txt -fps 0.01 -it train.xyz
pmk mp-chemsys -s Li La Ta Cl
pmk gpumd-out -msd
pmk gpumd-out -thermo
pmk gpumd-out -save-fs -of gpumd-opted
pmk vasp-out -energy -force -stress
pmk vasp-out -born-effective-charge -dielectric-tensor
pmk vasp-out -all
pmk vasp-out -ehull -local Li-La-Ta-Cl-stable-entries-opted
pmk vasp-out -ehull -ref-form-e -1.1
pmk vasp-out -nep-train
pmk vasp-out -nep-train -position-only
pmk vasp-out -save-fs -fs-name CONTCAR -of vasp-opted
pmk dope -i Li3YCl6.cif -se Li -sn 1 -we Na -on 20 -seed 7
pmk ewald -if cifs -ncore 64
pmk realloc-occ -if cifs -of disorder -formula Li3YCl6 -occ 0.25 0.5 0.75 1 -ncore 64
pmk rmsd -if Li3YCl6-gpumd Li3YCl6-vasp -max-rmsd 0.5 -of Li3YCl6-gpumd-stable -ncore 32
pmk rmsd -if vasp-opted -rm-duplicate -of unique -gpu -ncore 64
RMSD folder comparisons
Use one folder to calculate every unordered compatible structure pair found recursively:
pmk rmsd -if FOLDER
One-folder duplicate removal uses a default maximum RMSD of 0.1:
pmk rmsd -if FOLDER -rm-duplicate -of UNIQUE_FOLDER
Set a custom inclusive threshold with -max-rmsd:
pmk rmsd -if FOLDER \
-rm-duplicate \
-max-rmsd 0.5 \
-of UNIQUE_FOLDER
Optional GPU fingerprint prefilter. The valid GPU mode is one-folder duplicate screening:
pmk rmsd -if FOLDER \
-rm-duplicate \
-of UNIQUE_FOLDER \
-gpu \
-ncore 64
-gpu does not move the exact RMSD calculation to CUDA. Its execution model is:
- CPU: structure loading and fingerprint construction.
- GPU: batched fingerprint candidate prefilter, which rejects clearly dissimilar pairs.
- CPU: exact pymatgen
StructureMatcherRMSDs for remaining candidates, optionally multiprocessing via-ncore.
GPU duplicate screening supports the default maximum RMSD 0.1; explicitly using
-max-rmsd 0.1 -gpu is equivalent and valid. For a non-default custom threshold,
omit -gpu and use the exact CPU path. This restriction avoids scientifically
unsafe filtering because the fingerprint cutoff has not been validated as a
general mapping to arbitrary exact RMSD thresholds.
Use two folders to calculate only cross-folder pairs with the same exact filename, including the extension and case:
pmk rmsd -if FOLDER_A FOLDER_B
Add -max-rmsd and -of together for directional filtering:
pmk rmsd \
-if Li3YCl6-gpumd Li3YCl6-vasp \
-max-rmsd 0.5 \
-of Li3YCl6-gpumd-stable
Here Li3YCl6-gpumd (Folder A) is the source/candidate folder and
Li3YCl6-vasp (Folder B) is the reference folder. PMK compares exact
same-filename pairs and copies only Folder-A structures with RMSD less than or
equal to the threshold into Li3YCl6-gpumd-stable. It never copies reference
structures from Folder B.
Two-folder modes perform no within-folder comparisons. Unmatched files are skipped and reported. If recursive discovery finds a basename more than once under either root, that ambiguous basename and its conflicting relative paths are reported and skipped rather than copied.
File I/O and XYZ
convert uses ASE read, iread/multi-frame indexing, format detection, and
write for ordinary formats supported by the installed ASE version. This
covers single structures, files in a folder, and trajectory conversion whenever
the selected format supports multiple configurations. Run ase info --formats
to inspect the exact formats available in that environment. Specialized CIF
reading/writing remains pymatgen-based to preserve PMK's disorder and symmetry
metadata.
For CIFs with explicit symmetry multiplicities, PMK validates every labeled Wyckoff orbit and the occupied composition after pymatgen expands the asymmetric unit. If finite coordinate noise splits a special position, PMK retries with the smallest bounded site tolerance that restores the declared multiplicities. It never accepts an expansion with different stoichiometry; an irreconcilable CIF stops with an explicit error instead of continuing with the wrong atoms.
Every newly exported .xyz file is written as extended XYZ (extxyz), including
single structures and trajectories. Commands that select existing trajectory
frames preserve already-extended source blocks byte-for-byte; if the source is
plain XYZ, selected frames are upgraded to extxyz. convert -config-type NAME
adds or replaces Config_type in every output XYZ frame and supports -i,
-if, and -it conversion modes.
Trajectory conversion
Without -timestep, trjconv -b/-e uses one-based, inclusive structure
numbers. -dt N retains the first frame and then every Nth frame. With
-timestep, every frame must contain a numeric Time= value and physical time
is Time * timestep in ps; -b, -e, and -dt are then interpreted in ps.
The output format is inferred from -o, and .xyz output is always extxyz.
Dimension reduction
rd requires exactly one of -pca or -umap. Descriptor rows remain aligned
with -it trajectory frames. Config_type-specific descriptor files and FPS
trajectory/descriptor outputs retain the earlier PCA/UMAP behavior; FPS is run
once globally and the selection is then partitioned by Config_type.
GPUMD jobs
gpumd-job accepts exactly one of -i, -if, or -it and optionally one of
-supercell-matrix, -supercell-max-abc, or -supercell-close-abc. -nep
and -in default to nep.txt and run.in in the invocation directory. Each
job receives model.xyz as extxyz, the potential as nep.txt, and the input as
run.in; the potential line is synchronized to nep.txt. With -temp, PMK
creates <structure>/<T>/ and replaces every target_t token with T.
-pgv-only yes is the default: retain species, positions, group (if present)
and velocity. ASE momenta become GPUMD vel in Angstrom/fs. Custom vel,
velocity, velocities arrays are interpreted as Angstrom/fs in that priority
order. Cell, PBC and atom order survive; unrelated properties and header metadata
are omitted. -pgv-only no uses the full-property writer. Deprecated
-pos-only yes still means positions only and emits a warning.
pmk gpumd-job -pre-prod ../1-pre-prod -in run.in
This mode discovers immediate numeric temperature directories (optional K suffix),
validates every source and destination, and copies each single-frame dump.xyz
byte-for-byte to model.xyz alongside nep.txt. Explicitly export a single desired
structure first if a dump has multiple frames. Active target_t tokens become
the directory temperature; comments remain intact and potential paths become
nep.txt. Missing files, duplicate temperatures, existing destinations or no
active placeholder fail before writing. Write failures roll back created jobs.
No additional structure or potential input is required. This mode conflicts with
structure inputs, supercell options, -group, -temp, -msd-time, -status;
PGV filtering does not apply to direct copies.
pmk gpumd-job -if opted-vasp -nep nep.txt -in run.in -temp 300 400 500 600
pmk gpumd-job -if opted-vasp -nep nep.txt -in run.in -temp 300 400 500 600 -pgv-only no
Explicit npt_scr pressure tokens, including zero and scientific notation, are
preserved. Cubic cells retain scalar pressure syntax and its elastic modulus and
coupling parameters. Non-cubic orthorhombic cells expand scalar pressure and modulus
into three matching components. Non-orthogonal cells use six components: scalar
pressure expands to three normal pressures and zero shear pressures, with the
specified modulus repeated. Existing complete directional controls are preserved;
when expanding three components to six, missing shear pressures are zero and
missing shear moduli use the established value 100. Cubic geometry requires angles
within 1e-4 degrees of 90 and a maximum length difference no greater than
1e-6 A + 1e-5 * max(a,b,c). This is a cell-metric check, not a space-group analysis.
Only wholly absent pressure controls use the established defaults (1e-04, modulus
100, coupling 1000); incomplete control lists report an error. Template files,
comments, and unrelated commands remain intact apart from the existing temperature
and potential-filename substitutions. In -if mode, an existing final job
folder (including an empty one) is left untouched while missing siblings are
still generated. With -temp, every structure/temperature folder is checked
independently.
gpumd-job -status recursively treats every folder containing gpumd.out as a
job and prints its path relative to the invocation directory. A minimization is
converged only when its completion phrase is present and its final f_max is at
or below the parsed force tolerance; a completed minimization above tolerance
is not converged, and missing required values or completion is incomplete. A
non-minimization is finished only when it has a valid Time used = ... s line.
The final valid runtime line is reported. Summary counts are total, finished,
converged, not converged, and incomplete; converged and not-converged
minimizations both count as finished.
Job submission
pmk submit (-vasp | -gpumd) [-subscript FILE] [-queue slurm|pbs] [-max-job-num INTEGER] [-sleep SECONDS]
Exactly one of -vasp or -gpumd is required. The queue defaults to Slurm,
the active-job limit to 30, and the wait between full-queue checks to 60
seconds. VASP uses sub_vasp by default; GPUMD uses sub_gpumd. A custom
script is copied into every submitted job folder, and successful scheduler IDs
are saved in .pmk-job-id. User-facing job names are relative to the invocation
directory, and execution details are recorded in submit.log.
submit -gpumd recursively submits only folders containing model.xyz,
run.in, and nep.txt. It skips directories with a valid saved scheduler ID
or existing GPUMD outputs. Existing submission scripts are reused when their
bytes match. A script conflict is reported for its directory and other jobs can
continue. VASP checks saved IDs against the scheduler and retains its
convergence-aware restart rules. A restart archives the previous job ID,
recognized outputs and, for relaxation, the input POSCAR and restart files
before updating the in-place restart inputs. vasp-job -status still reads
the current .pmk-job-id. An interrupted submission with uncertain scheduler
acceptance leaves .pmk-submit-lock for manual reconciliation.
GPUMD outputs
gpumd-out requires exactly one operation:
pmk gpumd-out -thermo [-entry-path DIR] [-thermo-file FILE] [-run-input FILE]
pmk gpumd-out -msd [-entry-path DIR] [-diffuse-ion ELEMENT] [-ion-charge INTEGER]
pmk gpumd-out -save-fs [-entry-path DIR] [-fs-name FILENAME] (-of DIR | -output-folder DIR)
-entry-path defaults to .. Thermo mode defaults to thermo.out and
run.in, writing per-job temperature.txt, potential-energy.txt,
pressure.txt, lattice-parameters.txt, volume.txt, lattice-angles.txt,
and the six-panel thermo.png. Abnormal-fluctuation diagnostics remain in
console warnings and gpumd-out.log; the plot has no abnormal-region shading
or legend. Thermo mode preserves earlier abnormal-time.txt files and skips
jobs whose thermo export paths already exist. MSD mode defaults
to mobile ion Li with charge 1, writes
sigma-sdc-summary.txt at the entry root, and preserves each job's
msd/group_*_msd.txt, group_*_sdc.txt, and group_*_results.txt.
The migration aliases -diffuse_ion and -ion_charge remain accepted.
Save-fs mode defaults to relaxed.xyz and gathers converged structures into
the explicitly requested output folder. Every executed mode uses
gpumd-out.log; scientific artifacts remain separate from that log. The
standalone gather-fs command is removed now that GPUMD and VASP gathering are
available as gpumd-out -save-fs and vasp-out -save-fs.
The standalone supercell command is now structure-only. Its removed
-individual, -temp, -md-if, and -gpumd-group workflows belong to
gpumd-job. In v1.7.0, the standalone gpumd-group and gpumd-trjcat
commands are removed; grouping needed during job creation remains available as
gpumd-job -group.
E_hull reference
vasp-out -ehull -ref-form-e EV_PER_ATOM keeps the normal Materials Project
or -local
formation-energy calculation, but replaces the phase-diagram hull distance with
E_hull = E_form - EV_PER_ATOM. All scanned structures must have the same
reduced formula because one scalar reference applies to one composition. The
exact difference is retained, including a negative value when a structure lies
below the supplied reference.
VASP jobs
pmk vasp-job (-i FILE | -if DIR | -it FILE) [-o DIR] [-incar FILE]
[-supercell-matrix N... | -supercell-max-abc L | -supercell-close-abc L]
pmk vasp-job -status [-queue slurm|pbs]
The three generation modes create one job folder per structure. PMK
uses pymatgen to generate POSCAR, POTCAR, and KPOINTS, then preserves the supplied
INCAR file exactly in each job. All three supercell modes are available during
generation. In -if mode, an existing final folder (including an empty one) is
skipped as a whole, so neither input generation nor the later INCAR copy changes
it; other missing targets in the batch are still generated. During vasp-job
input generation only, PMK hides pymatgen's BadInputSetWarning that says a
POTCAR symbol is not recognized for the selected user_potcar_functional.
Other BadInputSetWarning messages and unrelated warnings remain visible.
Submission has moved to submit -vasp, which retains the previous
convergence-aware Slurm/PBS queue limiter: jobs are discovered recursively,
converged jobs are skipped, unconverged relaxations restart from CONTCAR, and
the process sleeps while the active queue is full. Use nohup ... & when the
submit/check loop must survive logout. The old vasp-job -submit form and its
submission-only options are no longer accepted.
vasp-job -status recursively reports each prepared job and summary counts for
total, finished, converged, failed, and running. Job identifiers preserve nested
paths relative to the invocation directory. Submitted scheduler IDs are stored
in each job folder so running jobs can be identified with squeue or qstat.
For vaspout.h5, status uses h5py to read only the final energy,
final positions, required INCAR scalars, and the final force slice when checking
a relaxation. It does not construct a py4vasp Calculation or load complete
ionic trajectories. VASP output parsing still follows
vaspout.h5 > vasprun.xml > OUTCAR.
VASP outputs
vasp-out has four mutually exclusive operation families:
pmk vasp-out [-entry-path DIR] [-o DIR | -output DIR] (-all | QUANTITY_FLAG...)
pmk vasp-out -ehull [-entry-path DIR] [-mp-api-key KEY] [-local DIR] [-ref-form-e EV_PER_ATOM]
pmk vasp-out -nep-train [-entry-path DIR] [-nep-train-output FILE] [-position-only]
pmk vasp-out -save-fs [-entry-path DIR] [-fs-name FILENAME] (-of DIR | -output-folder DIR) [-max-ehull EV_PER_ATOM] [-ehull-file FILE]
Quantity extraction retains its existing grammar and scans VASP output files in
the current path and every descendant folder. Select any combination of
quantity flags, or use -all to attempt all 39 quantities listed by py4vasp
Calculation, including namespaced quantities such as
-electron-phonon-transport and -phonon-mode. Underscore/dotted spellings
from the API are also accepted; see pmk vasp-out -h for the exact list.
Reader priority is applied independently for every requested quantity:
vaspout.h5, then vasprun.xml with pymatgen, then OUTCAR with pymatgen.
For vaspout.h5, final energy is read directly with h5py as one scalar
hyperslab; other quantities use py4vasp. The fast path follows VASP's existing
dataset and chunk layout and never rewrites or rechunks the file. If a preferred
file exists but does not contain that quantity, PMK continues to the next
reader. Energy always means the final energy(sigma->0) value
(e_0_energy in pymatgen Vasprun data). Older or nonstandard HDF5 layouts
fall back to py4vasp.
Quantity results remain one text report per quantity under vasp-out/, such as
energy.txt, force.txt, and stress.txt. Numeric values use eight decimal
places. Forces include element-number labels; stresses are reported in both
GPa and eV/ų using 1 eV/ų = 160.2176621 GPa. Multiple calculations are
identified by relative folder path. -all skips unavailable datasets per
calculation instead of aborting the scan.
E-hull mode preserves Materials Project/local-reference handling, cache files,
deterministic ordering, and writes ehull.txt. A supplied -mp-api-key is
redacted in vasp-out.log. NEP-training mode preserves converged VASP
structures and extxyz energy/force/stress metadata; its default output is
train.xyz. When available, Born effective charge (BEC) tensors are automatically
included as the per-atom extxyz property bec:R:9, after forces. BEC extraction
independently follows vaspout.h5 > vasprun.xml > OUTCAR, so its source may differ
from the structure/energy source. PMK uses py4vasp's charge_tensors and the
existing quantity-reader fallback; pymatgen versions without Vasprun BEC support
continue to OUTCAR. OUTCAR extraction checks complete blocks and uses the final
complete block if several occur.
Each (n_atoms, 3, 3) tensor collection is validated for atom count, shape and
finite values, then flattened in printed OUTCAR row order (xx xy xz yx yy yz zx zy zz), without transposition, atom reordering or unit conversion (units of
elementary charge, |e|). Available py4vasp structure metadata is checked against
the final structure. Output files in one calculation directory must describe the
same atomic ordering. Missing or invalid BEC leaves the configuration intact,
with a diagnostic and no placeholder values. Mixed datasets retain independent
per-frame property declarations, and the summary counts frames with/without BEC.
-position-only skips BEC extraction and omits BEC together with other calculation
results. No additional CLI option is needed.
Final-structure
mode defaults to CONTCAR, requires an output folder, and optionally applies
the strict -max-ehull filter using ehull.txt by default. All modes use
vasp-out.log, separate from scientific artifacts. The standalone ehull and
vasp2xyz commands are removed.
Doping structures
pmk dope -i FILE -se SELECTOR... [-sn NUMBER...] -we ELEMENT|vac... [-wn NUMBER...] [-on NUMBER] [-ref SELECTOR...] [--reference-cutoffs DISTANCE...] [-o DIR | -output-folder DIR] [-output-format FORMAT] [-seed INTEGER]
dope replaces substitute and preserves its validation,
scientific substitution/removal behavior, and deterministic -seed behavior.
Random mode defaults to <input-stem>_dope/; reference-distance mode defaults
to <input-stem>_dope.cif. Execution details are written to dope.log. The
standalone substitute command is removed.
Automatic separation in 1.7.6
pmk dope -i LiI-333.vasp -se Li -sn 18 -we Cu -on 100 -o Li90Cu18I108 -ref Cu Cu -seed 42
pmk dope -i LiI-333.vasp -se Li -sn 18 -we vac -on 100 -o Li90I108 -ref vac vac -seed 42
With -sn and -on, an identical reference pair enables automatic max–min
optimization. One selector and one replacement species are supported, including
-we Na -ref Na Na; mixed references are rejected. Without -ref, ordinary
random substitution/removal is unchanged. vac is canonical; none is deprecated.
The primary score is the minimum periodic pair distance, including fixed preexisting
replacement atoms. Vacancy geometry uses original removed-site coordinates.
Small spaces (at most 2,000 combinations) are enumerated exactly. Larger spaces use
seeded randomized farthest insertion and one-site exchanges. Default restart budget:
max(4 * outputs, 8 * ceil(eligible / selected)); at most 2 * selected sweeps per
restart, stopping earlier when no improvement is found. Internal optimize_sites
keyword budgets support controlled validation. Initial and optimized candidates are
pooled, deduplicated by original indices, then ranked by minimum distance, mean
nearest-neighbor distance and mean pair distance. Scores rounded to 10 decimal places
resolve numerical ties; overlap diversity and index order break ties. No secondary
score can override a primary difference larger than that numerical tolerance.
-on 100 returns the best 100 distinct configurations found, not necessarily global
optima or symmetry-inequivalent structures. Insufficient combinations or exhausted
budgets report actual counts and termination. Distance-matrix memory is quadratic in
eligible plus fixed sites. Identical input, seed, arguments and dependency versions
reproduce selections. Both doping and vacancy operations share this engine.
Default filenames remain <input-stem>_r1.cif, etc., in <input-stem>_dope/ or -o.
Optimized CIFs use P1 to preserve the original cell and fractional coordinates;
VASP output keeps existing species grouping. Every optimized structure is reloaded
and checked for composition, lattice metric, retained positions and separation.
optimization-summary.txt is tab-separated with JSON metadata in a comment. It
contains filename, minimum and mean NN distances (Angstrom), packing diagnostic,
ratio, zero-based original indices and fractional coordinates. Metadata includes seed,
counts, fixed sites, budgets, method, termination and best/worst/median separation.
Optional exact certification runs after the same heuristic search:
pmk dope -i LiI-333.vasp -se Li -sn 18 -we Cu -on 100 -o Li90Cu18I108 -ref Cu Cu --certify-optimum
pmk dope -i LiI-333.vasp -se Li -sn 18 -we vac -on 100 -o Li90I108 -ref vac vac --certify-optimum --certify-time-limit 120
--certify-time-limit must be finite and positive and requires --certify-optimum.
Its default is 120 seconds for the entire certification stage; it does not change
the heuristic budget. Certification requires the automatic -sn/-on/-ref mode.
Small enumerated spaces reuse their proof without invoking a solver. Otherwise
SciPy's optimize.milp (SciPy >= 1.9, bundled HiGHS) tests sparse conflict graphs:
binary x_i selects a site, maximize sum(x_i), and x_i+x_j<=1 when d_ij<t. Candidate sites
too close to fixed dopants are disabled; conflicting fixed pairs make t infeasible.
Binary search over discrete periodic distance levels finds the largest feasible
threshold. A validated configuration plus proof that the next level is infeasible
(or exhaustion of all levels) certifies the global max-min distance.
All distinct float64 distance levels are retained without rounding or grouping.
Conflicts use strict d<t; returned configurations must satisfy d>=t with no distance
relaxation. Binary variables are checked within 1e-6 of 0 or 1. This conservative
policy may require extra solves for nearly identical distances. Proofs refer to
the computed geometry subject to HiGHS numerical tolerances, not exact arithmetic.
The validated heuristic score excludes already feasible levels. The packing upper
bound prunes larger levels only when the shortest self-image distance exceeds the
bound (with conservative numerical slack); thin cells retain the unpruned search.
Isolated vertices are forced into a maximum independent set. Closed-neighborhood
domination removes a vertex only when it can be replaced without reducing the
maximum cardinality. Deterministic clique inequalities strengthen sparse models;
a verified partition into fewer than K cliques, accounting for reductions, proves
infeasibility. LP dual multipliers are corrected for constraint residuals before
using their upper bound. Otherwise SciPy MILP maximizes independent-set cardinality.
Validated incumbents of at least K yield exactly K witness sites; a conservative
dual bound below K proves infeasibility even at a time limit. An insufficient bound
at timeout is never a proof. Preprocessing, LP and MILP share one monotonic budget.
Connected component counts are reported; no crystallographic symmetry is assumed.
Large graphs can still exhaust the budget. No optional solver is auto-installed,
and --n-jobs controls heuristic restarts, not MILP threads or MIP starts.
optimality-certificate.json records input, species, site indices, seed, solver
and SciPy version, distance policy, per-threshold outcomes, runtime, bounds and
saved-structure classifications. CERTIFIED_OPTIMAL means the proof completed;
IMPROVED_NOT_CERTIFIED means a validated improvement was retained without proof;
NOT_CERTIFIED means no proof or improvement was obtained. Timeouts and solver
failures retain valid candidates and never imply infeasibility. Invalid returned
incumbents are errors. Missing MILP support is reported without losing heuristic
outputs. Valid solver discoveries enter the existing pool before ranking.
The certificate distinguishes the optimum from the number of generated structures
attaining it; -on 100 does not imply 100 optimal or symmetry-inequivalent structures.
Default runs do not import or execute certification code or create this report.
Geometric separation optimality does not establish energetic or thermodynamic stability.
The equal-sphere packing diagnostic is
D_upper = (6 * (pi / sqrt(18)) * V / (N * pi)) ** (1/3), with total objective-site
count N including fixed dopants. It is a geometric restriction, not an attainable-site
promise or proof of heuristic optimality. Physical radii are irrelevant. If the
shortest self-image lattice translation is smaller than this value, the formula need
not bound the distinct-site objective: metadata marks it inapplicable and the ratio
is nan. No arbitrary physical cutoff is imposed.
-d/-distance is removed and reports migration guidance. Legacy reference removal
is selected only when both -sn and -on are absent:
pmk dope -i input.cif -se Li -we vac -ref La Ta --reference-cutoffs 1.01 1.02
Cutoffs remain Angstrom, one per reference. Omitting them preserves
0.7 * (Cordero covalent radius sum), sourced from ASE for H through Cm; missing
radii require an explicit cutoff. Output remains <input-stem>_dope.cif in the
invocation directory. --reference-cutoffs is rejected in automatic mode.
Execution logging remains in dope.log.
Breaking changes in v1.7.0
gpumd-thermoandgpumd-msdare replaced bygpumd-out -thermoandgpumd-out -msd.gather-fsis replaced bygpumd-out -save-fsorvasp-out -save-fs.ehullandvasp2xyzare replaced byvasp-out -ehullandvasp-out -nep-train.substituteis replaced bydope.vasp-job -submitis replaced bysubmit -vasp; GPUMD submission usessubmit -gpumd.- Standalone
gpumd-grouptagging andgpumd-trjcatare removed without replacement.gpumd-job -groupremains available during job creation.
Generated VASP structures
New .vasp files written by convert, standalone supercell, and
dope -output-format vasp automatically group atoms by species using
pymatgen's POSCAR ordering. For example, a 64-atom LiI supercell has a single
Li I species line and a 32 32 count line. Site order changes to group
species; the lattice, species-resolved positions, and selective-dynamics
flags remain associated with their sites.
Direct (fractional) coordinates are the default. Both convert and
supercell accept mutually exclusive -direct and -cartesian flags for
.vasp output. These flags also apply in folder mode and when convert
creates a supercell. They have no effect on CIF, XYZ, extxyz, or other output
formats. VASP job input sets and collected CONTCAR files retain their existing
behavior.
pmk convert -i LiI.cif -o LiI.vasp -direct
pmk convert -i LiI.cif -o LiI-cart.vasp -cartesian
pmk convert -if structures -of vasp-direct -oe vasp
pmk convert -i LiI.cif -o LiI-222.vasp -supercell-matrix 2x2x2 -cartesian
pmk supercell -i LiI.vasp -o LiI-222.vasp -matrix 2x2x2 -direct
pmk supercell -i LiI.vasp -o LiI-222-cart.vasp -matrix 2x2x2 -cartesian
pmk supercell -if vasp-direct -of vasp-cart -matrix 2x2x2 -cartesian
Other behavior
convert -d2o first symmetrizes the disordered structure so each distinct
Wyckoff orbit keeps its own occupancy constraint. It then uses pymatgen's
branch-and-bound Ewald ordering to find the lowest-energy ordered structure for
the fixed supercell matrix. This avoids the previous greedy solution and
prevents atoms from being redistributed between unrelated but chemically
identical orbits.
There is deliberately no convert -d2o -gpu flag: symmetry grouping and the
irregular branch-and-bound search are CPU/control-flow work, so transferring
small candidate sets to CUDA would add overhead without accelerating the search.
Multicore CPU
Independent CPU-heavy inputs are processed concurrently by convert -d2o,
ewald -if, realloc-occ -if, and exact folder-pair comparisons in rmsd.
Use -ncore N to choose the number of worker processes, or -ncore 1 to
disable multiprocessing. Without -ncore, PMK uses the single-node CPU
allocation reported by Slurm, PBS, or SGE and never creates more workers than
there are independent tasks. Outside a scheduler, automatic mode is capped at
four workers to avoid unexpectedly occupying an entire workstation. Numerical
libraries are limited to one native thread in each worker to prevent nested
thread oversubscription.
convert -d2o is more memory-intensive than the other parallel commands
because every worker runs a pymatgen branch-and-bound/Ewald search. Its
automatic scheduler mode is therefore capped at eight workers. Use
-ncore N to override that cap when the node has enough memory. The command
prints its selected worker count before starting and reports progress whenever
a CIF finishes; final files and reports remain deterministically ordered.
rmsd -if folder comparisons show one tqdm bar for the exact pairs scheduled, and
convert -d2o shows one bar for all scheduled CIFs. These bars appear only on
an interactive terminal: silence mode and redirected/non-TTY execution suppress
them, and progress rendering is not stored in command execution logs.
If one CIF remains active for more than 60 seconds, PMK terminates only that
CIF's worker, skips its conversion, copies the original input into
large-d2o-combination in the invocation directory, and starts the next queued
CIF. This applies to both convert -d2o -i and convert -d2o -if; d2o.txt
records the timeout, elapsed time, and copied path. The folder is created only
when at least one calculation times out.
For one PMK disorder-to-order process using eight CPU cores on one Slurm node:
#!/bin/bash
#SBATCH -J Nwyd-pmk
#SBATCH -p normal
#SBATCH --nodes=1
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=8
source ~/softwares-env/anaconda.sh
conda activate pymdkit
pmk convert -if Li4YCl6-disorder/ -of Li4YCl6-disorder-order -d2o -ncore 8
Prefer one Slurm task with --cpus-per-task for this local multiprocessing
model. The older single-node form -N 1 with -n N is detected through
SLURM_NTASKS, but it describes multiple Slurm tasks rather than one
multicore PMK process. Keep the job on one node. The project audit intentionally
leaves
HDF5/VASP scans, GPUMD plotting, trajectory copying, scheduler submission,
network/API commands, and NumPy/UMAP reductions outside this process pool:
those paths are I/O-bound, own their native parallelism, or write shared state.
realloc-occ.txt and every generic <command>.log execution log stay in the
invocation directory. Silence mode suppresses successful command output, but
pmk <command> -h always displays help and operation-blocking errors are
always visible.
Each command's full flag list is available with pmk <command> -h.
Automatic scan modes include matching files directly in the current path as
well as files in folders, subfolders, and deeper descendants. This rule applies
to shared structure-folder processing, VASP calculations, GPUMD outputs, and
trajectory gathering; explicit -i and -if modes remain available.
Layout
pymdkit/
|-- pyproject.toml # package metadata and `pmk` entry point
|-- README.md
`-- src/pymdkit/
|-- pymdkit_main.py # command discovery and dispatch
|-- _config.py # environment-wide .pmkrc.yaml settings
|-- _logging.py # execution-log argument redaction helpers
`-- commands/
|-- convert.py # ASE/pymatgen conversion and CIF workflows
|-- trjconv.py # trajectory extraction and stride
|-- rd.py # PCA/UMAP dimensional reduction
|-- gpumd_job.py # GPUMD job generation
|-- vasp_job.py # VASP generation and status
|-- chemsys_entry.py # `mp-chemsys` implementation
|-- ... # remaining public commands
`-- _*.py # private shared helpers
Modules whose name starts with _ are shared helpers and are skipped by the
dispatcher, so they never appear as commands.
Adding a new tool later
Drop a module in src/pymdkit/commands/ that defines four things:
COMMAND = "my-tool" # the subcommand name you'll type
HELP = "One-line description."
def add_arguments(parser): # register flags
parser.add_argument("-input", required=True)
def run(args): # do the work; return an exit code (0 = ok)
...
return 0
if __name__ == "__main__": # keeps the script runnable on its own
import argparse
_p = argparse.ArgumentParser(description=__doc__)
add_arguments(_p)
raise SystemExit(run(_p.parse_args()))
It will appear in pmk -help automatically - no central registration needed.
Put heavy imports (pymatgen, ase, ...) inside run() where practical; the dispatcher
reads each command's name and help without importing it, so pmk -help stays
fast and a missing optional dependency only affects the one command that needs it.
Running a script standalone
Every command module still works directly, which is handy for debugging:
python src/pymdkit/commands/supercell.py -i in.cif -close-abc 20 -o sc.vasp
Trajectory compression and decompression
pmk zip-traj archives GPUMD extended XYZ and other files as a standard
Zstandard frame. It preserves every byte, including decimal precision,
Lattice, Properties, unwrapped_position, groups, IDs, timestamps,
custom fields, and line endings. It uses the Python zstandard package.
pmk zip-traj -it dump.xyz
pmk zip-traj -it ./dump.xyz
pmk zip-traj -it "350/dump.xyz" -level 3 -threads 4
pmk zip-traj -it "350/dump.xyz.zst" -d
pmk zip-traj -it "350/dump.xyz.zst" -d -o restored.xyz
| Option | Meaning |
|---|---|
-it, -input-trajectory |
Bare filename for a recursive search, or an explicit path for one file. Defaults to dump.xyz. |
-d, -decompress |
Restore a checksummed Zstandard frame. The default output removes the .zst suffix. |
-o, -output |
Output path with an explicit input path. |
-level |
Compression level from 1 through 22, default 3. |
-threads |
Number of compression workers. The default 0 compresses synchronously. |
A bare filename such as dump.xyz searches the current directory and its
subdirectories, even when the current directory contains a match. The search
matches the exact, case-sensitive filename and processes matches in path
order. It skips directory links and Windows junctions, linked file aliases
and duplicate file identities, and directories such as .git, virtual
environments, caches, build and dist. An explicit path such as ./dump.xyz,
.\dump.xyz or an absolute path selects one file.
Compression creates <input>.zst beside each input by default. An existing
output is preserved and reported as SKIPPED_EXISTING with the message
not verified by this run. The summary counts Verified, Skipped existing
and Failed separately. File failures, including publication races, produce
a nonzero exit status while independent inputs continue. A run with only
verified and skipped-existing files exits with status 0 if the scan completed
without errors. Ctrl+C stops the batch and removes the current staged output.
The command records details in zip-traj.log or uses a numbered log when
that path is shared by an input or output.
Compression streams raw bytes and computes the byte count and SHA-256. Before
publishing the output, it streams the staged archive through decompression,
checks the frame checksum, and compares both the count and SHA-256. Successful
compression reports VERIFIED. Decompression checks the frame checksum and
reports the restored SHA-256 for comparison with the compression log. It
accepts one complete standard frame with a content checksum and rejects
truncation, corruption and trailing data. Both operations stage output beside
its destination, publish atomically when checks pass, and preserve the input.
Linux filesystems must support hard links in the output directory. Use a
completed trajectory and allow disk space for the staged output.
On Windows, the 300 K, 40 ns Li₄YI₇ trajectory compressed from 18.71 GB to 8.50 GB at level 3 (54.59% saved). Compression and output synchronization took 111.08 s. Streamed decompression and verification took 34.12 s. Peak process working set was 43.02 MiB. An independent stream confirmed the same byte count and SHA-256. These measurements apply to this file and machine. See the benchmark and reproducibility details.
Atomic trajectory MSD
pmk msd -group 0
pmk msd -group 0 -ne
pmk msd -group 0 -ne -charge 2
pmk msd -group 0 -fit-method gls
pmk msd -group 0 -fit-range 10 100
pmk msd -group 0 -ne -trajectory-range 0 10
pmk msd -group 0 -ne -trajectory-range 10 20
-md-program gpumd is the default. The current directory and calculation
subdirectories are searched deterministically, excluding generated msd, hidden,
environment and build directories. Each calculation needs model.xyz, run.in
and the native full-system trajectory named by dump_xyz, or dump.xyz from
legacy dump_exyz interval velocity_flag force_flag. Group selection uses the
first grouping method in model.xyz. -group is optional; omission selects all atoms.
Missing group labels are an error only when a group is requested.
Both dump_xyz interval filename properties... and GPUMD 4.2's
dump_xyz grouping_method group_id interval filename properties... are supported.
For example, dump_xyz -1 0 200 dump.xyz group unwrapped_position saves the whole
system every 200 steps. Legacy grouping methods must be negative (full system);
the group ID must be an integer and is ignored in this mode. Subset trajectories
are rejected because whole-system COM correction requires every atom. Legacy
group and modern group_labels properties are supported. Earlier NPT
equilibration without trajectory output is allowed before fixed-cell NVT production.
Directories with active unresolved target_t, ${...} or {{...}} placeholders
in run.in are skipped with a reason; commented placeholders are ignored.
This is the mean of individual atomic squared displacements, not group-COM MSD. Every frame is streamed through a native GPUMD numeric parser (other extxyz schemas retain the ASE fallback), then selected coordinates are stored in a temporary float64 memmap. All system atoms contribute to mass-weighted COM displacement removal using ASE tabulated atomic masses. For every frame, the correction is the sum of each atom's mass times its unwrapped displacement from the first analyzed frame, divided by the total system mass. The correction is applied once, before selecting the group or element. A trajectory segment uses its own first frame, and multi-element analysis shares the corrected coordinates. Species order, atom count, PBC flags, and group/ID columns (when present) are checked against the model. Native GPUMD full-system row ordering is required: externally sorted same-element atoms without stable IDs cannot be identified and must not be supplied.
For fixed triclinic cells, consistent unwrapped_position is preferred; otherwise
ASE's general lattice minimum-image algorithm accumulates successive displacements.
For example, dump_xyz 1000 dump.xyz followed by pmk msd -group 0 -ne
needs no additional coordinate option. Properties are identified by declaration,
including files with extra group or other fields. All atoms are reconstructed
before whole-system COM correction and group selection. Reconstruction state
persists across the 256-frame storage chunks; partial PBC is respected. Cells
must remain constant within rtol=1e-10 and atol=1e-8 Angstrom.
The maximum reconstructed step is recorded; a step exceeding 40% of the smallest
periodic face spacing emits a heuristic sampling warning. It cannot detect all
missed crossings, including motion by an entire cell between samples.
Provenance records unwrapped_position or reconstructed_from_wrapped_pos, the
ase-mic-v1 reconstruction version, cell, and PBC. Fingerprint checks remain.
Legacy explicit-unwrapped results remain reusable; legacy wrapped results lacking
coordinate provenance must be moved aside and recomputed with schema validation.
Wrapped output must be frequent enough to resolve each displacement uniquely;
multiple unseen boundary crossings cannot be recovered from saved frames.
MSD analysis supports fixed-cell NVT production. NPT and changing-cell
production are rejected, including pure affine deformation.
The default --fit-window auto searches atom-based total MSD lag windows using
log-log OLS beta, then calculates D independently with free-intercept Einstein
OLS (directional slopes/2; total is their arithmetic mean). Following
MDTransport (2026), the search grid
is 100 ps. The default minimum duration is min(T/2, 8000 ps), a continuous
pymdkit engineering adaptation of the published piecewise rule that avoids
infeasible windows immediately above 10 ns. Following
He et al. (2018), every automatic
upper lag is strictly below 0.7T. T is saved frame count times frame interval,
not the absolute simulation timestamp. Grid boundaries map to nearest MSD
samples; first positive lag and last allowed lag are included as endpoints.
The minimum duration is never silently relaxed.
Controls are --min-fit-window PS, --fit-window-step PS, and
--beta-tolerance VALUE (default 0.075, maximum 0.20). Among beta-qualified
windows, choose D closest to the pool median, then smaller beta deviation, then
longer duration. Without qualified windows choose minimum beta deviation.
Separate beta_status, intercept_status, einstein_slope_status and
overall_status distinguish raw beta from affine Einstein model consistency
and slope stability. Beta thresholds remain 0.075 and 0.20. PASS additionally
requires available, positive early/middle/late Einstein slopes with relative
spread (max-min)/median <= 0.20. Insufficient segment data or a larger spread
produces WARNING for beta within 0.20. Above 0.20 the result is REJECT unless
the positive-intercept model agrees with observed beta within 0.05 and
segment stability passes; this exception permits WARNING only, never PASS.
The default reported D uses free-intercept OLS, MSD(t) = A + 6 D t.
For each valid candidate, diagnostics retain free-intercept D,
intercept fractions at both endpoints, and beta predicted
by log-log OLS of b+s*t on the actual fitting samples. No intercept is
subtracted from the measured MSD. A detected intercept effect explains model
consistency, not the physical cause of the intercept. Full-window D remains the
published estimate; segment D values never replace it. Segment diagnostics are
computed only for the selected candidate, with explicit unavailable reasons.
Relative D sensitivity (P90-P10)/median > 0.5 also produces WARNING. These
are diagnostics, not evidence of statistical convergence. Internal thresholds
are named constants in _msd_auto.py; no smoothing or independent-window
sample-count assumption is used. --mobile-site-distance A optionally checks
the approximate MSD >= 0.5a^2 criterion using a known neighboring mobile-site
distance; this is not a universal cutoff or an inferred instantaneous ion distance.
Without it the structural ballistic cutoff is not independently determined.
-fit-range START_PS END_PS retains manual lag-window fitting, including its
previous upper-lag freedom; it conflicts with explicit --fit-window auto.
--fit-window manual requires a range. For example:
pmk msd -group 0 -ne --fit-window auto
pmk msd -group 0 -ne -fit-range 500 1200
Optional -fit-method wls and -fit-method gls use consecutive non-overlapping
blocks at dyadic lags tau_i=2**i*dt. Errors use ddof=1 across particle-averaged
block diffusivities MSD/(2dtau). Both fit
D_inf*(1-b*(tau/tau_ref)**(-c)). Automatic selection uses the existing Moustafa
criterion with at least four tail points, independently of the OLS window.
Manual -fit-range maps to valid binary levels and needs at least four points.
No overlapping blocks are invented. --binary-discard-longest 3 is a configurable
application default; neighboring settings are recorded as sensitivity, not a CI.
Constant/no-tail data or an unidentifiable power law can legitimately fail.
WLS ignores off-diagonal covariance; GLS uses R_ij=2**(-abs(i-j)/2) with original
binary indices. Cholesky whitening and condition checks use standardized
correlation, without jitter, regularization or estimator fallback. Diagnostics
include levels, blocks, errors, interval, residuals, reduced chi-square and
tail/plateau counts. Weighted total D fits the pooled 3D curve; separately fitted
axes on the same domain may be unavailable (NaN) and need not average to total D.
The 2024 binary covariance assumes Wiener-like
dynamics and the stated sampling scheme, and is not validated here for interacting
ionic solids. It is separate from Bullerjahn's 2020 all-origin/static-noise
model. No unconditional chi-square or KS hard
threshold is introduced. MDTransport
provides additional species/beta context, without copying empirical thresholds.
OLS retains its free intercept, positive-intercept model-consistency diagnostic,
three-segment slopes and window sensitivity. Raw beta alone is not physical proof
of anomalous diffusion. --uncertainty covariance remains OLS-only; binary errors
are conditional local-Jacobian approximations, not validation of the regime.
pmk msd -element Li -ne Li
pmk msd -element all -ne Li
pmk msd -group 0 -element all -ne Li
pmk msd -element Li -ne Li -fit-method gls --binary-discard-longest 3
-element all (default) analyzes each chemical element independently; symbols
are case-normalized. Invalid/absent elements and -element Li -ne Na fail.
Whole-system ASE-mass COM correction happens once before species selection.
Single-element results keep the flat msd/ layout. Multiple elements use
msd/elements/<Element>/, each with raw MSD, diagnostics and its own fit interval.
Rejected non-NE species retain raw data with unavailable D without blocking valid
NE output. Only the requested species contributes its D and count to conductivity.
Root sigma.txt and sigma-total.txt describe that species. Element summaries
are self-diff-by-element.txt, self-diff-by-element-total.txt, and
msd-quality-by-element-total.txt. Single-species numeric columns are unchanged.
Aggregate publication and Arrhenius output share one rollback transaction.
Completed compatible runs can be reused, including rejected non-NE diagnostics.
Changed inputs/settings require moving existing results aside before recalculation.
Every saved msd.txt is read back for a 300 dpi msd.tif using Matplotlib Agg. Positive
time/MSD values appear on log-log axes with x/y/z/total curves and the actual
method's fitting interval, element, method, D, beta and quality. Rejected candidates
are labeled. Plot failures emit a separate warning and retain raw MSD. Figures
are closed after saving.
-trajectory-range START END selects a separate saved-trajectory subset in ns,
using the half-open interval [START, END) relative to the first original
Time= header, not the simulation start. GPUMD header times are in fs.
Every scanned timestamp must be finite, increasing, uniformly spaced and
consistent with run.in; missing timestamps/frames or unreliable thermo
alignment fail clearly. Boundary comparisons use the existing schedule-scale
tolerance max(1e-5 fs, abs(Time)*1e-9) for floating accumulation. Available
coverage ends one sampling interval after the last frame (thus 100000 frames
at 0.2 ps cover 20 ns). Actual selected timestamps/count are recorded.
Headers and rows before START are streamed without coordinate parsing; reading
stops at the END header when present. The suffix beyond END is not validated.
Only selected coordinates enter the existing whole-system mass-weighted COM
correction, selected individual-atom memmap and independent all-origin FFT.
Lag time restarts at zero; -fit-range remains an independent lag interval in ps.
Range outputs go to msd/segments/START-ENDns/, with shortest decimal float
values expanded without exponent or redundant trailing zeros (0-10ns,
10-20ns, 0.5-2.5ns). Existing segment directories are refused. Full-run
outputs, other segments and root summaries are preserved; successful segment
aggregate summaries live in the segment directory. Each segment also records
diagnostics.json, fit-windows.txt and fit-diagnostic.txt, including REJECT.
No credible fit means no new formal D or conductivity. A 10 ns segment cannot
fit the full trajectory's 5.9–14 ns window: unchanged automatic thresholds
search only its available lags. NE uses measured thermo samples in the same
half-open global interval, after header/schedule alignment and cell checks;
segment mode never substitutes a full-run temperature or nominal fallback.
No validated uncertainty estimate or formal confidence interval is implied.
Omitting -trajectory-range retains the full-trajectory path.
Each successful calculation creates msd/msd.txt (five numeric columns: lag
time in ps, x/y/z MSD and their sum in Ų), msd/self-diff.txt (x/y/z/total
diffusion in cm²/s, %.2e) and, only with -ne, msd/sigma.txt (x/y/z/total
Nernst–Einstein conductivity in mS/cm, %.2f). Headers are comments. Total
diffusion and conductivity are directional arithmetic means before rounding;
display rounding may cause last-digit differences. PASS and WARNING write these
coefficients with the quality status in their comment headers. provenance.json
records the final quality and full-precision total coefficients.
With -ne, an automatic or manual window with finite, positive x/y/z/total
Einstein diffusion coefficients retains D and NE conductivity even when the fit
quality would otherwise be REJECT. The overall status becomes WARNING. The
original reason and the beta, intercept-consistency, and three-segment slope
diagnostics remain in the fit output. A WARNING can indicate that the physical
diffusion regime failed quality criteria. Without -ne, REJECT returns nonzero
and retains only raw MSD and fit diagnostics. PASS and WARNING retain D.
fit-windows.txt records evaluated candidates, rejection reasons, beta,
directional D, R², intercept, RSS, points, upper-lag origin count, intercept
diagnostics, and selected-window segment D values. fit-diagnostic.txt records
settings, selection, and sensitivity. Beta-qualified window sensitivity,
all-valid-candidate sensitivity, and three-segment slope spread are reported
separately. Segments and MSD time origins are correlated. Window-to-window spread
measures sensitivity. Formal statistical uncertainty requires an explicit
request. Temporary coordinate storage is removed when the calculation ends.
When the result directory is absent, pmk msd calculates it. When a compatible
result already exists, the command reuses its full-precision coefficients and
quality without reading trajectory coordinates. It checks version-1 provenance,
input and output sizes and modification times, grouping method 0, atom counts,
run cadence, fit settings, selected window, and diagnostic and coefficient
totals. New single and multi-element results record whole-system mass-weighted COM
with algorithm version 1. Explicitly different methods or versions invalidate
reuse. Earlier results using the same COM retain the existing legacy checks.
A missing msd.tif is regenerated from validated msd.txt and its
plot fingerprint is recorded in provenance. With -ne it also checks the
charge and thermodynamic inputs and recomputes the stored conductivity from
full-precision D, temperature, volume, and ion count. Primary 1.7.4 results
can be reused when diagnostics establish compatibility, including the effective
lag bounds for a manual window. Missing provenance, stale files, incomplete
outputs, incompatible settings, and REJECT results cause an error and leave the
result directory intact. Move that directory aside before recalculating.
With --uncertainty covariance, reuse also requires the original uncertainty
settings, output fingerprints, and matching input hashes and paths. Older
results without those settings or fingerprints require recalculation for an
uncertainty request. The existing full-run NE covariance fallback can reuse
nominal temperature when thermo.out was unavailable. Ordinary NE and range
NE still require thermo.out.
The five-column raw MSD is published immediately after FFT succeeds, before
window search, optional uncertainty, or thermodynamic/NE processing. Later errors
retain this curve and any completed fit diagnostics. A missing valid regression,
a failed requested WLS/GLS estimator, or invalid required thermodynamic inputs
returns nonzero and prevents publication of new coefficients and aggregates.
Parsing and FFT failures occur before the raw curve is published.
FFT uses float64 atom chunks sized from an internal 128 MiB workspace budget,
with bounded remapping of time slabs to avoid retaining the entire coordinate
memmap in RAM. For 100000 frames and 784 selected atoms the temporary coordinate
file needs 1,881,600,000 bytes, plus filesystem overhead and output files.
Installation diagnostics are available with python devtools/diagnose_msd_install.py;
run it using the interpreter in the pmk shebang, since source and installed
distribution versions can differ. Both pmk -version and pmk --version work.
Optional covariance uncertainty (experimental Phase 4B.1.1):
pmk msd -group 0 --uncertainty covariance
pmk msd -group 0 -ne --uncertainty covariance --uncertainty-lag-points 100 --uncertainty-confidence 0.95
Adds self-diff-uncertainty.txt, uncertainty-diagnostic.txt and, with -ne,
sigma-uncertainty.txt, using labeled JSON records. Existing point estimates and
formats remain unchanged. Available results include 68% and 95% Bayesian credible
intervals plus the requested confidence-level interval. SciPy is lazily imported.
All overlapping origins contribute to moments: M=N_mobile*(N_frames-lag_index).
The continuous effective scaling parameter is N'=N_mobile*N_frames/lag_index,
not a literal count of disjoint intervals. The default selects 100 original lag
indices including window endpoints. The smoothing law a*t^2/N_effective uses
closed-form unweighted nonnegative least squares, verified against the objective
in kinisi 1.1.0 (without copying its implementation).
Continuous counts remove the artificial integer discontinuities. Diagnostics
compare raw and smoothed covariance, and Tabeart minimum-eigenvalue reconditioning
at condition limits 1e8/1e12/1e16, including eigenvalue adjustments, relative matrix
change and conditional posteriors. The threshold is lambda_max/condition_limit;
no diagonal jitter is added. Failed numerical verification remains unavailable.
Real 500 K covariance is now positive definite, but reported intervals remain
UNAVAILABLE: interacting-ion coverage has not been established. WARNING windows
retain conditional candidates in diagnostics only; rejected windows have none.
CLI success does not imply an available interval: inspect the uncertainty status.
Intervals are conditional on the chosen window and estimated covariance.
Interacting ions and whole-system COM correction limit the independent-particle
approximation. Covariance-parameter, window-selection, distinct-ion correlation
and Haven-ratio uncertainties are excluded. With uncertainty requested, missing
thermo.out uses a labeled nominal stationary NVT target; the existing ordinary
NE path still requires measured temperature. NPT remains release-blocked.
See Phase 4B.1 report.
The Phase 4B.1.1 correction report
supersedes its effective-count and real-covariance conclusions. Correlated-particle
nominal 95% coverage is 67% in the corrected seeded benchmark; a narrow interval
does not demonstrate statistical convergence.
External validation is opt-in via PYMDKIT_MSD_TEST_DATA or:
python devtools/validate_msd_uncertainty.py --data-dir PATH --output NEW_OUTPUT_DIRECTORY
Output must be a new directory outside the input dataset. The script hashes original inputs/results before and after, regenerates missing diagnostics, reads the original trajectory and removes temporary coordinates. Normal tests do not require this external dataset.
After every directory is calculated or validated for reuse, single-element
self-diff-total.txt and, with -ne, sigma-total.txt summarize directory, temperature (K), and the
isotropic total D (cm²/s, %.2e) or conductivity (mS/cm, %.2f). Rows use
relative paths and sort by numeric temperature, then path. Summaries use internal
unrounded totals. NE uses measured mean production temperature; without NE a
single stationary production NVT target is required (ramps, multiple targets and
missing NVT targets produce an explicit error). Calculation or validation
failures return nonzero and preserve previous summaries. Unresolved templates
are skipped. A successful run without -ne can reuse diffusion from a
compatible previous NE result and retains any existing conductivity summary and fit.
Range runs reuse only the matching segment result and publish totals under
root/msd/segments/START-ENDns/, separately from full-trajectory root summaries.
The companion msd-quality-total.txt retains each directory's PASS/WARNING
status. In NE mode, a directory whose valid coefficients were retained despite
fit-quality rejection appears as WARNING and contributes to both numeric
summaries. A single-element rejection without -ne prevents publication of new
aggregates. Multi-element aggregates identify rejected non-NE elements individually.
Multi-temperature Arrhenius analysis
MSD writes arrhenius-diff.txt in the analysis root. With -ne it also writes
arrhenius-sigma.txt for the selected mobile element. Multi-element diffusion
fits are written under arrhenius/<Element>/arrhenius-diff.txt. Trajectory-range
fits are stored alongside the corresponding range summaries.
The free-intercept OLS model uses x = 1000/T and y = b + m*x. It fits
ln(D) for diffusion and ln(sigma*T) for conductivity. The prefactors are
D0 = exp(b) in cm²/s and A_sigma = exp(b) in mS·K/cm, respectively. Each fit
uses Ea = -1000*m*k_B in eV with k_B = 8.617333262145e-5 eV/K.
R² = 1 - sum((y - y_fit)^2) / sum((y - mean(y))^2) is reported as N/A
for a constant response.
Each eligible directory contributes one independent observation, including
500/, 500-2/ and 500-3/ at the same temperature. Output rows sort by
increasing 1000/T and then by directory. The fit requires three distinct
finite positive production temperatures with finite positive coefficients.
The file lists included and excluded observations, the number of WARNING
observations, the temperature range, total observations N, and distinct
temperatures N_T. Insufficient data produces N/A parameters and
FIT_STATUS=INSUFFICIENT_DATA while preserving any earlier valid fit.
Material and analysis compatibility uses fingerprints of the starting model
and available nep.txt along with group, element, charge and fitting settings.
Historical rows without verified compatibility stay in the public summaries
and are reported as excluded from the fit. The exact starting-model fingerprint
can exclude simulations initialized with separately generated models.
In a multi-element run, sigma-total.txt adds an Element column after the
existing numeric columns so the conductivity species is explicit.
See the automatic-fit report for validation,
and the intercept/stability update
for the current policy, 500 K MSD comparison and limitations.
-ne ELEMENT requires that element in the selection and thermo.out.
Bare -ne infers the element only for a single-element selection. The default
-charge 1.0 is an explicit +1 formal-charge assumption, not inferred oxidation
state; negative charges are accepted and the sign cancels. The log records charge,
measured and target temperature, volume and fit diagnostics. Thermodynamic rows
are aligned using every run's own output interval. Volume is the absolute cell
determinant from columns 10–18, never a separate column or the initial model
volume. Only records between the first and last saved trajectory timestamps are
averaged; shared sample times cross-check trajectory volumes. The thermo reader
supports NPT mean volumes internally, but this does not enable NPT MSD. NVT
volumes must be constant. Measured mean temperature enters the NE equation;
a >5% target mismatch warns. Temperature ramps are rejected for NE.
Nernst–Einstein conductivity uses self-diffusion and neglects distinct-ion cross
correlations. It is not generally equal to experimental conductivity. The existing
gpumd-out -msd workflow is unchanged.
Count Li site hops in GPUMD trajectories
pmk ionhop -model model.xyz -trajectory dump.xyz -prefix Li4YI7_300K
pmk ionhop -prefix LiYI7
Supply both paths for single mode. It writes <prefix>_sites.csv,
<prefix>_jumps.csv, and <prefix>_summary.json. The sites CSV lists the
one-based site IDs, fractional coordinates, O/T type, and initial occupancy.
The jumps CSV records the Li atom and site IDs, arrival and confirmation times
in ps, displacement in Å, hop class, and sampled tetrahedral evidence.
The JSON includes counts, site-link statistics, initial occupancy, iodine
alignment, mean displacement, sampling and processing timings, and method
limitations.
With both paths omitted, batch mode looks for immediate integer-temperature
subdirectories with model.xyz and dump.xyz. It warns about incomplete
directories, rejects duplicate integer temperatures, and processes complete
directories in numeric order. Use a plain prefix such as LiYI7 to write
LiYI7_300K_sites.csv, LiYI7_300K_jumps.csv, and
LiYI7_300K_summary.json inside 300/. After every trajectory succeeds it
atomically merges root hop_freq.txt, with header Temp(K) Hop_freq(s-1)
and one temperature and frequency per row. Existing per-temperature files are
skipped by default while new temperatures are processed. The existing
-overwrite option explicitly replaces per-temperature outputs. A failed
batch retains the prior table and any independently published results.
| Option | Default | Meaning |
|---|---|---|
-model |
Omitted | Model XYZ path, paired with -trajectory |
-trajectory |
Omitted | GPUMD dump XYZ path, paired with -model |
-prefix |
Required | Output prefix in single mode, plain material label in batch mode |
-radius |
1.25 Å | Site-core radius, positive and below half the O–T spacing |
-min-frames |
2 | Consecutive destination frames needed to confirm a hop, at least one |
-max-frames |
Omitted | Limit the number of frames read, at least two when supplied |
-backend |
cpu |
SciPy cKDTree or numpy for batched analytic CPU assignment |
-batch-frames |
256 | Positive batch size for the NumPy backend |
-no-iodine-align |
Off | Disable iodine-frame alignment for legacy comparisons |
-overwrite |
Off | Allow replacing existing batch outputs |
Each option also accepts its double-dash spelling. Both backends use the CPU.
The model must contain Li, I, and either Y or La, with an fcc iodine sublattice.
The trajectory must preserve atom order and have evenly spaced, increasing
Time= values in fs. Axis-aligned cubic cells may vary in volume.
Octahedral O sites are the ideal fcc cation positions. Tetrahedral T sites are the ideal interstices. Periodic nearest-site assignment uses the site cores. Iodine atoms are matched to ideal references in the model and tracked by atom identity. Each frame removes the median three-dimensional minimum-image iodine displacement from the Li coordinates. Reported site fractions are in that aligned frame.
A completed hop starts at a persistent O site and ends at another O site after the configured consecutive destination frames. T visits contribute only pathway evidence. The reported frequency is the number of confirmed nearest-neighbor O-to-O hops divided by the number of Li ions and the elapsed seconds from the first to the last saved frame. The unit is s⁻¹. Long or unresolved multihops are counted separately. A trajectory can miss brief T visits and recrossings between frames, so an O-to-O hop with no sampled T visit leaves its pathway unresolved.
The site-core and residence-time approach follows de Klerk et al., ACS Applied Energy Materials 1, 3230–3242 (2018), and Lavrinenko et al. (GEMDAT), npj Computational Materials 12, 259 (2026). DOI 10.1021/acsaem.8b00457 and DOI 10.1038/s41524-026-02133-7.
Plan GPUMD NVT production from Li MSD
Run the predictor from a project directory containing completed GPUMD tasks.
pmk pred-msd-time -ea 0.2 -temp-interval 50 -max-temp 550
pmk gpumd-job -i model.xyz -nep nep.txt -in run.in -msd-time pred-msd-time.log
The predictor defaults to Li group 0 in grouping method 0 and selects the lowest
eligible measured temperature. Use -group to select a different Li group or
-ref-temp 300 to select a reference by its nominal or measured temperature.
The prediction grid advances by -temp-interval from the reference's nominal
setpoint up to -max-temp. Each target must be above the measured reference.
Inconsistent results at the same reference temperature require resolution
before planning.
Use a completed, fixed-cell NVT production trajectory with its original
run.in, model.xyz, and aligned thermo.out. The predictor requires a
full-trajectory free-intercept OLS result from pmk msd -ne -group 0 (or the
matching Li group) with a +1 formal charge. PASS and WARNING are eligible. A
baseline WARNING carries into every prediction, and REJECT excludes the fit
from baseline selection. Successful MSD analyses write msd/provenance.json
(or the equivalent file in a segment directory), which records source and
result fingerprints, the selected group and fit, and measured thermodynamics
when available. Older full-run results require an identifiable trajectory,
group, fit window and quality, agreement with the saved curve and NE totals,
and output timestamps at least as recent as the inputs. Incomplete or stale
analyses are reported with their reason. Prediction does not rerun MSD.
Measured conductivity comes from the reference MSD slope and Nernst–Einstein
(NE) relation. The forecast uses the measured reference temperature and
conductivity with the conventional ln(sigma*T) Arrhenius relation.
sigma(T) = sigma_r * (T_r / T) * exp[-Ea/kB * (1/T - 1/T_r)]
D(T) = sigma(T) * V(T) * kB * T / (N_Li * q^2) [in consistent units]
t_raw = saved_reference_ns * sqrt(D_reference / D(T))
t_plan = ceil(max(min_production_ns, t_raw)) [ns]
Conductivity is independent of the volume prediction. Diffusion uses the same NE relation with the predicted volume and the reference Li count. With one NVT volume sample the volume is constant. With compatible samples (same full-cell composition, selected Li count and fully periodic fixed-cell convention), it is interpolated between measured temperatures. Targets beyond the measured volume range use the nearest endpoint and generate a warning. Other measured conductivities are compared at their actual measured temperatures. The log reports the absolute gap, fractional gap relative to the measurement, and measured-to-predicted ratio. Different fit windows limit the comparison to an indicative check. The supplied activation energy stays fixed.
The square-root scaling is an empirical planning heuristic. The default 6 ns
is a planning floor, configurable with -min-production-ns. Recommended
durations carry no guarantee of MSD convergence. Determine the actual diffusion
regime and fit quality with pmk msd after production.
Provide a fixed timestep and use the placeholders in the production block of the job template. Earlier equilibration blocks can use their own numeric temperatures and run lengths. The template syntax below is compatible with GPUMD 4.2.
potential nep.txt
time_step 1.0
ensemble npt_scr 300 300 100 0.0 100.0 1000
run 2000000
ensemble nvt_bdp target_t target_t 100
dump_thermo 10
dump_exyz 1000 1 1
compute_msd 5 msd-steps group 0 0
run production-steps
production-stepsis the number of NVT MD integration steps,ceil(t_plan * 1e6 / dt_fs).msd-stepsis GPUMD'sNc, the maximum number of correlation samples. It isfloor(0.5 * t_plan * 1e6 / (sample_interval * dt_fs)). The sample interval is the first argument of the template'scompute_msd. Omit the entire directive if you only need raw-trajectorypmk msd.
Pass -in run.in to the predictor to use the job template's timestep and
sampling interval in the table. Otherwise the table uses the reference run's
settings and shows a dash when the saved run has no compute_msd. The job
generator uses the actual template settings and reports any recalculation.
It validates the latest successful prediction record and the complete job
batch, then creates one directory per target in the invocation directory.
Existing destinations cause the batch to fail before generation. The original
template, equilibration runs, dump_exyz cadence and optional
compute_msd arguments are preserved.
Metadata
Release files for pymdkit 1.7.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pymdkit-1.7.9.tar.gz | 414.0 kB | Without provenance | Details for pymdkit-1.7.9.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pymdkit-1.7.9-py3-none-any.whl | Python 3 | none | any | Details for pymdkit-1.7.9-py3-none-any.whl |
Total release size: 692.7 kB
Release files / pymdkit-1.7.9.tar.gz
| Download URL | pymdkit-1.7.9.tar.gz |
|---|---|
| Size | 414.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0b13d14c04e7b1a956ed10dd68cadbbd49c5e968609fd9da328c74e6320bc954
|
|
BLAKE2b-256 checksum How to use checksums |
2b37e21d67776d03641553033f18baa3a0310e9ea3612968a7e1be0f05b7f319
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.20
|
Release files / pymdkit-1.7.9-py3-none-any.whl
| Download URL | pymdkit-1.7.9-py3-none-any.whl |
|---|---|
| Size | 278.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c26d3a325080f79ea1e24ed977fd615604301f295486e0c5d064ca5608b79977
|
|
BLAKE2b-256 checksum How to use checksums |
a13a2cb1d312e4a5111be2b1ba181421c82929b9773c4f9da2aec651b081155b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.20
|
Security for pymdkit 1.7.9
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.