Geoff, when you have a moment, could you join me in a custom chat? I have some questions about OpenBabel / Avogadro development. Thanks! — hBy2Py21 secs ago
Geoff, thank you in advance for your time.
I'm developing h5cube, a Python tool for CUBE file compression via h5py/HDF5.
Per pentavalentcarbon's suggestion, I posted notice to the avogadro dev email list a while back, but didn't get any responses.
As a side effect of putting the package together, I've effectively defined an HDF5 file specification for these compressed CUBEs.
(I plan to write up the specification more comprehensively as part of the pending product documentation.)
In any event, this seems like something that could pretty readily be incorporated into OpenBabel / Avogadro.
Lossless compression tends to reduce filesizes by ~7-10x
If lossy compression is acceptable, say when only a specific isosurface is of interest (e.g., when for archiving data in ESI for a publication), I've seen size reductions on the order of 200x or more.
So.
My C++ is pretty rusty, but I figure I could probably make a .cpp for the format to wrap into OpenBabel.
The big question on my mind is, are there any license problems with either statically or dynamically linking the HDF5 library?
@Geoff Initial benchmarking on a 250x250x250 electron density CUBE of benzene is complete.
Performance appears favorable.
40% faster than gzip for 80% better compression @ fully lossless.
80% slower than bzip2, but still about 40% better compression at fully lossless.
I'll put together some isosurface plots (in Avo, of course :-) of these various compression levels, but based on earlier playing, I expect everything but the -t 1 isosurfaces to look basically identical.
So, if all one needs the CUBE for is plotting a single isosurface, that 180x compression factor should be representative.