S. Doerr and G. De Fabritiis, On-the-fly learning and sampling of ligand binding by high-throughput molecular simulations, J. Chem. Theory Comput. 10 (5), pp 2064–2069(2014).
S. Doerr, M. J. Harvey, Frank Noé, and G. De Fabritiis, HTMD: High-Throughput Molecular Dynamics for Molecular Discovery J. Chem. Theory Comput. 2016 12 (4), 1845-1852
Each simulation in adaptive is associated to a single directory which contains all files to run it. To run a project it is therefore necessary to provide one or more initial simulation directories, called generators.
Adaptive creates multiple directories which it uses to organize the simulations. The user only needs to provide a generators folder containing one sub-folder for each starting conformation containing all files needed to execute that simulation. For example:
└── generators/ ├── gen1/ │ ├── structure.pdb │ ├── input │ └── ... ├── gen2/ │ ├── structure.pdb │ ├── input │ └── ...
Then the adaptive will generate an
data and later a
filtered folder as well, looking like this:
├── data/ # Contains the completed simulations (automatically created) ├── filtered/ # Contains the completed simulations without water atoms (automatically created) ├── generators/ # Contains the initial generators provided by the user └── input/ # Contains the files needed to start all simulations of all epochs (automatically created)
Adaptive uses a naming scheme for simulations which follows the pattern:
e4s3_e2s1p0f45. This name tells us that this simulation was
generated in epoch 4 as the 3rd simulation of the batch. The starting
conformation was taken from simulation 1 of epoch 2 from the first piece
of the simulation [*] and from frame 45 of that simulation piece.
|[*]||some MD software might fragment simulations into pieces. Usually though this number will be 0 and can be ignored.|
As only the coordinates files are seeded for every new epoch, simulations cannot use a velocity file. Velocities are therefore reinitialized to the Maxwell Boltzmann distribution at the given temperature.
E.g. if setting up the simulations with the
from htmd.protocols.production_v5 import Production md = Production() md.adaptive = True [...]
or directly modifying the ACEMD
input file of the simulations and
removing the binvelocities line.
The power of adaptive sampling is accessible on HTMD through the
from htmd.ui import * app = LocalGPUQueue() app.datadir = './data' md = AdaptiveMD() md.nmin=5 md.nmax=10 md.nepochs = 30 md.app = app md.projection = MetricDistance('name CA', '(resname BEN) and ((name C7) or (name C6))', metric='contacts') md.ticadim = 3 md.updateperiod = 14400 # execute every 4 hours md.run()
updateperiodcontrols this behaviour.
updateperiodneeds to be specified if adaptive should be run synchronously
updateperiodthen, or set it to zero such that the program will execute and exit
#!/bin/bash -login # cron.sh file # use crontab -e to add this line: # 0 */4 * * * cd /pathtomydir/; ./cron.sh # python conf.py
If we want to look at what structures were chosen as the starting conformations of a given epoch we can use a code snippet like the following:
for s in glob('input/e28s*'): # Visualize all starting conf of epoch 28 mol = Molecule(s+'/structure.pdb') mol.read(s+'/input.coor') mol.view()