SOAPify.HDF5er.HDF5To
This submodule gives the user some function to extract data from the hdf5 files
Functions
|
generates an ase trajectory from an hdf5 trajectory |
|
Creates a MDanalysis.Universe from a trajectory group |
|
generate an xyz-file in a IO object from an MDA trajectory |
|
generate an xyz-file in a IO object from a trajectory group in an hdf5 |
|
Saves "filename" as an xyz file |
- SOAPify.HDF5er.HDF5To.HDF52AseAtomsChunckedwithSymbols(groupTraj, chunkTraj, chunkBox, symbols)[source]
generates an ase trajectory from an hdf5 trajectory
- Parameters
- Returns
the trajectory stored in the given group
- Return type
list[ase.Atoms]
- SOAPify.HDF5er.HDF5To.createUniverseFromSlice(trajectoryGroup, useSlice=slice(None, None, None))[source]
Creates a MDanalysis.Universe from a trajectory group
- Parameters
trajectoryGroup (h5py.Group) – the given trajectory group
useSlice (_type_, optional) – the asked slice from wich create an universe. Defaults to slice(None).
- Returns
an universe containing the wnated part of the trajectory
- Return type
MDAnalysis.Universe
- SOAPify.HDF5er.HDF5To.getXYZfromMDA(filelike, trajToExport, framesToExport=slice(None, None, None), allFramesProperty='', perFrameProperties=None, **additionalColumns)[source]
generate an xyz-file in a IO object from an MDA trajectory
the additionalColumns arguments are added as extra columns to the file, they must be numpy.ndarray with shape (nofFrames,NofAtoms) for 1D data or (nofFrames,NofAtoms,Nvalues) for multidimensional data this will add one or more columns to the xyz file
- Parameters
filelike (IO) – the IO destination, can be a file
group (MDAnalysis.Universe | MDAnalysis.AtomGroup) – the universe or the selection of atoms to export
frames (List or slice or None, optional) – the frames to export. Defaults to None.
allFramesProperty (str, optional) – A comment string that will be present in all of the frames. Defaults to “”.
perFrameProperties (list[str], optional) – A list of comment. Defaults to None.
additionalColumns() – the additional columns to add to the file: each new keyword arguments will add a column to the xyz file
- SOAPify.HDF5er.HDF5To.getXYZfromTrajGroup(filelike, group, framesToExport=slice(None, None, None), allFramesProperty='', perFrameProperties=None, **additionalColumns)[source]
generate an xyz-file in a IO object from a trajectory group in an hdf5
the additionalColumns arguments are added as extra columns to the file, they must be numpy.ndarray with shape (nofFrames,NofAtoms) for 1D data or (nofFrames,NofAtoms,Nvalues) for multidimensional data this will add one or more columns to the xyz file, named after the keyword argument
- Parameters
filelike (IO) – the IO destination, can be a file
group (h5py.Group) – the trajectory group
frames (List or slice or None, optional) – the frames to export. Defaults to None.
allFramesProperty (str, optional) – A comment string that will be present in all of the frames. Defaults to “”.
perFrameProperties (list[str], optional) – A list of comment. Defaults to None.
additionalColumns() – the additional columns to add to the file: each new keyword arguments will add a column to the xyz file
- SOAPify.HDF5er.HDF5To.saveXYZfromTrajGroup(filename, group, framesToExport=slice(None, None, None), allFramesProperty='', perFrameProperties=None, **additionalColumns)[source]
Saves “filename” as an xyz file
see saveXYZfromTrajGroup this calls getXYZfromTrajGroup and treats the inputs in the same way
- Parameters
filename (str) – name of the file
group (h5py.Group) – the trajectory group
additionalColumsn() – the additional columns to add to the file
allFramesProperty (str, optional) – A comment string that will be present in all of the frames. Defaults to “”.
perFrameProperties (list[str], optional) – A list of comment. Defaults to None.