Skip to main content

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.5 release notes

  • pmk msd reuses 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 ionhop analyzes 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 -ne retains 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 msd analyzes GPUMD trajectories from fixed-cell NVT production. OLS is the default, and OLS, WLS and GLS all fit a free intercept. Forced-origin fitting has been removed from production. Changing-cell MSD is outside scope.
  • pmk pred-msd-time uses 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-time turns 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, and tqdm. 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.5 -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.5

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.5" -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.5"

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-index prevents pip from accessing PyPI.
  • --find-links=pymdkit-offline tells 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) creates no execution log and does not run the command. 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
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

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
pmk gpumd-job -it train.xyz -supercell-matrix 2x2x2 -nep nep.txt -group Li Y Cl
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 StructureMatcher RMSDs 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>/, replaces every target_t token with T, applies -group to all model files, and normalizes npt_scr pressure components for the actual orthorhombic or triclinic cell. 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 applies the common Slurm/PBS queue limiter without checking gpumd-job -status, inspecting convergence, or creating restart artifacts.

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 no longer generates abnormal-time.txt and removes that exact stale file only after successfully exporting a job's tables and plot. 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/&Aring;&sup3; = 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, while -position-only omits calculation results. 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|none... [-wn NUMBER...] [-on NUMBER] [-ref SELECTOR...] [-d 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.

Breaking changes in v1.7.0

  • gpumd-thermo and gpumd-msd are replaced by gpumd-out -thermo and gpumd-out -msd.
  • gather-fs is replaced by gpumd-out -save-fs or vasp-out -save-fs.
  • ehull and vasp2xyz are replaced by vasp-out -ehull and vasp-out -nep-train.
  • substitute is replaced by dope.
  • vasp-job -submit is replaced by submit -vasp; GPUMD submission uses submit -gpumd.
  • Standalone gpumd-group tagging and gpumd-trjcat are removed without replacement. gpumd-job -group remains 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

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. Missing group labels are an error.

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. 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. 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 fit the same free-intercept Einstein model per direction, using binary nonoverlapping block samples within the selected window. WLS uses diagonal block-error covariance and GLS includes cross-lag correlations. At least four binary sampling levels and an identifiable fit are required. The weighted intercepts appear in fit-diagnostic.txt. The window and its quality diagnostics use OLS for all three methods. Forced-origin fitting has been removed from the production workflow.

-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 or changing the saved result files. 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. 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, root-level 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 removes any stale root sigma-total.txt. 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. Without -ne, a directory with overall REJECT prevents publication of new aggregates. See the automatic-fit report for validation, and the intercept/stability update for the current policy, 500 K MSD comparison and limitations.

-ne requires a homogeneous selected element and thermo.out. 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 publishes root hop_freq.txt, with header Temp(K) Hop_freq(s-1) and one temperature and frequency per row. Existing batch outputs require -overwrite. A failed batch can leave per-temperature files already written.

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-steps is the number of NVT MD integration steps, ceil(t_plan * 1e6 / dt_fs).
  • msd-steps is GPUMD's Nc, the maximum number of correlation samples. It is floor(0.5 * t_plan * 1e6 / (sample_interval * dt_fs)). The sample interval is the first argument of the template's compute_msd. Omit the entire directive if you only need raw-trajectory pmk 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.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pymdkit 1.7.5
File Size Uploaded Provenance Actions
pymdkit-1.7.5.tar.gz 315.1 kB Without provenance Details for pymdkit-1.7.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pymdkit 1.7.5
File Interpreter ABI Platform Actions
pymdkit-1.7.5-py3-none-any.whl Python 3 none any Details for pymdkit-1.7.5-py3-none-any.whl

Total release size: 538.6 kB

Release files / pymdkit-1.7.5.tar.gz

Download URL pymdkit-1.7.5.tar.gz
Size 315.1 kB
Tags Source
SHA-256 checksum
How to use checksums
552874cfe658816f6264b120aa11c68d607919ca191ae51cd3c38c4f312673b2
BLAKE2b-256 checksum
How to use checksums
5918d48d5f6568f20644fe03ec6c555a16934d79fa0c773db108be8c8e359f6d
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.5-py3-none-any.whl

Download URL pymdkit-1.7.5-py3-none-any.whl
Size 223.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
768f7493b26ee6e1dd4fbdd1fce8a4a1c6812675ba800c643d848068e6908f66
BLAKE2b-256 checksum
How to use checksums
0e25ea7f8112ef5f6daceb9e5b94aaeb526a24575f2aeb3cab41f1fbd53e25ab
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.5

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.

Release history Release notifications | RSS feed

This release

1.7.5 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page