AToM Simulation & Analysis

A typical AToM binding free energy calculation consists of the following:

When examining a large dataset, it is customary to automate these steps in a workflow. The AToM distribution includes simple workflows that help automate this process. Sites that use AToM on a routine basis for commercial and non-commercial purposes often design their own automated workflows. 

System Preparation and Production

The first two steps are implemented by two Python scripts that take the same control file as input.  To illustrate running the structure preparation and production steps, here is an illustrative Slum batch file that launches both:

#!/bin/bash

#

#SBATCH --partition=gpu

#SBATCH --nodes=1

#SBATCH --ntasks-per-node=1

#SBATCH --gres=gpu:4

#SBATCH --cpus-per-task=6

#SBATCH -t 16:00:00


. ~/miniconda3/bin/activate atm8.1

echo "Running on $(hostname)"


if [ ! -f cdk2-lig1-lig2_0.xml ]; then

   python rbfe_structprep.py cdk2-lig1-lig2_asyncre.cntl || exit 1

fi


(

cat <<EOF

localhost,0:0,1,CUDA,,/tmp

localhost,0:1,1,CUDA,,/tmp

localhost,0:2,1,CUDA,,/tmp

localhost,0:3,1,CUDA,,/tmp

EOF

) > nodefile


python rbfe_explicit.py cdk2-lig1-lig2_asyncre.cntl


The script above submits the job to a node with 4 NVIDIA GPUs. If structure preparation has not been already performed (the prepared coordinate file cdk2-lig1-lig2_0.xml is missing), it performs structure preparation by calling the rbfe_structprep.py script. It then builds the nodefile that specifies the GPUs to use. Finally, it launches the asynchronous replica exchange simulation.

AToM production generates directories r0, r1/, r2/, etc., that contain .dcd MD coordinate trajectories, .xml checkpoint files, and .out output files for each replica exchange replica. The output files store the perturbation energy samples that are used in the free energy analysis below.

Free Energy Analysis

By default, AToM uses UWHAM in R to perform the free energy multi-state thermodynamic reweighting analysis. AToM provides a bash scripts (analyze.sh) and an R script (uwham_analysis.R)  to run UWHAM.  However, alchemical transfer does not require anything special for thermodynamic reweighting and MBAR could be used for the same purpose.

The  analyze.sh script prints out the binding free energy estimate and statistical uncertainties. The uwham_analysis.R script also produces plots saved in Rplots.pdf  , such as the sequence of the perturbation energy distributions, that help assess the quality of the calculation.