FlashCart provides Cartesian tensor operations and an equivariant interatomic potential built on them. It derives tensor products and their derivatives symbolically and generates fused Triton kernels for model evaluation and training. Cartesian tensor expansions and equivariant linear maps also use generated kernels. PyTorch implementations support these operations on CPUs and Apple Silicon.
The package also includes:
- the FlashCart potential,
- tools for training and evaluation, including multi-GPU training with Lightning Fabric,
- interfaces for atomistic simulations with ASE and LAMMPS.
See the documentation for installation, usage, tutorials, and the Python API.
Trained models accompanying the FlashCart paper are available on Zenodo.
Installation
FlashCart requires Python 3.10 or newer and PyTorch 2.9 or newer. In a virtual environment, install a PyTorch build for your hardware, then install FlashCart:
python -m pip install flashcart
See Installation for PyTorch installation, hardware support, and installation from source.
Quickstart
For this example, provide extended XYZ files with reference energies in REF_energy
and forces in REF_forces. Save the following as my_run.yaml. Settings omitted
from the file use the
defaults:
# my_run.yaml
train_path: train.extxyz
valid_path: valid.extxyz
test_path: test.extxyz
output_path: models/my_run
r_max: 5.0
max_epochs: 200
devices: 1
Run the commands from the directory containing the data and configuration file. For this example, use energies in eV, positions in Å, and forces in eV/Å.
The configuration uses one GPU. Select it before training with
export CUDA_VISIBLE_DEVICES=0, replacing 0 with the desired GPU index. For a CPU run,
add device: cpu to the configuration instead.
flashcart-train my_run.yaml
flashcart-test my_run.yaml
Training saves the best checkpoint in models/my_run/best. The evaluation command
uses that checkpoint to evaluate the validation and test sets. See
Quickstart for data preparation
and an explanation of the output files.
Use the trained model to evaluate a structure from the test set with ASE:
from ase.io import read
from flashcart.calculators import FlashCartCalculator
atoms = read("test.extxyz", index=0)
atoms.calc = FlashCartCalculator(checkpoint="models/my_run/best")
print(atoms.get_potential_energy(), atoms.get_forces().shape)
The calculator uses the CPU by default. Pass device="cuda" to use the first visible
GPU. Pass add_atomic_offsets=True to restore the energy reference used in the
training data. This changes the reported energy but not forces or stress. See
ASE interface
for the calculator options.
For LAMMPS, export the model with flashcart-lammps models/my_run, then add the
following commands to the input file for a system whose atom types are H and O:
pair_style mliap unified models/my_run/flashcart-mliap.pt 0
pair_coeff * * H O
The symbols after pair_coeff * * map the LAMMPS atom types to chemical elements.
Adjust them to match the atom-type order in your system. Add --compile-mode default
to the export command to evaluate the model with torch.compile in LAMMPS. See the
LAMMPS interface for the required build
and launch options.
Learn more
- Configuration files
- ASE interface
- Multi-GPU training
- LAMMPS interface
- Data preparation
- Training configurations
- Molecular dynamics
- Inference and training times
- Publications
- API reference
Citing
If you use FlashCart, please cite the FlashCart paper:
@misc{zaverkin2026,
title={FlashCart: Fast Cartesian Tensor Products for Equivariant Interatomic Potentials},
author={Viktor Zaverkin and Payman Goodarzi and Sergey V. Sukhomlinov and Davit Hovhannisyan and Roland Aydin and Martin H. Müser and Mathias Niepert},
year={2026},
eprint={2610.06409},
archivePrefix={arXiv},
primaryClass={cs.LG},
url={https://arxiv.org/abs/2610.06409},
}
License
FlashCart is released under the Apache License 2.0. See LICENSE and NOTICE for the licenses of adapted third-party code. Contributions are welcome, see CONTRIBUTING.md.
Metadata
Release files for flashcart 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| flashcart-0.1.0.tar.gz | 171.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| flashcart-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 371.0 kB
Release files / flashcart-0.1.0.tar.gz
| Download URL | flashcart-0.1.0.tar.gz |
|---|---|
| Size | 171.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cee0c4fe32c20ae348cf7fdf59cd43fd2e3907585ac5df039dcb551a5bfed6b0
|
|
BLAKE2b-256 checksum How to use checksums |
f5da411c5fdb17ce1f5a6adcc37ed287b2d4c7f0364ffedee2b7cdf9662b79d8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.
Transparency logRelease files / flashcart-0.1.0-py3-none-any.whl
| Download URL | flashcart-0.1.0-py3-none-any.whl |
|---|---|
| Size | 199.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
13da31f5014a5577dd55ffeeabaf62db57fd5ad71a2a39e6dd4690de8ace1429
|
|
BLAKE2b-256 checksum How to use checksums |
670d481a8b30ce3604da9a63ac81a6900be7b2f5530a278ddc362d46f708e7c6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.
Transparency log