narupa.openmm.converter module¶
Module providing conversion methods between Narupa and OpenMM.
-
narupa.openmm.converter.add_openmm_state_to_frame_data(data: narupa.trajectory.frame_data.FrameData, state: pretends.State, include_positions: bool = True) → None¶ Adds the OpenMM state information to the given
FrameData, including positions and periodic box vectors.Parameters: - data – Narupa
FrameDatato add state information to. - state – OpenMM
Statefrom which to extract state information. - include_positions – If
True, the particle positions are read from the state and included in the frame.
- data – Narupa
-
narupa.openmm.converter.add_openmm_topology_to_frame_data(data: narupa.trajectory.frame_data.FrameData, topology: pretends.Topology) → None¶ Adds the OpenMM topology information to the given
FrameData, including residue, chain, atomic and bond information.Parameters: - data –
FrameDatato add topology information to. - topology – OpenMM
Topologyfrom which to extract information.
- data –
-
narupa.openmm.converter.openmm_to_frame_data(*, state: Optional[pretends.State] = None, topology: Optional[pretends.Topology] = None, include_positions: bool = True) → narupa.trajectory.frame_data.FrameData¶ Converts the given OpenMM state and topology objects into a Narupa
FrameData.Both fields are optional. For performance reasons, it is best to construct a Narupa
FrameDataonce with topology information, and from then on just update the state, as that will result in less data being transmitted.Parameters: - state – An optional OpenMM
Statefrom which to extract state data. - topology – An optional OpenMM
Topologyfrom which to extract topological information. - include_positions – If
True, the particle positions are read from the state and included in the frame.
Returns: A
FrameDatawith the state and topology information provided added to it.- state – An optional OpenMM