def __init__(self): super().__init__() self._arg( 'goalfunction', 'function', 'This function will be used to convert the goal-projected simulation data to a ranking which' 'can be used for the directed component of FAST.', None, val.Function(), nargs='any') self._arg( 'ucscale', 'float', 'Scaling factor for undirected component. Directed component scaling ' 'automatically calculated as (1-uscale)', 0.5, val.Number(float, 'ANY')) self._arg('nosampledc', 'bool', 'Spawn only from top DC conformations without sampling', False, val.Boolean()) self._arg( 'autoscale', 'bool', 'Automatically scales exploration and exploitation ratios depending on ' 'how stuck the adaptive is at a given goal score.', False, val.Boolean()) self._arg('autoscalemult', 'float', 'Multiplier for the scaling factor.', 1, val.Number(float, '0POS')) self._arg('autoscaletol', 'float', 'Tolerance for the scaling factor.', 0.2, val.Number(float, '0POS')) self._arg('autoscalediff', 'int', 'Diff in epochs to use for scaling factor.', 10, val.Number(int, 'POS')) self._debug = False
def __init__(self): SimQueue.__init__(self) ProtocolInterface.__init__(self) self._arg( 'groupname', 'str', 'The name of the group of simulations you want to submit. If none is given, ' 'a randomly generated string will be used instead.', None, val.String()) self._arg('datadir', 'str', 'The directory in which to retrieve your results.', None, val.String()) self._arg('instancetype', 'str', 'Instance type', 'p2.xlarge', val.String(), valid_values=('g2.2xlarge', 'r4.large', 'p2.xlarge')) self._arg( 'hashnames', 'bool', 'If True, each job will have a name created from the hash of its directory ' 'instead of using the directory name.', False, val.Boolean()) self._arg('verbose', 'bool', 'Turn verbosity mode on or off.', False, val.Boolean()) self._arg('ngpu', 'int', 'Number of GPUs to use for a single job', 0, val.Number(int, '0POS')) self._arg('ncpu', 'int', 'Number of CPUs to use for a single job', 1, val.Number(int, '0POS')) self._arg('memory', 'int', 'Amount of memory per job (MB)', 8000, val.Number(int, '0POS')) self._cloud = None
def __init__(self): from moleculekit.molecule import Molecule super().__init__() self._arg('molecule', ':class: `moleculekit.molecule.Molecule`', 'Molecule', default=None, validator=val.Object(Molecule), required=True) self._arg('charge', 'int', 'Charge of the molecule in electron charges', default=None, validator=val.Number(int, 'ANY'), required=True) self._arg('multiplicity', 'int', 'Multiplicity of the molecule', default=1, validator=val.Number(int, 'POS')) self._arg('theory', 'str', 'Level of theory', default='B3LYP', validator=val.String(), valid_values=self.THEORIES) self._arg('correction', 'str', 'Empirical dispersion correction', default='none', validator=val.String(), valid_values=self.CORRECTIONS) self._arg('basis', 'str', 'Basis set', default='6-31G*', validator=val.String(), valid_values=self.BASIS_SETS) self._arg('solvent', 'str', 'Implicit solvent', default='vacuum', validator=val.String(), valid_values=self.SOLVENTS) self._arg('esp_points', ':class: `numpy.ndarray`', 'Point to calculate ESP', default=None, nargs='*') # TODO implement validator self._arg('optimize', 'boolean', 'Optimize geometry', default=False, validator=val.Boolean()) self._arg('restrained_dihedrals', ':class: `numpy.ndarray`', 'List of restrained dihedrals (0-based indices)', default=None, nargs='*') # TODO implement validator self._arg('queue', ':class:`SimQueue <htmd.queues.simqueue.SimQueue>` object', 'Queue object used to run simulations', default=LocalCPUQueue()) self._arg('directory', 'str', 'Working directory', default='.', validator=val.String())
def __init__(self): super().__init__() self._arg('acemd', ':class:`MDEngine <htmd.apps.app.App>` object', 'MD engine', None, val.Object(Acemd3)) self._arg('runtime', 'float', 'Running time of the simulation.', 0, val.Number(float, '0POS')) self._arg('timeunits', 'str', 'Units for runtime. Can be \'steps\', \'ns\' etc.', 'steps', val.String()) self._arg('temperature', 'float', 'Temperature of the thermostat in Kelvin', 300, val.Number(float, 'ANY')) self._arg('restraints', 'list', 'A list of restraint objects', None, val.Object(_Restraint), nargs='*') self._arg( 'useconstantratio', 'bool', 'For membrane protein simulations set it to true so that the barostat does not modify the xy aspect ratio.', False, val.Boolean()) self._arg( 'adaptive', 'bool', 'Set to True if making production runs for adaptive sampling.', False, val.Boolean()) self.acemd = Acemd3() self.acemd.binvelocities = None self.acemd.bincoordinates = 'output.coor' self.acemd.extendedsystem = 'output.xsc' self.acemd.coordinates = None self.acemd.structure = None self.acemd.parameters = None self.acemd.restart = 'on' self.acemd.trajectoryfile = 'output.xtc' self.acemd.trajectoryfreq = 25000 self.acemd.timestep = 4 self.acemd.switching = 'on' self.acemd.switchdist = 7.5 self.acemd.cutoff = 9 self.acemd.thermostat = 'on' self.acemd.thermostatdamping = 0.1 self.acemd.pme = 'on'
def __init__(self): super().__init__() from htmd.apps.app import App from htmd.queues.simqueue import SimQueue self._arg( 'app', ':class:`SimQueue <htmd.queues.simqueue.SimQueue>` object', 'A SimQueue class object used to retrieve and submit simulations', None, val.Object((App, SimQueue))) self._arg('project', 'str', 'The name of the project', 'adaptive', val.String()) self._arg('nmin', 'int', 'Minimum number of running simulations', 1, val.Number(int, 'POS')) self._arg('nmax', 'int', 'Maximum number of running simulations', 1, val.Number(int, 'POS')) self._arg('nepochs', 'int', 'Stop adaptive once we have reached this number of epochs', 1000, val.Number(int, 'POS')) self._arg( 'nframes', 'int', 'Stop adaptive once we have simulated this number of aggregate simulation frames.', 0, val.Number(int, '0POS')) self._arg('inputpath', 'str', 'The directory used to store input folders', 'input', val.String()) self._arg('generatorspath', 'str', 'The directory containing the generators', 'generators', val.String()) self._arg( 'dryrun', 'boolean', 'A dry run means that the adaptive will retrieve and generate a new epoch but not submit the simulations', False, val.Boolean()) self._arg( 'updateperiod', 'float', 'When set to a value other than 0, the adaptive will run synchronously every `updateperiod` seconds', 0, val.Number(float, '0POS')) self._arg( 'coorname', 'str', 'Name of the file containing the starting coordinates for the new simulations', 'input.coor', val.String()) self._arg('lock', 'bool', 'Lock the folder while adaptive is ongoing', False, val.Boolean()) self._running = None
def __init__(self): from sklearn.base import ClusterMixin from moleculekit.projections.projection import Projection super().__init__() self._arg('datapath', 'str', 'The directory in which the completed simulations are stored', 'data', val.String()) self._arg('filter', 'bool', 'Enable or disable filtering of trajectories.', True, val.Boolean()) self._arg('filtersel', 'str', 'Filtering atom selection', 'not water', val.String()) self._arg('filteredpath', 'str', 'The directory in which the filtered simulations will be stored', 'filtered', val.String()) self._arg('projection', ':class:`Projection <moleculekit.projections.projection.Projection>` object', 'A Projection class object or a list of objects which will be used to project the simulation ' 'data before constructing a Markov model', None, val.Object(Projection), nargs='+') self._arg('goalfunction', 'function', 'This function will be used to convert the goal-projected simulation data to a ranking which' 'can be used for the directed component of FAST.', None, val.Function(), nargs='any') self._arg('reward_method', 'str', 'The reward method', 'max', val.String()) self._arg('skip', 'int', 'Allows skipping of simulation frames to reduce data. i.e. skip=3 will only keep every third frame', 1, val.Number(int, 'POS')) self._arg('lag', 'int', 'The lagtime used to create the Markov model. Units are in frames.', 1, val.Number(int, 'POS')) self._arg('exploration', 'float', 'Exploration is the coefficient used in UCB algorithm to weight the exploration value', 0.5, val.Number(float, 'OPOS')) self._arg('temperature', 'int', 'Temperature used to compute the free energy', 300, val.Number(int, 'POS')) self._arg('ticalag', 'int', 'Lagtime to use for TICA in frames. When using `skip` remember to change this accordinly.', 20, val.Number(int, '0POS')) self._arg('ticadim', 'int', 'Number of TICA dimensions to use. When set to 0 it disables TICA', 3, val.Number(int, '0POS')) self._arg('clustmethod', ':class:`ClusterMixin <sklearn.base.ClusterMixin>` class', 'Clustering algorithm used to cluster the contacts or distances', MiniBatchKMeans, val.Class(ClusterMixin)) self._arg('macronum', 'int', 'The number of macrostates to produce', 8, val.Number(int, 'POS')) self._arg('save', 'bool', 'Save the model generated', False, val.Boolean()) self._arg('save_qval', 'bool', 'Save the Q(a) and N values for every epoch', False, val.Boolean()) self._arg('actionspace', 'str', 'The action space', 'metric', val.String()) self._arg('recluster', 'bool', 'If to recluster the action space.', False, val.Boolean()) self._arg('reclusterMethod', '', 'Clustering method for reclustering.', MiniBatchKMeans) self._arg('random', 'bool', 'Random decision mode for baseline.', False, val.Boolean()) self._arg('reward_mode', 'str', '(parent, frame)', 'parent', val.String()) self._arg('reward_window', 'int', 'The reward window', None, val.Number(int, 'POS')) self._arg('pucb', 'bool', 'If True, it uses PUCB algorithm using the provided goal function as a prior', False, val.Boolean()) self._arg('goal_init', 'float', 'The proportional ratio of goal initialization compared to max frames set by nframes', 0.3, val.Number(float, 'POS')) self._arg('goal_preprocess', 'function', 'This function will be used to preprocess goal data after it has been computed for all frames.', None, val.Function(), nargs='any') self._arg('actionpool', 'int', 'The number of top scoring actions used to randomly select respawning simulations', 0, val.Number(int, 'OPOS'))
def __init__(self): SimQueue.__init__(self) ProtocolInterface.__init__(self) self._arg( 'groupname', 'str', 'The name of the group of simulations you want to submit. If none is given, ' 'a randomly generated string will be used instead.', None, val.String()) self._arg('datadir', 'str', 'The directory in which to retrieve your results.', None, val.String()) self._arg('verbose', 'bool', 'Turn verbosity mode on or off.', False, val.Boolean()) self._cloud = None
def __init__(self): super().__init__() self._arg('acemd', ':class:`MDEngine <htmd.apps.app.App>` object', 'MD engine', None, val.Object(Acemd3)) self._arg('runtime', 'float', 'Running time of the simulation.', 0, val.Number(float, '0POS')) self._arg('timeunits', 'str', 'Units for runtime. Can be \'steps\', \'ns\' etc.', 'steps', val.String()) self._arg('temperature', 'float', 'Temperature of the thermostat in Kelvin', 300, val.Number(float, 'ANY')) self._arg('restraints', 'list', 'A list of restraint objects', None, val.Object(_Restraint), nargs='*') self._arg( 'useconstantratio', 'bool', 'For membrane protein simulations set it to true so that the barostat does not modify the xy aspect ratio.', False, val.Boolean()) self._arg( 'constraintsteps', 'int', 'Number of initial steps to apply constraints in units of 4fs. Defaults to half the simulation time.', None, val.Number(int, 'ANY')) self.acemd = Acemd3() self.acemd.coordinates = None self.acemd.structure = None self.acemd.parameters = None self.acemd.restart = 'on' self.acemd.trajectoryfile = 'output.xtc' self.acemd.trajectoryfreq = 25000 self.acemd.timestep = 4 self.acemd.switching = 'on' self.acemd.switchdist = 7.5 self.acemd.cutoff = 9 self.acemd.thermostat = 'on' self.acemd.thermostatdamping = 1 self.acemd.pme = 'on' self.acemd.barostat = 'on' self.acemd.barostatpressure = 1.01325 self.acemd.minimize = 500
def __init__(self): from sklearn.base import ClusterMixin from htmd.clustering.kcenters import KCenter from moleculekit.projections.projection import Projection super().__init__() self._arg('datapath', 'str', 'The directory in which the completed simulations are stored', 'data', val.String()) self._arg('filter', 'bool', 'Enable or disable filtering of trajectories.', True, val.Boolean()) self._arg('filtersel', 'str', 'Filtering atom selection', 'not water', val.String()) self._arg('filteredpath', 'str', 'The directory in which the filtered simulations will be stored', 'filtered', val.String()) self._arg('projection', ':class:`Projection <moleculekit.projections.projection.Projection>` object', 'A Projection class object or a list of objects which will be used to project the simulation ' 'data before constructing a Markov model', None, val.Object(Projection), nargs='+') self._arg('truncation', 'str', 'Method for truncating the prob distribution (None, \'cumsum\', \'statecut\'', None, val.String()) self._arg('statetype', 'str', 'What states (cluster, micro, macro) to use for calculations.', 'micro', val.String(), valid_values=('micro', 'cluster', 'macro')) self._arg('macronum', 'int', 'The number of macrostates to produce', 8, val.Number(int, 'POS')) self._arg('skip', 'int', 'Allows skipping of simulation frames to reduce data. i.e. skip=3 will only keep every third frame', 1, val.Number(int, 'POS')) self._arg('lag', 'int', 'The lagtime used to create the Markov model', 1, val.Number(int, 'POS')) self._arg('clustmethod', ':class:`ClusterMixin <sklearn.base.ClusterMixin>` class', 'Clustering algorithm used to cluster the contacts or distances', KCenter, val.Class(ClusterMixin)) self._arg('method', 'str', 'Criteria used for choosing from which state to respawn from', '1/Mc', val.String()) self._arg('ticalag', 'int', 'Lagtime to use for TICA in frames. When using `skip` remember to change this accordinly.', 20, val.Number(int, '0POS')) self._arg('ticadim', 'int', 'Number of TICA dimensions to use. When set to 0 it disables TICA', 3, val.Number(int, '0POS')) self._arg('contactsym', 'str', 'Contact symmetry', None, val.String()) self._arg('save', 'bool', 'Save the model generated', False, val.Boolean())
def __init__(self, _version=2): super().__init__() self._version = _version self._arg( 'acemd', ':class:`Acemd2 <htmd.apps.acemd.Acemd>` or :class:`Acemd <htmd.mdengine.acemd.acemd.Acemd>`' ' object', 'Acemd class object', None, val.Object([Acemd2, Acemd])) self._arg('runtime', 'float', 'Running time of the simulation.', 25000, val.Number(float, '0POS')) self._arg('timeunits', 'str', 'Units for runtime. Can be \'steps\', \'ns\' etc.', 'steps', val.String()) self._arg('temperature', 'float', 'Temperature of the thermostat in Kelvin', 300, val.Number(float, 'ANY')) self._arg( 'fb_k', 'float', 'Force constant of the flatbottom potential in kcal/mol/A^2. E.g. 5', 0, val.Number(float, 'ANY')) self._arg( 'fb_reference', 'str', 'Reference selection to use as dynamic center of the flatbottom box.', 'none', val.String()) self._arg('fb_selection', 'str', 'Selection of atoms to apply the flatbottom potential', 'none', val.String()) self._arg( 'fb_box', 'list', 'Position of the flatbottom box in term of the reference center given as ' '[xmin, xmax, ymin, ymax, zmin, zmax]', [0, 0, 0, 0, 0, 0], val.Number(float, 'ANY'), nargs=6) self._arg( 'useconstantratio', 'bool', 'For membrane protein simulations set it to true so that the barostat ' 'does not modify the xy aspect ratio.', False, val.Boolean()) self._arg( 'useconstraints', 'bool', 'Apply constraints to the production simulation, defined by the ' 'constraints parameter', False, val.Boolean()) self._arg( 'constraints', 'dict', 'A dictionary of atomselections and values of the constraint to be ' 'applied (in kcal/mol/A^2). Atomselects must be mutually exclusive.', {}, val.Dictionary(key_type=str)) self._arg( 'adaptive', 'bool', 'Set to True if making production runs for adaptive sampling.', False, val.Boolean()) self._arg( 'restraints', 'list', 'A list of restraint objects. Only works with {}(_version=3),' 'see :class:`AtomRestraint <htmd.mdengine.acemd.acemd.AtomRestraint>` and' ':class:`GroupRestraint <htmd.mdengine.acemd.acemd.GroupRestraint>`' ')'.format(self.__class__.__name__), None, val.Object(_Restraint), nargs='*') if self._version == 2: self.acemd = Acemd2() self.acemd.binindex = None self.acemd.binvelocities = None self.acemd.bincoordinates = 'output.coor' self.acemd.extendedsystem = 'output.xsc' self.acemd.coordinates = None self.acemd.structure = None self.acemd.parameters = None self.acemd.temperature = None self.acemd.restart = 'on' self.acemd.restartfreq = '5000' self.acemd.outputname = 'output' self.acemd.xtcfile = 'output.xtc' self.acemd.xtcfreq = '25000' self.acemd.timestep = '4' self.acemd.rigidbonds = 'all' self.acemd.hydrogenscale = '4' self.acemd.switching = 'on' self.acemd.switchdist = '7.5' self.acemd.cutoff = '9' self.acemd.exclude = 'scaled1-4' self.acemd.scaling14 = '1.0' self.acemd.langevin = 'on' self.acemd.langevintemp = None self.acemd.langevindamping = '0.1' self.acemd.pme = 'on' self.acemd.pmegridspacing = '1.0' self.acemd.fullelectfrequency = '2' self.acemd.energyfreq = '5000' self.acemd.consref = None self.acemd.run = '$numsteps' self.acemd.TCL = (''' set numsteps {NUMSTEPS} set fb_refindex {{ {REFINDEX} }} set fb_selindex {{ {SELINDEX} }} set fb_box {{ {BOX} }} set fb_K {KCONST} # ''', ''' proc flatbot1d {x xm xM fb_K} { set f 0 if {$x < $xm} { set f [expr $fb_K*[expr $xm-$x]] } if {$x > $xM} { set f [expr $fb_K*[expr $xM-$x]] } return $f } proc calcforces_init {} { global ref sel fb_refindex fb_selindex berendsenpressure off set ref [addgroup $fb_refindex] set sel [addgroup $fb_selindex] } proc calcforces {} { global ref sel fb_K fb_box loadcoords coords ##FLATBOTTOM if {$fb_K>0} { set r0 $coords($ref) set r1 $coords($sel) set dr [vecsub $r1 $r0] set fx [flatbot1d [lindex $dr 0] [lindex $fb_box 0] [lindex $fb_box 1] $fb_K] set fy [flatbot1d [lindex $dr 1] [lindex $fb_box 2] [lindex $fb_box 3] $fb_K] set fz [flatbot1d [lindex $dr 2] [lindex $fb_box 4] [lindex $fb_box 5] $fb_K] #print "dr: $dr fx: $fx fy: $fy fz: $fz" addforce $sel [list $fx $fy $fz] } } proc calcforces_endstep { } { } ''') elif self._version == 3: self.acemd = Acemd() self.acemd.binvelocities = None self.acemd.bincoordinates = 'output.coor' self.acemd.extendedsystem = 'output.xsc' self.acemd.coordinates = None self.acemd.structure = None self.acemd.parameters = None self.acemd.restart = 'on' self.acemd.trajectoryfile = 'output.xtc' self.acemd.trajectoryfreq = 25000 self.acemd.timestep = 4 self.acemd.switching = 'on' self.acemd.switchdist = 7.5 self.acemd.cutoff = 9 self.acemd.thermostat = 'on' self.acemd.thermostatdamping = 0.1 self.acemd.pme = 'on' else: raise ValueError( '_version can not be {}. Choose either 2 or 3.'.format( self._version))
def __init__(self): from moleculekit.molecule import Molecule super().__init__() self._arg( "molecule", ":class: `moleculekit.molecule.Molecule`", "Molecule", default=None, validator=val.Object(Molecule), required=True, ) self._arg( "charge", "int", "Charge of the molecule in electron charges", default=None, validator=val.Number(int, "ANY"), required=True, ) self._arg( "multiplicity", "int", "Multiplicity of the molecule", default=1, validator=val.Number(int, "POS"), ) self._arg( "theory", "str", "Level of theory", default="B3LYP", validator=val.String(), valid_values=self.THEORIES, ) self._arg( "correction", "str", "Empirical dispersion correction", default="none", validator=val.String(), valid_values=self.CORRECTIONS, ) self._arg( "basis", "str", "Basis set", default="6-31G*", validator=val.String(), valid_values=self.BASIS_SETS, ) self._arg( "solvent", "str", "Implicit solvent", default="vacuum", validator=val.String(), valid_values=self.SOLVENTS, ) self._arg( "esp_points", ":class: `numpy.ndarray`", "Point to calculate ESP", default=None, nargs="*", ) # TODO implement validator self._arg( "optimize", "boolean", "Optimize geometry", default=False, validator=val.Boolean(), ) self._arg( "restrained_dihedrals", ":class: `numpy.ndarray`", "List of restrained dihedrals (0-based indices)", default=None, nargs="*", ) # TODO implement validator self._arg( "queue", ":class:`SimQueue <jobqueues.simqueue.SimQueue>` object", "Queue object used to run simulations", default=LocalCPUQueue(), ) self._arg("directory", "str", "Working directory", default=".", validator=val.String())
def __init__(self, _configapp=None, _configfile=None, _findExecutables=True, _logger=True): from playmolecule import Session, Job SimQueue.__init__(self) ProtocolInterface.__init__(self) self._arg( "parentjob", "playmolecule.job.Job", "Spawn all jobs as children of this job", default=None, required=False, validator=val.Object(Job), ) self._arg( "session", "playmolecule.session.Session", "The current PMWS Session object", required=True, validator=val.Object(Session), ) self._arg("jobname", "str", "Job name (identifier)", None, val.String()) self._arg("group", "str", "Group name (identifier)", None, val.String()) self._arg( "ngpu", "int", "Number of GPUs", default=0, validator=val.Number(int, "0POS"), ) self._arg( "ncpu", "int", "Number of CPUs", default=1, validator=val.Number(int, "0POS"), ) self._arg( "memory", "int", "Amount of memory (MB)", default=1000, validator=val.Number(int, "POS"), ) self._arg("app", "str", "App name", required=True, validator=val.String()) self._arg( "configname", "str", "Name of the file containing the individual job configurations yaml or json. Not a filepath, just the name. All submitted folders must contain this file.", None, val.String(), ) self._arg( "retrievedir", "str", "Directory in which to retrieve the results of jobs", None, val.String(), ) self._arg( "datadir", "str", "Directory in which to copy or symlink the output directory.", None, val.String(), ) self._arg( "symlink", "bool", "Set to False to copy instead of symlink the directories from the retrievedir to datadir", True, val.Boolean(), ) self._arg( "copy", "list", "A list of file names or globs for the files to copy or symlink from retrievedir to datadir.", ("/", ), val.String(), nargs="*", ) loadConfig(self, "playmolecule", _configfile, _configapp, _logger)
def __init__(self, _version=_config["acemdversion"]): if _version == 2: raise RuntimeError("Equilibration v3 only supports _version=3") super().__init__() self._arg( "acemd", ":class:`Acemd <htmd.mdengine.acemd.acemd.Acemd>` object", "Acemd class object", None, val.Object([Acemd2, Acemd]), ) self._arg( "runtime", "float", "Running time of the simulation.", 25000, val.Number(float, "0POS"), ) self._arg( "timeunits", "str", "Units for time arguments. Can be 'steps', 'ns' etc.", "steps", val.String(), ) self._arg( "temperature", "float", "Temperature of the thermostat in Kelvin", 300, val.Number(float, "ANY"), ) self._arg( "useconstantratio", "bool", "For membrane protein simulations set it to true so that the barostat " "does not modify the xy aspect ratio.", False, val.Boolean(), ) self._arg( "restraintsteps", "int", "Number of initial steps to apply restraints in units of 4fs. Defaults " "to half the simulation time.", None, val.Number(int, "ANY"), ) self._arg( "restraints", "list", "A list of restraint objects. If None will apply defaultEquilRestraints decaying over half the runtime. If no restraints are required set to empty list []." "See :class:`AtomRestraint <htmd.mdengine.acemd.acemd.AtomRestraint>` and" ":class:`GroupRestraint <htmd.mdengine.acemd.acemd.GroupRestraint>`)", None, val.Object(_Restraint), nargs="*", ) self.acemd = Acemd() self.acemd.coordinates = None self.acemd.structure = None self.acemd.parameters = None self.acemd.restart = "on" self.acemd.trajectoryfile = "output.xtc" self.acemd.trajectoryperiod = 25000 self.acemd.timestep = 4 self.acemd.switching = "on" self.acemd.switchdistance = 7.5 self.acemd.cutoff = 9 self.acemd.thermostat = "on" self.acemd.thermostatdamping = 1 self.acemd.pme = "on" self.acemd.barostat = "on" self.acemd.barostatpressure = 1.01325 self.acemd.minimize = 500
def __init__(self): super().__init__() self._arg( "acemd", ":class:`Acemd <htmd.mdengine.acemd.acemd.Acemd>`" " object", "Acemd class object", None, val.Object(Acemd), ) self._arg( "runtime", "float", "Running time of the simulation.", 25000, val.Number(float, "0POS"), ) self._arg( "timeunits", "str", "Units for runtime. Can be 'steps', 'ns' etc.", "steps", val.String(), ) self._arg( "temperature", "float", "Temperature of the thermostat in Kelvin", 300, val.Number(float, "ANY"), ) self._arg( "fb_k", "float", "Force constant of the flatbottom potential in kcal/mol/A^2. E.g. 5", 0, val.Number(float, "ANY"), ) self._arg( "fb_reference", "str", "Reference selection to use as dynamic center of the flatbottom box.", "none", val.String(), ) self._arg( "fb_selection", "str", "Selection of atoms to apply the flatbottom potential", "none", val.String(), ) self._arg( "fb_box", "list", "Position of the flatbottom box in term of the reference center given as " "[xmin, xmax, ymin, ymax, zmin, zmax]", [0, 0, 0, 0, 0, 0], val.Number(float, "ANY"), nargs=6, ) self._arg( "useconstantratio", "bool", "For membrane protein simulations set it to true so that the barostat " "does not modify the xy aspect ratio.", False, val.Boolean(), ) self._arg( "useconstraints", "bool", "Apply constraints to the production simulation, defined by the " "constraints parameter", False, val.Boolean(), ) self._arg( "constraints", "dict", "A dictionary of atomselections and values of the constraint to be " "applied (in kcal/mol/A^2). Atomselects must be mutually exclusive.", {}, val.Dictionary(key_type=str), ) self._arg( "adaptive", "bool", "Set to True if making production runs for adaptive sampling.", False, val.Boolean(), ) self._arg( "restraints", "list", "A list of restraint objects." "See :class:`AtomRestraint <htmd.mdengine.acemd.acemd.AtomRestraint>` and" ":class:`GroupRestraint <htmd.mdengine.acemd.acemd.GroupRestraint>`" ")", None, val.Object(_Restraint), nargs="*", ) self.acemd = Acemd() self.acemd.binvelocities = None self.acemd.bincoordinates = "output.coor" self.acemd.extendedsystem = "output.xsc" self.acemd.coordinates = None self.acemd.structure = None self.acemd.parameters = None self.acemd.restart = "on" self.acemd.trajectoryfile = "output.xtc" self.acemd.trajectoryperiod = 25000 self.acemd.timestep = 4 self.acemd.switching = "on" self.acemd.switchdistance = 7.5 self.acemd.cutoff = 9 self.acemd.thermostat = "on" self.acemd.thermostatdamping = 0.1 self.acemd.pme = "on"
def __init__(self): super().__init__() from jobqueues.simqueue import SimQueue self._arg( "app", ":class:`SimQueue <jobqueues.simqueue.SimQueue>` object", "A SimQueue class object used to retrieve and submit simulations", None, val.Object((SimQueue, )), ) self._arg("project", "str", "The name of the project", "adaptive", val.String()) self._arg( "nmin", "int", "Minimum number of running simulations", 0, val.Number(int, "0POS"), ) self._arg( "nmax", "int", "Maximum number of running simulations", 1, val.Number(int, "POS"), ) self._arg( "nepochs", "int", "Stop adaptive once we have reached this number of epochs", 1000, val.Number(int, "POS"), ) self._arg( "nframes", "int", "Stop adaptive once we have simulated this number of aggregate simulation frames.", 0, val.Number(int, "0POS"), ) self._arg( "inputpath", "str", "The directory used to store input folders", "input", val.String(), ) self._arg( "generatorspath", "str", "The directory containing the generators", "generators", val.String(), ) self._arg( "dryrun", "boolean", "A dry run means that the adaptive will retrieve and generate a new epoch but not submit the simulations", False, val.Boolean(), ) self._arg( "updateperiod", "float", "When set to a value other than 0, the adaptive will run synchronously every `updateperiod` seconds", 0, val.Number(float, "0POS"), ) self._arg( "coorname", "str", "Name of the file containing the starting coordinates for the new simulations", "input.coor", val.String(), ) self._arg( "lock", "bool", "Lock the folder while adaptive is ongoing", False, val.Boolean(), ) self._running = None
def __init__(self): from sklearn.base import ClusterMixin from htmd.clustering.kcenters import KCenter from moleculekit.projections.projection import Projection super().__init__() self._arg( "datapath", "str", "The directory in which the completed simulations are stored", "data", val.String(), ) self._arg( "filter", "bool", "Enable or disable filtering of trajectories.", True, val.Boolean(), ) self._arg("filtersel", "str", "Filtering atom selection", "not water", val.String()) self._arg( "filteredpath", "str", "The directory in which the filtered simulations will be stored", "filtered", val.String(), ) self._arg( "projection", ":class:`Projection <moleculekit.projections.projection.Projection>` object", "A Projection class object or a list of objects which will be used to project the simulation " "data before constructing a Markov model", None, val.Object(Projection), nargs="+", ) self._arg( "truncation", "str", "Method for truncating the prob distribution (None, 'cumsum', 'statecut'", None, val.String(), ) self._arg( "statetype", "str", "What states (cluster, micro, macro) to use for calculations.", "micro", val.String(), valid_values=("micro", "cluster", "macro"), ) self._arg( "macronum", "int", "The number of macrostates to produce", 8, val.Number(int, "POS"), ) self._arg( "skip", "int", "Allows skipping of simulation frames to reduce data. i.e. skip=3 will only keep every third frame", 1, val.Number(int, "POS"), ) self._arg( "lag", "int", "The lagtime used to create the Markov model", 1, val.Number(int, "POS"), ) self._arg( "clustmethod", ":class:`ClusterMixin <sklearn.base.ClusterMixin>` class", "Clustering algorithm used to cluster the contacts or distances", KCenter, val.Class(ClusterMixin), ) self._arg( "method", "str", "Criteria used for choosing from which state to respawn from", "1/Mc", val.String(), ) self._arg( "ticalag", "int", "Lagtime to use for TICA in frames. When using `skip` remember to change this accordinly.", 20, val.Number(int, "0POS"), ) self._arg( "ticadim", "int", "Number of TICA dimensions to use. When set to 0 it disables TICA", 3, val.Number(int, "0POS"), ) self._arg("contactsym", "str", "Contact symmetry", None, val.String()) self._arg("save", "bool", "Save the model generated", False, val.Boolean())