bool OEPrepareFastROCSMol(OEChem::OEMCMolBase &mol) bool OEPrepareFastROCSMol(OEChem::OEMCMolBase &mol, const OEShape::OEColorForceField &cff)
Prepares the molecule mol to improve the performance of loading the molecule into memory as a OEShapeDatabase object from a OEFormat_OEB file. The following steps are taken to improve the performance of OEShapeDatabase.Open by as much as 10-fold:
It is also recommended to call OEPRECompress on the oemolostream before writing out to OEB. This will cause conformers to be stored in “PRE-compressed” form. This alleviates the need to Gzip the OEB file as well as it is also recommended to store the molecule in uncompressed form to improve the performance of OEMolDatabase.Open. In general, calling OEPrepareFastROCSMol and OEPRECompress will result in a smaller OEB file than the default OEB.GZ output from OMEGA.
If OEB file-size is the chief concern, a further reduction in file-size can be achieved by using a OEMCMolType_HalfFloatCartesian molecule to store reference coordinates and torsions as 16-bit floating point. To do this, make a copy of the output molecule from OEPrepareFastROCSMol like the following:
OEPrepareFastROCSMol(mol); OEMol halfMol(mol, OEMCMolType::HalfFloatCartesian); OEWriteMolecule(ofs, mol);
OEPrepareFastROCSMol(mol) halfMol = OEMol(mol, OEMCMolType_HalfFloatCartesian) OEWriteMolecule(ofs, mol)
Currently, 16-bit floating point has been measured to have a %12 file size savings while only costing about %7 more performance when loading the OEB from disk into memory.