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): 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'))