protex.update.StateUpdate
- class protex.update.StateUpdate(updateMethod: Update, prob_function: str = None)[source]
Bases:
objectControls the update scheme and proposes the residues that need an update.
- Parameters:
updateMethod (Update) – The update method to be used. At the moment NaiveMCUpdate or KeepHUpdate.
prob_function (str = None) – The function to be used for scaling down the transfer probabilities for distances between r_min and r_max. Currently implemented: None (strict cutoff at r_max, ignores r_min), “linear”, “cosine”, and “tanh”.
Methods
Pickle the StateUpdate instance.
Get charges of all atoms in the system.
Deprecated 1.1.
Load a pickled StateUpdate instance.
Updates the current state using the method defined in the UpdateMethod class.
Write current charges to a file.
- dump(fname: str) None[source]
Pickle the StateUpdate instance.
- Parameters:
fname (str) – The file name
- get_charges() list[source]
Get charges of all atoms in the system. Deprecated with ChargeReporter.
- Returns:
atom_idxs, atom object, charge
- Return type:
list
- Raises:
RuntimeError – If system does not contain a nonbonded force
- static load(fname: str, updateMethod: Update) StateUpdate[source]
Load a pickled StateUpdate instance.
- Parameters:
fname (str) – The file name
updateMethod (Update) – The update method instance
- Returns:
An instance of StateUpdate
- Return type: