protex.update.KeepHUpdate
- class protex.update.KeepHUpdate(ionic_liquid: ProtexSystem, all_forces: bool = False, to_adapt: list[tuple[str, int, frozenset[str]]] | None = None, include_equivalent_atom: bool = False, reorient: bool = False, K: int = 300)[source]
Bases:
UpdateKeepHUpdate performs updates but uses the original H position. Keep the position of the original H when switching from dummy to real H.
- Parameters:
ionic_liquid (ProtexSystem) – An instance of ProtexSystem
all_forces (bool = False) – Whether to update all forces or just the nonbonded forces.
to_adapt (list[tuple[str, int, frozenset[str]]] | None = None) – The number of the given species will be kept close to the given value by changing the probability of the given reaction. prob_new = prob_orig + K*( x(t) / x(eq) - 1)^3
include_equivalent_atom (bool = False) – Whether to consider equivalent atoms for the distance check.
reorient (bool = False) – Whether to reorient the molecule if the equivalent atom was used, or just switch the dummy atoms on/off.
K (int = 300) – The factor for adapting the probabilities based on the concentration of certain species.
Methods
Pickle a KeepHUpdate instance.
Load a pickled KeepHUpdate instance.
- dump(fname: str) None[source]
Pickle a KeepHUpdate instance.
- Parameters:
fname (str) – The file name
- static load(fname, protex_system: ProtexSystem) KeepHUpdate[source]
Load a pickled KeepHUpdate instance.
- Parameters:
fname (str) – The file name
protex_system (ProtexSystem) – An instance of ProtexSystem, used to create the Update instance
- Returns:
An update instance
- Return type: