SOAPify.HDF5er.ToHDF5
This submodule contains some function to import date to the hdf5 files
Functions
|
Creates an HDF5 trajectory groupfrom an mda trajectory |
|
Uploads an mda.Universe or an mda.AtomGroup to a h5py.Group in an hdf5 file |
|
Generate an HDF5 trajectory from an xyz file and a box file |
- SOAPify.HDF5er.ToHDF5.MDA2HDF5(mdaTrajectory, targetHDF5File, groupName, trajChunkSize=100, override=False, attrs=None, trajslice=slice(None, None, None), useType='float64')[source]
Creates an HDF5 trajectory groupfrom an mda trajectory
Opens or creates the given HDF5 file, request the user’s chosen group, then uploads an mda.Universe or an mda.AtomGroup to a h5py.Group in an hdf5 file
WARNING: in the HDF5 file if the chosen group is already present it will be overwritten by the new data
- Parameters
MDAUniverseOrSelection (MDAnalysis.Universe or MDAnalysis.AtomGroup) – the container with the trajectory data
targetHDF5File (str) – the name of HDF5 file
groupName (str) – the name of the group in wich save the trajectory data within the targetHDF5File
trajChunkSize (int, optional) – The desired dimension of the chunks of data that are stored in the hdf5 file. Defaults to 100.
override (bool, optional) – If true the hdf5 file will be completely overwritten. Defaults to False.
useType (str,optional) – The precision used to store the data. Defaults to “float64”.
- SOAPify.HDF5er.ToHDF5.universe2HDF5(mdaTrajectory, trajFolder, trajChunkSize=100, trajslice=slice(None, None, None), useType='float64')[source]
Uploads an mda.Universe or an mda.AtomGroup to a h5py.Group in an hdf5 file
- Parameters
MDAUniverseOrSelection (MDAnalysis.Universe or MDAnalysis.AtomGroup) – the container with the trajectory data
trajFolder (h5py.Group) – the group in which store the trajectory in the hdf5 file
trajChunkSize (int, optional) – The desired dimension of the chunks of data that are stored in the hdf5 file. Defaults to 100.
useType (str,optional) – The precision used to store the data. Defaults to “float64”.
- SOAPify.HDF5er.ToHDF5.xyz2hdf5Converter(xyzName, boxfilename, group)[source]
Generate an HDF5 trajectory from an xyz file and a box file
This function reads an xyz file with ase and then export it to an trajectory in and hdf5 file, the user should pass the group within the hdf5file to this function
NB: this is “legacy code” not covered by unit tests, use with caution