nanover.openmm.bundles module

nanover.openmm.bundles.bundle_openmm_simulation(simulation: Simulation, *, outfile: BinaryIO | PathLike[str] | str, include_state=False, pbc_wrapping=False) None

Bundle an OpenMM simulation into zip archive.

Parameters:
  • simulation – The simulation to bundle.

  • outfile – A file object or path to write the bundle zip to.

  • include_state – Include the present state of the simulation in the bundle.

  • pbc_wrapping – Wrap atom positions with periodic boundary conditions before bundling.

nanover.openmm.bundles.unbundle_openmm_simulation(bundle_file: BinaryIO | PathLike[str] | str, *, imd_force: CustomExternalForce | None = None, ignore_state=False, platform_name: str | None = None) Simulation

Create an OpenMM simulation from a zip archive.

Parameters:
  • bundle_file – The content of an XML file as a string.

  • imd_force – Optionally, an imd force to populate and add to the system. The force must be created by nanover.openmm.potentials.create_imd_force().

  • ignore_state – Ignore serialized state when present.

  • platform_name – Explicit platform to use for OpenMM.