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
Universe
with those from the given frame.- Parameters:
u – MDAnalysis
Universe
to set positions of.frame – NanoVer
FrameData
from 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
FrameData
to 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 –
FrameData
to add to.
- nanover.mdanalysis.converter.frame_data_to_mdanalysis(frame: FrameData) Universe
Converts from a NanoVer
FrameData
object to an MDAnalysis universe.- Parameters:
frame – NanoVer
FrameData
object.- Returns:
MDAnalysis
Universe
constructed 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:
FrameData
constructed 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)