This repository contains scripts for running constant pressure, constant temperature (NPT) molecular dynamics simulations using OpenMM. Some scripts are designed for use on the ASU PHX cluster, but can be adapted for other environments.
The repository includes:
openmm_npt.py: A Python script for running NPT simulations using OpenMM.openmm_npt.sh: A wrapper script for automatically loading the correct CUDA version and OpenMM environment on the PHX cluster.submit_sbatch.sh: A script for submitting simulation jobs to a scheduler (e.g., SLURM).pdb/1btl.pdb: A PDB file for testing.setup.sh: A helper script to set up the environment.
-
Install OpenMM with conda:
conda create -y -n OpenMM -c conda-forge && conda activate OpenMM && conda install -y openmm pdbfixer -c conda-forge
make sure you have conda initialized in your environment:
conda init bash
-
Clone this repository:
git clone https://github.com/John-Kazan/OpenMMScripts.git
-
Run the setup script:
./setup.sh
This script runs the NPT simulation directly using OpenMM. It utilizes GPU (CUDA) for acceleration.
Usage:
python openmm_npt.py -pdb ./pdb/1btl.pdbReplace pdb/1btl.pdb with the path to your PDB file.
This wrapper script automatically loads the correct CUDA version and OpenMM environment on the PHX cluster.
Usage:
openmm_npt.sh -pdb ./pdb/1btl.pdbReplace 1btl.pdb with your PDB file or use the one provided for testing.
To submit the simulation to a scheduler (e.g., SLURM), use the submit_sbatch.sh script.
Before submission:
Edit submit_sbatch.sh:
- Modify the
openmm_npt.sh -pdb ./pdb/1btl.pdbline to reflect your own PDB.
Submission:
sbatch submit_sbatch.shTo continue the simulation from the last point simply submit the job again. It will automatially continue.
- The simulation is set to run for 100ns. On RTX 2080 the performance is ~200ns/day.
- This repository is designed for running simulations on the PHX cluster, but can be adapted for other environments.
- The provided scripts are examples and may need modifications to suit your specific needs.
- For more detailed information about OpenMM, refer to the official documentation: https://openmm.org/