Train NEP potentials in PyTorch¶
TorchNEP is a pure PyTorch implementation of the NEP4 (neuroevolution potential) training framework. Trained models are written as GPUMD nep.txt files and run directly in GPUMD, in LAMMPS through NEP_CPU, and in ASE.
GPUMD-compatible
nep.txt files load directly into GPUMD for molecular dynamics.
Two-stage training
A force-focused first stage, then an energy-focused second stage.
Multi-GPU and multi-node
Data-parallel training with near-linear scaling across nodes.
Fast on NVIDIA and AMD
torch.compile with automatic backend selection, tuned on CUDA and ROCm.
Memory-friendly
The dataset stays in host memory; GPU memory scales with the batch, not the dataset.
Fine-tuning
Start from any nep.txt or checkpoint, optionally slimmed to the elements of the new data.
Active learning
Choose the MD frames worth computing with DFT, with one model: the MaxVol extrapolation grade.
Plots
Loss curves, parity plots and error breakdowns straight from the output files.

Ready-to-use examples โ the training inputs and trained models of the TorchNEP paper โ are in TorchNEP_models. If TorchNEP helps your research, please cite the paper.