LAMMPS-ANI interface for large scale molecular dynamics simulation with ANI neural network potential.
docker pull ghcr.io/roitberg-group/lammps-ani:latest
docker run --gpus all -it ghcr.io/roitberg-group/lammps-ani:latest
cd /lammps-ani/examples/water && ./run.shmodule load singularity
singularity pull -F docker://ghcr.io/roitberg-group/lammps-ani:latest
SINGULARITYENV_CUDA_VISIBLE_DEVICES=$CUDA_VISIBLE_DEVICES singularity exec --cleanenv -H ./:/home --nv lammps-ani_latest.sif /bin/bash
cp -r /lammps-ani ./lammps-ani
cd lammps-ani/examples/water && ./run.shNote: The pre-built container only supports Kokkos for Ada GPUs (L4, RTX 4090). For other GPUs, see Container Guide to re-build within the container. For multi-GPU, recommend to build from source.
- water - Simple water simulation
- alanine-dipeptide - Alanine dipeptide simulation
- benchmark - Performance benchmark with water box
- combustion - Combustion reaction
- early_earth - Early Earth chemistry simulation
Set environment before running: source ./build-env.sh
- CUDA >= 12.8.1
- GCC >= 14.2.0
- PyTorch >= 2.8.0
- OpenMPI >= 5.0.7
- CMake >= 3.21.3
export conda_env_path=/path/to/env
conda create --prefix $conda_env_path python=3.11
conda activate $conda_env_path
pip install torch==2.8.0 torchvision==0.23.0 torchaudio==2.8.0 --index-url https://download.pytorch.org/whl/cu128
conda install -c conda-forge libopenblas gsl -yFollowing example is for HiPerGator L4 GPU node, adjust as needed for other systems.
srun --partition=hpg-turin --cpus-per-task=30 --gres=gpu:2 --mem=200gb -t 2:00:00 --pty /bin/bash -i
export conda_env_path=/blue/roitberg/apps/torch28/
conda activate $conda_env_path
module load cuda/12.8.1 gcc/14.2.0 openmpi/5.0.7 cmake/3.21.3
git clone --recursive git@github.com:roitberg-group/lammps-ani.git
# build
cd lammps-ani && ./build.sh
# export LAMMPS_ANI_ROOT environment variable; need to run this in every new shell
source ./build-env.shFor additional build notes, see Build Instructions.
cd examples/water/
# Run a water box simulation
bash run.shpair_style ani 5.1 model_file device [num_models] [ani_aev] [ani_neighbor] [ani_precision]
pair_coeff * *
model_file- Path to TorchANI model (.pt file)device-cudaorcpunum_models- Number of ensemble models,-1for all (default:-1)ani_aev-cuaevorpyaev(default:cuaev)ani_neighbor-fullorhalf(default:full)ani_precision-singleordouble(default:single)
Available in /lammps-ani/models/ (container) or export with pytest models/test_models.py -s -v:
ani2x.pt- Standard ANI-2xani1x_nr.pt- ANI-1xnr Model (ani-1xnr)
For more usage details, see Usage Instructions.
B200 GPUs hang: export UCX_NET_DEVICES=mlx5_0:1
Multi-GPU in containers: Not recommended due to GPU Direct RDMA limitations. Build from source instead. See #70.