An SDM Workflow Customized for the SAMPL Challenge

This is an example for the SAMPL6 host-guest system OA-G3-0 (hg-oag3). This workflow involves two simulations: Leg 1 and Leg 2. After making directories of the complexes for both legs, obtain the SAMPL file inputs.

git clone


File conversion:

Copy .cms file to Docker, in order to covert it into a .dms file.

docker cp id:/.../SAMPL6/host_guest/SAMPLing/A-G3-0/DESMOND/complex.cms

On Docker Terminal:

export LD_LIBRARY_PATH=/opt/conda/lib:$LD_LIBRARY_PATH

mae2dms complex.cms hg-oag3-0.dms

The .dms file is a database that can be modified. With SQLite Browser, inspect hg-oag3-0.dms and make note of information about the host and the guest. Change nonbonded_param data table for HW and all other hydrogen types into epsilon = 0.0001 and sigma = 0.1, in fact, all atoms with zero sigma or epsilon values must be changed. From the particle data table, note the atoms that will be restrained.

Restrain host:

Restrain the host with the script from GitHub.

python -r 'anum > 1 AND resname=="HST"' -t 1.5 -k 25.0 -f /.../complexes/hg-oag3-0-leg1/hg-oag3-0.dms

This will generate two additional selections in the dropdown menu beginning with "posre_…" in the hg-oag3-0.dms database.

(In this example, all host atoms are restrained. However this is not recommended for more elaborate hosts. The tolerance is also quite generous, a more rigorous value is also recommended.)

Minimization and thermalization:

Run this protocol on the BC computers. In order to run OpenMM, copy the working directories to your lab computer. (The script was obtained exclusively, in addition to other useful scripts. The force constant and Vsite tolerance must be set to kf = 25.0 and r0 = 4.5.)


Minimization thermalization will produce the files hg-oag3-0_mintherm.dms and hg-oag3-0.pdb.

Annealing to lambda=1/2:

Before running the script, edit the displacement vector in the code to values consistent with previous calculations. (In this case, the diagonal vector should correspond to 21.5 for all three vectors.)


This step will produce hg-oag3-0_0.dms and hg-oag3-0_0_displaced.dms files for the respective complex.

Visualize the representation of the system at lambda=1/2 on VMD. OpenMM does not force water molecules to be in a box, therefore to visualize the state in a box, use the wrap command on VMD. Verify that the ligand is, in fact, present.

pbc wrap -center com -centersel “index 0” -compound res -all

Replica Exchange:

In order to run RE on the BC computers, the following files and software are required: nodefile; hg-oag3-0_asyncre.cntl; and asyncre_re-openmm. The first and third can be obtained from GitHub. If the required files are not copied in the working directory, do so prior to running the simulation. Best practice is to run RE on screen.

/home/software/openmm-hg/runopenmm ~/SAMPL/complexes/async_re-openmm/ hg-oag3-0_asyncre.cntl

(Note that OpenMM requires Python3 and asyncre requires ConfigObj to read .cntl files. Install configobj if an error arises regarding this module.)


This part can be done either on Comet or the BC computers. For the latter, first include R in you home directory. Ensure that the script and uwham_analysis.R are also available in the working directory.

cp -r ~egallicchio/R/

bash ./

For the former, refer to Dr. Rajat's instructions. On Comet, to run OpenMM for host-guest calculations use a customized version.



From the leg1 directory, the following files must be included in the leg2 directory: hg-oag3-0_0_displaced.dms; hg-oag3-0_asyncre.cntl; and nodefile. The hg-oag3-0_0_displaced.dms must be renamed to hg-oag3-0_0.dms, which is the ingredient for asyncre.

cp ../hg-oag3-0-leg1/hg-oag3-0_displaced.dms hg-oag3-0_0.dms

In the hg-oag3-0_asyncre.cntl file, edit DISPLACEMENT to all negative values and set LIGOFFSET to the original DISPLACEMENT values (ie. positive values). Now RE can be initiated and analysis can be done similarly to the first leg.

/home/software/openmm-hg/runopenmm ~/SAMPL/complexes/async_re-openmm/ hg-oag3-0_asyncre.cntl

(Note that the and uwham_analysis.R scripts are also required for analysis, which can be done similarly to that of Leg 1.)