nanover.omni.openmm module
- class nanover.omni.openmm.OpenMMSimulation(name: str | None = None)
Bases:
object
A wrapper for OpenMM simulations so they can be run inside the OmniRunner.
- advance_by_one_step()
Advance the simulation to the next point a frame should be reported, and send that frame.
- advance_by_seconds(dt: float)
Advance playback time by some seconds, and advance the simulation to the next frame output. :param dt: Time to advance playback by in seconds (ignored)
- advance_to_next_report()
Step the simulation to the next point a frame should be reported, and send that frame.
- classmethod from_simulation(simulation: Simulation, *, name: str | None = None)
Construct this from an existing OpenMM simulation. :param simulation: An existing OpenMM Simulation :param name: An optional name for the simulation instead of default
- classmethod from_xml_path(path: PathLike[str], *, name: str | None = None)
Construct this from an existing NanoVer OpenMM XML file at a given path. :param path: Path of the NanoVer OpenMM XML file :param name: An optional name for the simulation instead of filename
- load()
Load and set up the simulation if it isn’t done already.
- make_regular_frame(positions: List[List[float]] | ndarray[Any, dtype[float32 | float64]] | None = None)
Make a NanoVer FrameData corresponding to the current state of the simulation. :param positions: Optionally provided particle positions to save fetching them again.
- make_topology_frame()
Make a NanoVer FrameData corresponding to the current particle positions and topology of the simulation.
- reset(app_server: NanoverImdApplication)
Reset the simulation to its initial conditions, reset IMD interactions, and reset frame stream to begin with topology and continue. :param app_server: The app server hosting the frame publisher and imd state