Our group does not typically carry out classical molecular dynamics simulations. However, with the advent of machine-learned interatomic potentials, the use of ML-accelerated ab initio molecular dynamics (AIMD) simulations is becoming commonplace for us.
The main tool for classical MD is LAMMPS , but some ML packages do not have an interface to LAMMPS. Instead, most ML interatomic potentials have an interface to ⭐ASE and its molecular dynamics modules . Some codes, like VASP, have built-in routines for ab initio MD as well. Also refer to PLUMED (or PySAGES ) for enhanced sampling algorithms and related plugins for molecular dynamics simulations. On Della, we have a GPU build of LAMMPS with kokkos support that can be used as follows:
module load lammps/patch_4Jul2026
module load anaconda3/2025.12
conda activate $LAMMPS_PYENV
This will then add the lmp executable to your PATH. The build currently supports calculations on NVIDIA A100s. If you need changes to the linked Python environment, ask Andrew to modify the environment or to show you how to compile your own build.
If you'd like to compile LAMMPS yourself with ML-IAP support to have full control of the Python environment, here are the instructions:
SSH into <NetID>@della-gpu.princeton.edu
You will need to copy and execute the necessary compilation scripts. This process is automated below. Simply replace your NETID and run the commands from the login node of della-gpu. You should see an Anaconda environment being made, followed by a successful compilation of LAMMPS.
BASE_PATH
BASE_PATH=/scratch/gpfs/ROSENGROUP/${NETID}/lammps
PARENT_PATH=/home/ROSENGROUP/software/lammps
cp $PARENT_PATH/install.sh $BASE_PATH
cp $PARENT_PATH/python_prep.sh $BASE_PATH
cp $PARENT_PATH/requirements.txt $BASE_PATH
bash $BASE_PATH/python_prep.sh
bash $BASE_PATH/install.sh
Add any additional Python modules for your MLIPs of interest to the $LAMMPS_PYENV environment like so. Simply replace your NETID and change out the packages as desired. You can modify the environment as many times as you'd like.
LAMMPS_PYENV=/scratch/gpfs/ROSENGROUP/${NETID}/lammps/pyenv
module load anaconda3/2025.12
conda activate $LAMMPS_PYENV
uv pip install mace-torch
Now your custom LAMMPS build should be ready to go.
There is one additional detail. Since you are not using a group-owned LAMMPS module file, you will need to add the following commands to any submission script before you can run the LAMMPS executable. Replace the NETID field with your own. Following the commands below, you will have the executable lmp in your system PATH and can run LAMMPS jobs.
BASE_PATH=/scratch/gpfs/ROSENGROUP/${NETID}/lammps
export LAMMPS_PYENV=$BASE_PATH/pyenv
export PATH=$PATH:$BASE_PATH/$VERSION/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$BASE_PATH/$VERSION/lib64:$LAMMPS_PYENV/lib
module load anaconda3/2025.12
conda activate $LAMMPS_PYENV
Note from Izzie:Including the following commands in my submission script worked better for me than those above (although they are very, very similar)
BASE_PATH=/scratch/gpfs/ROSENGROUP/${NETID}/lammps
export LAMMPS_PYENV=$BASE_PATH/pyenv
export PATH=$BASE_PATH/$VERSION/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/openmpi/4.1.8/gcc/lib64:$BASE_PATH/$VERSION/lib64:$LAMMPS_PYENV/lib:$LD_LIBRARY_PATH
module load anaconda3/2025.12
conda activate $LAMMPS_PYENV
Placing $PATH at the end of the export PATH command ensured that the /scratch/gpfs/ROSENGROUP/${NETID}/lammps LAMMPS build took precedence over any other lmp executable (I had one in ~/.local/bin that was being called over the custom build in /scratch/gpfs/ROSENGROUP/${NETID}/lammps)
Adding /usr/local/openmpi/4.1.8/gcc/lib64 to the LD_LIBRARY_PATH was necessary for calphy to locate the MPI library. Otherwise, I was running into an error: RuntimeError: cannot load MPI library
- MDAnalysis : Analyze MD simulations.
- mdtraj : Analyze MD trajectories.
- pyscal : Local order parameter analysis.
- Freud : Analysis of environments in trajectories
Don't hesitate to chat with others to learn more about MD. There is plenty of experience in at Princeton in this area. In our department, chat with the students in Prof. Webb's, Prof. Panagiotopoulos', or Prof. Graves' groups. Outside the department, Prof. Roberto Car's group knows a lot about AIMD in particular.