This workshop is organized in collaboration with MetaChem Academy.
Recording Playlist: YouTube Workshop Recordings
#> All session recordings will appear at this playlist after the workshop is finished. The videos are non-downloadable and will remain available for 1 year.
Resources Folder: Google Drive Resources
This repository contains Jupyter notebooks and scripts for a hands-on workshop on molecular dynamics (MD) simulations of polymers using AmberTools and GROMACS. The workshop is organized into several days, each focusing on a key aspect of polymer simulation, from small molecule parameterization to full MD production and analysis.
Enjoy the workshop and happy simulating!
- Clone or Download the Repository:
git clone https://github.com/hargu978/polymermd-workshop.git
cd polymermd-workshopOr download and unzip from GitHub if you prefer.
- Set Up the Conda Environment:
chmod +x setup_conda_env.sh
./setup_conda_env.shThis script will install Miniconda (if needed), create the polymer_md environment, and install all required packages (AmberTools, GROMACS, nglview, etc.).
Note: Steps 1 and 2 only need to be run once per machine or when you want to update/reset the environment.
- Open a Terminal and Navigate to the Workshop Folder:
- On Windows, open your Ubuntu (WSL) terminal.
- On Linux/MacOS, open your regular terminal.
- Navigate to the workshop folder (replace
PATH_TOwith your actual path):cd PATH_TO/polymermd-workshop
- Activate the Environment:
conda activate polymer_md
source $CONDA_PREFIX/amber.sh- Start Jupyter Lab:
jupyter lab --ip 0.0.0.0 --no-browserOpen the URL printed in the terminal to access the notebooks in your browser.
The workshop is organized by day, with each day having a dedicated Jupyter notebook in the Day1,2-Ambertools-solved/, Day3-gen-polymer-solved/, and Day4,5-gmx-md-simulation-analysis/ folders. Below is a summary of what is covered each day:
Related Markdown Documentation:
- Conda Setup Guide (step-by-step)
- Polymer parameterization and chain building (Day 3)
- GROMACS system preparation and equilibration (Day 4)
- GROMACS production and analysis (Day 5)
- Notebook:
Day1_ambertools_tutorial.ipynb - Folder:
Day1,2-Ambertools-solved/ - Topics:
- Converting SMILES to 3D structures (OpenBabel)
- Assigning GAFF atom types and AM1-BCC charges (antechamber)
- Generating missing force field terms (parmchk2)
- Building topology and coordinate files (tleap)
- Example: Ethanol parameterization and topology generation
- Notebook:
Day1_ambertools_tutorial.ipynb(continued) - Folder:
Day1,2-Ambertools-solved/monomer/ - Topics:
- Parameterizing polymer monomers (PEO, PET)
- Generating force field files for monomers
- Preparing for polymer chain construction
- Notebook:
Day3_generate_polymerchains_tutorial copy.ipynb - Folder:
Day3-gen-polymer-solved/ - Topics:
- Building polymer chains from monomer units
- Generating random and block copolymers (PEO/PET)
- Creating GROMACS-compatible topology and coordinate files for polymers
- Notebook:
Day4_gromacs_formats_tutorial.ipynb - Folder:
Day4,5-gmx-md-simulation-analysis/ - Topics:
- Setting up the simulation box and solvating the polymer
- Adding ions for neutralization
- Energy minimization and stepwise equilibration (NVT, NPT)
- Editing topology files for solvent/ions
- Extracting and visualizing energy terms (temperature, density)
- Notebook:
Day5_gmx_prod_analysis_tutorial.ipynb - Folder:
Day4,5-gmx-md-simulation-analysis/ - Topics:
- Running production MD simulations (5–10 ns)
- Analyzing trajectories: RMSD, radius of gyration, RDFs
- Glass transition temperature analysis via simulated annealing
- Visualization with nglview, MDAnalysis, matplotlib
- Example SLURM scripts for HPC job submission
- All notebooks are designed to be run interactively in Jupyter Lab after activating the
polymer_mdenvironment. - Example input/output files are provided in the relevant folders for each day.
- For troubleshooting or manual installation, see the
environment.ymlandsetup_conda_env.shscripts. - Install WSL Ubuntu (for Windows users)
- For more details on Jupyter, see:
Workshop Author:
Harish Gudla
Computational Material Scientist, Compular, Sweden
LinkedIn: Harish Gudla
This tutorial is provided under the MIT License. Use it freely for educational and research purposes.