nanover.mdanalysis.converter module
Module for performing conversions between MDAnalysis universes and NanoVer FrameData objects.
- class nanover.mdanalysis.converter.FrameDataField(key, required)
Bases:
tuple- key
Alias for field number 0
- required
Alias for field number 1
- class nanover.mdanalysis.converter.FrameDataFieldConversion(key, converter)
Bases:
tuple- converter
Alias for field number 1
- key
Alias for field number 0
- nanover.mdanalysis.converter.add_frame_positions_to_mda(u: Universe, frame: FrameData)
Updates the positions in an MDAnalysis
Universewith those from the given frame.- Parameters:
u – MDAnalysis
Universeto set positions of.frame – NanoVer
FrameDatafrom which to extract positions.
- nanover.mdanalysis.converter.add_mda_positions_to_frame_data(u: Universe, frame_data: FrameData)
Adds the positions in a MDAnalysis universe to the frame data, if they exist.
- Parameters:
u – MDAnalysis
Universe.frame_data – NanoVer
FrameDatato add to.
- Raises:
MissingDataError – if no positions exist in the universe.
- nanover.mdanalysis.converter.add_mda_topology_to_frame_data(u, frame_data)
Adds available topology information from an MDAnalysis Universe to a FrameData.
- Parameters:
u – MDAnalysis
Universe.frame_data –
FrameDatato add to.
- nanover.mdanalysis.converter.frame_data_to_mdanalysis(frame: FrameData) Universe
Converts from a NanoVer
FrameDataobject to an MDAnalysis universe.- Parameters:
frame – NanoVer
FrameDataobject.- Returns:
MDAnalysis
Universeconstructed from the given FrameData.
- nanover.mdanalysis.converter.mdanalysis_to_frame_data(u: Universe, topology=True, positions=True) FrameData
Converts from an MDAnalysis universe to NanoVer FrameData object.
- Parameters:
u – MDAnalysis
Universe.topology – Whether to include topology.
positions – Whether to include positions.
- Returns:
FrameDataconstructed from MDAnalysis universe.- Raises:
MissingDataError – if no positions exist in the MDAnalysis universe, and positions are specified.
Topological information consists any available information such as bonds, residue names, residue ids, atom names, chain names, residue index and chain indexes
- nanover.mdanalysis.converter.nullable_int(value)