OpenMMIMDFeature¶
-
class
narupatools.openmm.dynamics.OpenMMIMDFeature(dynamics: narupatools.openmm.dynamics.OpenMMDynamics)¶ Controls interactions applied to an OpenMM simulation.
Inheritance

Methods
Create a new interaction manager.
Add a source for interactions which are polled before each dynamics step.
Add an interaction to the system.
Remove this ASEImdProvider from the dynamics it was applied to.
Remove a source for interactions which are polled before each dynamics step.
Remove an interaction with the given key.
Update an interaction with the given key.
-
__init__(dynamics: narupatools.openmm.dynamics.OpenMMDynamics)¶ Create a new interaction manager.
- Parameters
dynamics – SimulationDynamics object which notifies the ASEImdProvider when dynamics steps occur.
-
add_dynamic_interactions_source(source: narupatools.imd.interaction_source.InteractionsSource) → None¶ Add a source for interactions which are polled before each dynamics step.
- Parameters
source – Source of IMD interactions.
-
add_interaction(interaction: narupa.imd.particle_interaction.ParticleInteraction, *, key: Optional[str] = None) → str¶ Add an interaction to the system.
- Parameters
interaction – Interaction to add.
key – Key to store interaction as. If not provided, automatically generated.
- Returns
Key that the interaction was assigned to.
-
remove_dynamic_interactions_source(source: narupatools.imd.interaction_source.InteractionsSource) → None¶ Remove a source for interactions which are polled before each dynamics step.
- Parameters
source – Source of IMD interactions.
-
remove_interaction(key: str) → TInteraction¶ Remove an interaction with the given key.
- Parameters
key – Key of the interaction to remove.
- Raises
KeyError – Interaction with the given key does not exist.
- Returns
Interaction which was removed.
-
update_interaction(key: str, interaction: narupa.imd.particle_interaction.ParticleInteraction) → None¶ Update an interaction with the given key.
- Parameters
key – Key of the interaction to update.
interaction – ParticleInteraction containing data for the interaction.
- Raises
KeyError – Interaction with the given key does not exist.
Attributes
Key-index set of interaction constraints currently applied to the system.
Dynamics these IMD interactions are applied to.
Total interactive forces from all active interactions.
Event triggered when an interaction is removed from the system.
Event triggered when an interaction is first applied to the system.
Total potential energy from all active interactions.
Total work performed by all active interactions, in kilojoules per mole.
Total work performed last step by all active interactions.
-
current_interactions¶ Key-index set of interaction constraints currently applied to the system.
-
dynamics¶ Dynamics these IMD interactions are applied to.
-
imd_forces¶ Total interactive forces from all active interactions.
This returns a (N, 3) NumPy array, where N is the number of atoms in the system. The forces are in kilojoules per mole per nanometer.
-
on_end_interaction¶ Event triggered when an interaction is removed from the system.
-
on_start_interaction¶ Event triggered when an interaction is first applied to the system.
-
potential_energy¶ Total potential energy from all active interactions.
The returned work is in kilojoules per mole.
-
total_work¶ Total work performed by all active interactions, in kilojoules per mole.
This does not include interactions which have now finished.
-
work_last_step¶ Total work performed last step by all active interactions.
The returned work is in kilojoules per mole.
-