Skip to main content

Nequix source code

Project description

Nequix

See more information in our preprint.

Usage

Installation

pip install nequix

or for torch

pip install nequix[torch]

ASE calculator

Using nequix.calculator.NequixCalculator, you can perform calculations in ASE with a pre-trained Nequix model.

from nequix.calculator import NequixCalculator

atoms = ...
atoms.calc = NequixCalculator("nequix-mp-1", backend="jax")

or if you want to use the faster PyTorch + kernels backend

...
atoms.calc = NequixCalculator("nequix-mp-1", backend="torch")
...

Training

Models are trained with the nequix_train command using a single .yml configuration file:

nequix_train <config>.yml

or for Torch

# Single GPU
uv run nequix/torch/train.py <config>.yml
# Multi-GPU
uv run torchrun --nproc_per_node=<gpus> nequix/torch/train.py <config>.yml

To reproduce the training of Nequix-MP-1, first clone the repo and sync the environment:

git clone https://github.com/atomicarchitects/nequix.git
cd nequix
uv sync

Then download the MPtrj data from https://figshare.com/files/43302033 into data/ then run the following to extract the data:

bash data/download_mptrj.sh

Then start the training run. The first time this is run it will preprocess the data into HDF5 files:

nequix_train configs/nequix-mp-1.yml

This will take less than 125 hours on a single 4 x A100 node. The batch_size in the config is per-device, so you should be able to run this on any number of GPUs (although hyperparameters like learning rate are often sensitive to global batch size, so keep in mind).

Citation

@article{koker2025training,
  title={Training a foundation model for materials on a budget},
  author={Koker, Teddy and Smidt, Tess},
  journal={arXiv preprint arXiv:2508.16067},
  year={2025}
}

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

nequix-0.3.0.tar.gz (31.3 kB view details)

Uploaded Source

Built Distribution

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

nequix-0.3.0-py3-none-any.whl (35.3 kB view details)

Uploaded Python 3

File details

Details for the file nequix-0.3.0.tar.gz.

File metadata

  • Download URL: nequix-0.3.0.tar.gz
  • Upload date:
  • Size: 31.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.1

File hashes

Hashes for nequix-0.3.0.tar.gz
Algorithm Hash digest
SHA256 5c18a056990a40d241ae6d8d2119aaf3e02f3e6129c82f641deb186d707ca6e8
MD5 930ec9050f076873e878f621a672765d
BLAKE2b-256 209627eb76f0e7220afe3519aa86a8fd5b62aaf8b89e3f3eb4bcdf70e89ba1d5

See more details on using hashes here.

File details

Details for the file nequix-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: nequix-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 35.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.1

File hashes

Hashes for nequix-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c544dec539fda3a0e0ac7d2a1f21d7d19d5e5e9a4e9b5a294e1e5a410f0207f4
MD5 6dbe706361d4eb11b32a5fdafd6abff3
BLAKE2b-256 091831446afb262b1a0b37205956ac03b4a317e949993dda0b832b8ccd455785

See more details on using hashes here.

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