nanover.openmm.imd module
Manage an OpenMM CustomExternalForce in conjunction with NanoVer IMD
- class nanover.openmm.imd.ImdForceManager(imd_state: ImdStateWrapper, imd_force: CustomExternalForce)
Bases:
object
- update_interactions(simulation: Simulation, positions: ndarray)
- nanover.openmm.imd.add_imd_force_to_system(system: System) CustomExternalForce
Generate an OpenMM force that accepts arbitrary forces per particle.
The force is created, populated, added to the system and returned.
This is the force that is used to communicate the particle interactions from NanoVer by
NanoverImdReporter
.
- nanover.openmm.imd.create_imd_force() CustomExternalForce
Returns an empty OpenMM force to communicate imd forces.
Each particle in the system has a
fx
,fy
, andfz
parameter to provide the arbitrary force components.The force needs to be populated to include all the particle in the simulation
mm.System
.
- nanover.openmm.imd.populate_imd_force(force: CustomExternalForce, system: System) None
Add all the particles to the iMD force.
The iMD force must be one generated by
create_imd_force()
.