abhimanyusirohi / ThumbFish

A simple utility for Chemists that integrates with Windows Explorer and provides Thumbnail, Preview, Search and other useful features for structure files.
abhimanyusirohi.github.io/ThumbFish
MIT License
14 stars 3 forks source link

Add approximate record count to thumbnails for multi-mol files #59

Closed abhimanyusirohi closed 10 years ago

abhimanyusirohi commented 10 years ago

An approximate record count can be added at the center of thumbnails for multi-mol files SDF, RDF and CML. The approximation can be done by getting the byte size of first 4 records (which we are already reading) and dividing the total size of file with the average size per molecule calculated using first 4 molecules. Usually multi-mol files will contain molecules of similar type (and possibly similar size) so this approximation should work.

SDF File Size = 100 KB Size of first 4 molecules = 8KB => 2KB per molecule Approx Count = 100/2 = 50 molecules

abhimanyusirohi commented 10 years ago

reccountapprox