schrodinger.application.matsci.hdfutils module¶
Contains functionality related to hdf files
Copyright Schrodinger, LLC. All rights reserved.
- class schrodinger.application.matsci.hdfutils.HDFIO[source]¶
Bases:
object
Class describing HDF5 input and output methods
- readHDF(filename, key)[source]¶
Reads a HDF file
- Parameters
filename (str) – The filename
key (str) – The key to read
- Return type
pandas.core.frame.DataFrame
- Returns
Pandas data frame stored in the passed key
- class schrodinger.application.matsci.hdfutils.HDFProxyPickleIO[source]¶
Bases:
object
Class describing pickle input and output methods which act as a proxy for HDF5 file
- readHDF(filename, key)[source]¶
Reads a pickle file
- Parameters
filename (str) – The filename
key (str) – The key to read
- Return type
pandas.core.frame.DataFrame
- Returns
Pandas data frame stored in the passed key
- schrodinger.application.matsci.hdfutils.generate_hierarchial_key(*args)[source]¶
Generates a hierarchial key for a hdf file
- Parameters
args (list) – the list of strings which will form the key
- Return type
str
- Returns
the hierarchial key
- schrodinger.application.matsci.hdfutils.get_filename(basename)[source]¶
Gets the filename with proper extension
- Parameters
basename (str) – The basename
- Returns
The filename
- Return type
str
- schrodinger.application.matsci.hdfutils.get_hdf_io(filename)[source]¶
Gets the i/o class associated with the extension of the filename
- Parameters
filename (str) – The filename
- Returns
The i/o class
- Return type
- schrodinger.application.matsci.hdfutils.get_hdf_keys(filename)[source]¶
Gets the keys of data stored in the file
- Parameters
filename (str) – The filename
- Return type
list
- Returns
list of keys in the file