Metadata-Version: 2.4
Name: vpmdk
Version: 0.6.0
Summary: Run machine-learning interatomic potentials with VASP-style POSCAR and INCAR inputs, or through one ASE Python API.
Author: Kagami Aso
License-Expression: BSD-3-Clause
Project-URL: Homepage, https://github.com/klxuyfk/VPMDK
Project-URL: Source, https://github.com/klxuyfk/VPMDK
Project-URL: Documentation, https://github.com/klxuyfk/VPMDK#readme
Project-URL: Issue Tracker, https://github.com/klxuyfk/VPMDK/issues
Project-URL: Changelog, https://github.com/klxuyfk/VPMDK/releases
Project-URL: DOI, https://doi.org/10.5281/zenodo.20236617
Keywords: vasp,ase,machine-learning,machine-learning-potential,interatomic-potential,mlip,mlff,molecular-dynamics,structure-relaxation,nudged-elastic-band,phonopy,vtst,mace,chgnet,sevennet,orb,mattersim,fairchem,deepmd,nequip,grace,materials-science
Classifier: Environment :: Console
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Scientific/Engineering :: Chemistry
Classifier: Topic :: Scientific/Engineering :: Physics
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: ase>=3.25.0
Requires-Dist: numpy
Requires-Dist: pymatgen>=2025.4.20
Provides-Extra: test
Requires-Dist: pytest; extra == "test"
Dynamic: license-file

# VPMDK

[![PyPI](https://img.shields.io/pypi/v/vpmdk.svg)](https://pypi.org/project/vpmdk/)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.20236617.svg)](https://doi.org/10.5281/zenodo.20236617)

VPMDK (*VASP-Protocol Machine-learning Dynamics Kit*) runs machine-learning
interatomic potentials such as CHGNet, MACE, SevenNet, and ORB from VASP-style
`POSCAR` and `INCAR` inputs or through a common ASE Python API. A `BCAR` file
selects the backend and model. The CLI writes `OUTCAR`, `OSZICAR`, `CONTCAR`,
and `vasprun.xml` for workflows that use those files.

```bash
python -m pip install vpmdk chgnet
vpmdk --dir ./calc
```

Put a `POSCAR` in `./calc` to run a single point with the default CHGNet
backend. Use `INCAR` to select relaxation or molecular dynamics and `BCAR`
to change the model or backend.

- Generate force sets or force constants for [phonopy](https://github.com/klxuyfk/VPMDK/blob/main/examples/phonopy_vasp_finite_difference/README.md).
- Run [VTST-style NEB](https://github.com/klxuyfk/VPMDK/tree/main/examples/neb_nequip_vtst) or a [USPEX 9.4.4 relaxation](https://github.com/klxuyfk/VPMDK/blob/main/examples/uspex_9_4_4_si/README.md).
- Predict a `CHGCAR` with an optional charge-density model and pass it to [Bader analysis](https://github.com/klxuyfk/VPMDK/blob/main/examples/bader_chgcar_charge3net/README.md).
- Reuse a loaded model between short calculations with the [resident server](https://github.com/klxuyfk/VPMDK/blob/main/docs/user-guide/server-mode.md).

VPMDK runs independently of VASP and requires no VASP license. VASP is a
trademark of VASP Software GmbH. VPMDK is an independent project with no
affiliation with VASP Software GmbH.

## Supported Backends

Force-field integrations include `CHGNET`, `MATGL` / `M3GNET`, `MACE`, `MACE_SOYO`, `PROPHET`,
`ALIGNN` (ALIGNN-FF), `MATTERSIM`, `MATLANTIS`, `EQNORM`, `MATRIS`, `ALPHANET`, `HIENET`, `NEQUIX`,
`SEVENNET`, `FLASHTP`, `BAM`, `NEQUIP`, `ALLEGRO`, `ORB`, `UPET`, `TACE`,
`EQUFLASH`, `EQUIFORMER_V3`, `FAIRCHEM` (v1 and v2 paths, including `ESEN`),
`GRACE`, and `DEEPMD` (including DPA-family checkpoints).

Optional charge-density integrations include ChargE3Net, DeepDFT, and
DeepCDP. Actual availability depends on the packages and model files installed
in your environment. See the [backend reference](https://github.com/klxuyfk/VPMDK/blob/main/docs/reference/backends.md)
for model requirements, aliases, defaults, and backend-specific caveats.

## Installation

```bash
pip install vpmdk
pip install chgnet  # example backend
```

For development from a checkout:

```bash
pip install -e .
```

See the [installation guide](https://github.com/klxuyfk/VPMDK/blob/main/docs/getting-started/installation.md) for backend
environments and optional dependencies.

## CLI Quick Start

Create a calculation directory containing at least `POSCAR`. For example:

```text
calc/
├── POSCAR
├── INCAR
└── BCAR
```

`INCAR`:

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

`BCAR`:

```text
MLP=CHGNET
DEVICE=cpu
```

Run the calculation:

```bash
vpmdk --dir ./calc
```

If `BCAR` is omitted, the CLI defaults to CHGNet. See
[CLI Workflows](https://github.com/klxuyfk/VPMDK/blob/main/docs/user-guide/cli-workflows.md) for supported run modes and
the [INCAR](https://github.com/klxuyfk/VPMDK/blob/main/docs/reference/incar-tags.md) and
[BCAR](https://github.com/klxuyfk/VPMDK/blob/main/docs/reference/bcar-tags.md) references for configuration details.

## Python API

```python
from ase.io import read
import vpmdk

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

result = vpmdk.single_point(atoms, backend)
relaxed = vpmdk.relax(atoms, backend, steps=200, fmax=0.02)
trajectory = vpmdk.md(atoms, backend, temperature=300, steps=100)
```

The Python API does not write VASP compatibility files by default. See the
[Python API guide](https://github.com/klxuyfk/VPMDK/blob/main/docs/user-guide/python-api.md) and
[API reference](https://github.com/klxuyfk/VPMDK/blob/main/docs/reference/api-reference.md).

## Optional Server Mode

For batches that repeatedly use the same model, POSIX systems can keep one
calculator resident in CPU or GPU memory:

```bash
vpmdk serve --dir ./model_config --daemon
vpmdk run --dir ./calc
vpmdk stop
```

One server processes calculations serially. Read the
[Server Mode guide](https://github.com/klxuyfk/VPMDK/blob/main/docs/user-guide/server-mode.md) before using it in an
automated or shared-system workflow.

## Documentation and Examples

- [Documentation index](https://github.com/klxuyfk/VPMDK/blob/main/docs/README.md)
- [Quick start](https://github.com/klxuyfk/VPMDK/blob/main/docs/getting-started/quickstart.md)
- [CLI workflows](https://github.com/klxuyfk/VPMDK/blob/main/docs/user-guide/cli-workflows.md)
- [Python API](https://github.com/klxuyfk/VPMDK/blob/main/docs/user-guide/python-api.md)
- [Backend reference](https://github.com/klxuyfk/VPMDK/blob/main/docs/reference/backends.md)
- [Runnable examples](https://github.com/klxuyfk/VPMDK/blob/main/examples/README.md)

## Citation

Cite the [Zenodo archive](https://doi.org/10.5281/zenodo.20236617) for VPMDK
and the papers for the potentials you used. For reproducibility, select the
archived release you ran.

## License

VPMDK is distributed under the BSD 3-Clause License. See [LICENSE](https://github.com/klxuyfk/VPMDK/blob/main/LICENSE).
