protex.update.StateUpdate
- class protex.update.StateUpdate(updateMethod: Update, prob_function: str | None = None)[source]
Bases:
object
Controls the update scheme and proposes the residues that need an update.
Methods
Pickle the StateUpdate instance.
_summary_.
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]
_summary_.
- 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:
- update(nr_of_steps: int = 2) list[tuple[protex.residue.Residue, protex.residue.Residue]] [source]
Updates the current state using the method defined in the UpdateMethod class.