DynaMate is your reliable mate that can run molecular dynamics simulations of protein-ligand and protein-only systems. It is built using LiteLLM and equipt with a collection of tools. Quality checks throughout the pipeline trigger re-tries when something goes wrong, allowing the agent to correct course and save you time on debugging. You can find our preprint here.
- 🚀 Autonomous protein-ligand MD simulations and binding affinity calculations
- 🔄 Error analysis and correction
- 📊 Binding affinity calculations with MM/PB(GB)SA method
The tools used by the agent require that you have a local installation of the following software. We provide a Docker image with all dependencies pre-installed (recommended), or you can install everything manually if you prefer
git clone https://github.com/schwallergroup/DynaMate.git
cd DynaMate- Build a docker image:
docker build -t dynamate -f ./docker/Dockerfile .
- Create an
.envfile to store sensitive data like API keys:
OPENROUTER_API_KEY=your_key_here
# Add other keys as needed
- Run the agent:
docker run --env-file .env dynamate --pdb-id <pdb-id> --ligand <ligand-name (optional)> --model <model_name> --temp <simulation temperature (K), default: chosen by the agent> --duration <simulation duration (ns), default: chosen by the agent>
- Interactive mode (for debugging or exploration):
docker run -it --rm --env-file .env dynamate /bin/bash
python main.py --pdb-id <pdb-id> --model <model_name>
Happy molecular dynamics simulations! 🧬
We recommend that you install in a separate ~/softwares directory, not inside the project:
mkdir ~/softwares
cd ~/softwaresYou will need cmake locally if you don't have the module available to load directly.
- Download the pre-compiled binary from the official site
wget https://github.com/Kitware/CMake/releases/download/v3.27.8/cmake-3.27.8-linux-x86_64.sh
chmod +x cmake-3.27.8-linux-x86_64.sh
./cmake-3.27.8-linux-x86_64.sh --prefix=$HOME/cmake --skip-license- Add it to your PATH
echo 'export PATH=$HOME/cmake/bin:$PATH' >> ~/.bashrc
source ~/.bashrc- Download the source code. You can use
wgetorcurl:
wget https://ftp.gromacs.org/pub/gromacs/gromacs-2023.tar.gzYou can use a newer version if you want, but IMPORTANT to note:
- To run MM-PB(GB)SA calculations, you will need a GROMACS version inferior than 2023.4.
- The analysis script (/src/scripts/analysis_Gromacs.sh) has been written for GROMACS 2023. You will need to update the echo synthax if you use a different version of GROMACS.
- Unpack the archive
tar -xvzf gromacs-2023.tar.gz
cd gromacs-2023- Create a build directory
mkdir build
cd build- Make sure
cmakeis in your PATH. If you installed it withpip, add it to your PATH
export PATH=$HOME/.local/bin:$PATH- Configure the build with GPU support (make sure you have the appropriate CUDA Toolkit for your system)
cmake .. -DGMX_GPU=on -DGMX_GPU=CUDA -DCMAKE_INSTALL_PREFIX=$HOME/softwares/gromacs-2023- Build and install
make -j 4
make install- Source GROMACS in the current session
source /usr/local/gromacs/bin/GMXRC- Verify
gmx --version- Download the source file
wget https://github.com/openmm/pdbfixer/archive/refs/tags/v1.11.tar.gz- Unpack and enter it
tar -xvzf v1.11.tar.gz
cd pdbfixer-1.11- Install in editable mode (optional) or normally
pip install -e . - Verify
python -c "import pdbfixer; print(pdbfixer.__version__)"Navigate here to obtain the source code in tar format. Copy this into the ~/softwares directory.
- Unpack the archive
tar -xvzf ambertools25.tar.bz2
cd ambertools25_src/build- Run the
cmakescript with MPI and CUDA enabled
./run_cmake -DMPI=TRUE -DCUDA=TRUE- If the cmake build report looks OK, you should now do the following:
make -j 4
make install
source /home/softwares/ambertools25/amber.shIf you don't have conda, install it
You can use wget or curl:
wget "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh"Setup the conda env
conda env create -f environment.ymlIf you wish to perform some MM/PB(GB)SA binding affinity calculations on your MD trajectiries, you need to create another environment to run gmx_MMPBSA (if not using the docker image provided). Installation instructions are available on the gmx_MMPBSA website. If using conda, you can create a gmx_MMPBSA conda environment:
conda env create -f path/to/DynaMate/gmx_MMPBSA/env.ymlThen, add the path to your gmx_MMPBSA environment in src/constants.py:
MMPBSA_ENV_DIR = Path("/path/to/miniconda3/envs/gmxMMPBSA/bin/gmx_MMPBSA")conda activate dynamateAt the root of the project run:
export PYTHONPATH=.After setting up your project environment, make sure to run the setup script if you don't want to load gromacs each time. This will load both the environment and the softwares
source setup.shNow you are ready to use DynaMate!
To launch the script specify the PDB (or upload it), possible ligand name, and model name in the command line arguments. For example, to launch the MD run with the protein 5UEZ, ligand 89G, and model GPT-5 mini:
python main.py --pdb_id 5UEZ --ligand 89G --model openrouter/openai/gpt-5-miniYou can optionally specify:
--temp <simulation temperature (K), default: chosen by the agent>
--duration <simulation duration (ns), default: chosen by the agent>
And again, happy molecular dynamics simulations! 🧬
If you found this code useful, please consider citing:
@article{guilbert2025dynamate,
title={DynaMate: An Autonomous Agent for Protein-Ligand Molecular Dynamics Simulations},
author={Guilbert, Salom{\'e} and Masschelein, Cassandra and Goumaz, Jeremy and Naida, Bohdan and Schwaller, Philippe},
journal={arXiv preprint arXiv:2512.10034},
year={2025}
}This work is licensed under the MIT License
