SOAPify.HDF5er.HDF5erUtils

Simple submodule with support functions for SOAPify.HDF5er

Functions

exportChunk2HDF5(trajFolder, intervalStart, ...)

Export a chunk of atom information in an h5py.Group

isTrajectoryGroup(trajGroup)

Checks if the given group is a trajectory group

patchBoxFromTopology(hdf5TrajFile, topologyFile)

Patch the non orthogonal box in the trajectory.

SOAPify.HDF5er.HDF5erUtils.exportChunk2HDF5(trajFolder, intervalStart, intervalEnd, boxes, coordinates)[source]

Export a chunk of atom information in an h5py.Group

Parameters
  • trajFolder (h5py.Group) – the group in the hdf5 file

  • intervalStart (int) – the first frame to save within the group

  • intervalEnd (int) – the last frame to save within the group

  • boxes (list) – the list of the boxes, frame per frame (for each frame 6 floats representing the dimension and the angles of the box)

  • coordinates (list) – the list of the coordinates, frame per frame (for each frame a list that contains the coordinates of all atoms in that frame)

SOAPify.HDF5er.HDF5erUtils.isTrajectoryGroup(trajGroup)[source]

Checks if the given group is a trajectory group

Parameters

trajGroup (h5py.Group) – the group to check

Returns

True if the group is a trajectory group, False otherwise

Return type

bool

SOAPify.HDF5er.HDF5erUtils.patchBoxFromTopology(hdf5TrajFile, topologyFile)[source]

Patch the non orthogonal box in the trajectory.

This was a workaround for a __now solved__ bug in MDA, it can be used to change the box in a trajectory NOTE: this will only change the box, it will not modify the coordinates! NOTE: this function is not test covered and will be likely go deprecated soon

Parameters
  • hdf5TrajFile (str) – The name of the hdf5 file with the trajectories to patch

  • topologyFile (str) – The LAMMPS data file with the wnated box