예제 #1
0
 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())
예제 #2
0
 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'))
예제 #3
0
    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())