Avogadro developers, I would like to bring to your attention the first development release of a new Python 3 project, h5cube, for compression/decompression of CUBE files using HDF5/h5py:
GitHub: https://github.com/bskinn/h5cube PyPI: https://pypi.python.org/pypi?:action=display&name=h5cube&version=0.1.post2 (pip install h5cube) The core functionality is in place, with convenient console execution in the form of the automatically-installed script h5cube: - (De)compression is selected automatically based on the (case-insensitive) file extension: .cub/.cube versus .h5cube. - gzip compression level is controlled by --compress #. - The h5py 'scale offset' truncation filter (i.e., the number of digits retained past the decimal) is controlled by --truncate #. The volumetric data is actually stored as the base-10 logarithm <https://github.com/bskinn/h5cube/blob/v0.1.post2/h5cube/h5cube.py#L188-L189>, so to be precise --truncate operates on the mantissas of the data, not the data itself. - The data can be thresholded before compression using combinations of --absolute/--signed and --minmax/--isofactor. This is where the majority of compressibility gains (often ~25-50x or better) can be realized, even for a relatively broad retained-data range of, e.g.: --minmax 1e-6 100. A 100x or greater compression factor can be routinely achieved when only a specific isovalue is of interest and significant truncation is acceptable (e.g., --truncate 2 --isofactor 0.002 5), such as for SI accompanying a figure showing a specific isosurface. - The precision of the data output to .cube on decompression can be controlled by --precision. No documentation exists yet; that <http://h5cube.readthedocs.io/en/latest/> and a test suite are the next major tasks. The utility works satisfactorily in my hands on CUBE files generated by ORCA and MultiWFN; its behavior on files of other provenance is unknown. To note, the HDF5 file format should make it relatively straightforward to adapt applications such as Avogadro to directly read the compressed .h5cube files, if desired. Bug reports, feature requests, etc. are welcomed on the project's Issues page <https://github.com/bskinn/h5cube/issues>. Thanks, and best regards, Brian
------------------------------------------------------------------------------
_______________________________________________ Avogadro-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/avogadro-devel
