Skip to main content

Run machine-learning potentials using VASP style inputs.

Project description

VPMDK

VPMDK (Vasp-Protocol Machine-learning Dynamics Kit, aka “VasP-MoDoKi”) is an ASE-oriented layer for machine-learning interatomic potentials. Different MLP packages expose different calculator constructors, model-loading conventions, and optional features; VPMDK provides one place to absorb those differences and present a more uniform workflow around ase.Atoms.

On top of that core API, VPMDK also provides a VASP-compatible CLI for directory-based workflows. In practice it provides:

  • a stable Python API for calculator construction, single-point runs, relaxations, MD, and charge-density prediction
  • a compatibility CLI that reads POSCAR / INCAR / BCAR and writes VASP-like outputs such as OUTCAR, OSZICAR, CONTCAR, and vasprun.xml

Supported integrations include CHGNet, MACE, MatGL/M3GNet, SevenNet, FlashTP, Eqnorm, MatRIS, AlphaNet, HIENet, Nequix, NequIP, Allegro, ORB, UPET, TACE, EquFlash, FAIRChem, GRACE, DeePMD, MatterSim, and Matlantis, plus optional charge-density backends such as ChargE3Net, DeepDFT, and DeepCDP. Actual availability depends on which backend packages are installed in your environment.

EquFlash is exposed as a checkpoint-dependent SevenNet/FlashTP adapter: use a local checkpoint, because no public named EquFlash checkpoint is currently validated.

Installation

Install the package itself:

pip install vpmdk

Or from a checkout:

pip install -e .

You also need at least one backend package for real calculations, for example:

pip install chgnet

More setup details:

Choose Your Entry Point

  • Use the CLI if you want to run from VASP-style input directories and keep compatibility outputs.
  • Use the Python API if you want filesystem-independent workflows around ase.Atoms.

CLI entry point:

vpmdk

Use --dir PATH only when you want to run against a calculation directory other than the current one.

Python API entry points:

  • vpmdk.BackendConfig(...)
  • vpmdk.get_calculator(...)
  • vpmdk.single_point(...)
  • vpmdk.relax(...)
  • vpmdk.md(...)
  • vpmdk.predict_charge_density(...)

Quick Start

CLI

Work in a calculation directory containing:

./
├── POSCAR
├── INCAR
└── BCAR

Minimal relaxation example:

INCAR

IBRION = 2
NSW = 200
EDIFFG = -0.02
ISIF = 3

BCAR

MLP=CHGNET
DEVICE=cpu

Run:

vpmdk

If you prefer launching from outside that directory, use vpmdk --dir ./calc_dir.

Python API

from ase.io import read
import vpmdk
import vpmdk.compat.vasp as vasp_compat

atoms = read("POSCAR")
backend = vpmdk.BackendConfig(mlp="CHGNET", device="cpu")

sp = vpmdk.single_point(atoms, backend)
relaxed = vpmdk.relax(atoms, backend, steps=200, fmax=0.02, relax_cell=True)
traj = vpmdk.md(
    atoms,
    backend,
    temperature=300,
    steps=100,
    timestep=1.0,
    thermostat="langevin",
)

charge = vpmdk.predict_charge_density(atoms, incar={"ENCUT": 520})
vasp_compat.write_chgcar("CHGCAR", atoms, charge.density, spin_density=charge.spin_density)

The public Python API does not write OUTCAR, OSZICAR, or vasprun.xml by default.

Documentation Map

Examples

Runnable examples live under examples/README.md.

Included examples:

  • examples/relax_chgnet
  • examples/md_mace
  • examples/neb_nequip_vtst
  • examples/api_chgnet
  • examples/chgcar_charge3net
  • examples/bader_chgcar_charge3net
  • examples/uspex_9_4_4_si

Compatibility Notes

  • POSCAR is required for standard runs.
  • POTCAR is optional and can affect species reconciliation and some VASP-compatibility metadata.
  • KPOINTS, WAVECAR, and existing CHGCAR files are ignored by the force-field calculation itself.
  • If BCAR is omitted, VPMDK defaults to MLP=CHGNET.
  • WRITE_CHGCAR=1 runs a separate charge-density prediction step after the main calculation.
  • VTST-style NEB directory layouts (00, 01, ...) run through ASE NEB when NSW > 0 and IBRION > 0, including spring-coupled band forces, climbing images via LCLIMB, and VASP-like image/parent outputs. Dimer/Lanczos TS modes are not implemented.

License

VPMDK is distributed under the BSD 3-Clause License. See LICENSE for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vpmdk-0.4.2.tar.gz (84.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vpmdk-0.4.2-py3-none-any.whl (103.9 kB view details)

Uploaded Python 3

File details

Details for the file vpmdk-0.4.2.tar.gz.

File metadata

  • Download URL: vpmdk-0.4.2.tar.gz
  • Upload date:
  • Size: 84.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for vpmdk-0.4.2.tar.gz
Algorithm Hash digest
SHA256 ae2f57a75e7a30125895444d1e611f95abe991b83e71ded0f09cdc19470815db
MD5 0bfff9f4ac416a8b26b9cf87cd289824
BLAKE2b-256 80a30b7e02bec158b407815c63f6f82aa2eeb6b5bcc1a12e5b2b55de1606bc76

See more details on using hashes here.

Provenance

The following attestation bundles were made for vpmdk-0.4.2.tar.gz:

Publisher: publish-pypi.yml on klxuyfk/VPMDK

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file vpmdk-0.4.2-py3-none-any.whl.

File metadata

  • Download URL: vpmdk-0.4.2-py3-none-any.whl
  • Upload date:
  • Size: 103.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for vpmdk-0.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2aa79dbb638c4d0c897deaa05dfb7bceb96e870a6f4853a66247c4b595c96ca3
MD5 be23c1a6de55d8b3c061db55935e6c02
BLAKE2b-256 499d8fb9fdad4ae485a1447ec3b3f0128e7333f5a3bc7b9a1faba80caa17ca54

See more details on using hashes here.

Provenance

The following attestation bundles were made for vpmdk-0.4.2-py3-none-any.whl:

Publisher: publish-pypi.yml on klxuyfk/VPMDK

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page