htmd.adaptive.adaptiverun module#
- class htmd.adaptive.adaptiverun.AdaptiveMD#
Bases:
AdaptiveBaseAdaptive sampling using Markov state models for conformation selection.
Projects completed simulations according to the specified projection, clusters the projected data, and builds a Markov state model. From the model it selects conformations from the various states based on the chosen criteria to spawn the next epoch of simulations.
- Parameters:
app (
SimQueueobject, defaultNone) – A SimQueue class object used to retrieve and submit simulationsproject (
str, default'adaptive') – The name of the projectnmin (
int, default0) – Minimum number of running simulationsnmax (
int, default1) – Maximum number of running simulationsnepochs (
int, default1000) – Stop adaptive once we have reached this number of epochsnframes (
int, default0) – Stop adaptive once we have simulated this number of aggregate simulation frames.inputpath (
str, default'input') – The directory used to store input foldersgeneratorspath (
str, default'generators') – The directory containing the generatorsdryrun (
boolean, defaultFalse) – A dry run means that the adaptive will retrieve and generate a new epoch but not submit the simulationsupdateperiod (
float, default0) – When set to a value other than 0, the adaptive will run synchronously every updateperiod secondscoorname (
str, default'input.coor') – Name of the file containing the starting coordinates for the new simulationsboxname (
str, default'input.xsc') – Name of the file containing the starting box dimensions for the new simulations. Set to ‘none’ to disable box writing.lock (
bool, defaultFalse) – Lock the folder while adaptive is ongoingmps (
int, default0) – If mps > 0, it will run simulations using the Multi-Process Service (MPS) with the number of processes specified. If set to 0, mps is disableddatapath (
str, default'data') – The directory in which the completed simulations are storedfilter (
bool, defaultTrue) – Enable or disable filtering of trajectories.filtersel (
str, default'not water') – Atom selection string for filtering. See more herefilteredpath (
str, default'filtered') – The directory in which the filtered simulations will be storedprojection (
Projectionobject, defaultNone) – A Projection class object or a list of objects which will be used to project the simulation data before constructing a Markov modeltruncation (
str, defaultNone) – Method for truncating the prob distribution (None, ‘cumsum’, ‘statecut’statetype (
(``’micro’, ``'cluster','macro'),str, default'micro') – What states (cluster, micro, macro) to use for calculations.macronum (
int, default8) – The number of macrostates to produceskip (
int, default1) – Allows skipping of simulation frames to reduce data. i.e. skip=3 will only keep every third framelag (
int, default1) – The lagtime used to create the Markov model. The units are in frames.clustmethod (
ClusterMixinclass, default <class'htmd.clustering.kcenters.KCenter'>) – Clustering algorithm used to cluster the contacts or distancesmethod (
str, default'1/Mc') – Criteria used for choosing from which state to respawn fromticalag (
int, default20) – Lagtime to use for TICA in frames. When using skip remember to change this accordinly.ticadim (
int, default3) – Number of TICA dimensions to use. When set to 0 it disables TICA
Examples
>>> adapt = AdaptiveMD() >>> adapt.nmin = 2 >>> adapt.nmax = 3 >>> adapt.nepochs = 2 >>> adapt.ticadim = 3 >>> adapt.projection = [MetricDistance('name CA', 'resname MOL', periodic='selections'), MetricDihedral()] >>> adapt.generatorspath = htmd.home()+'/data/dhfr' >>> adapt.app = LocalGPUQueue() >>> adapt.run()