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 an OEShapeDatabase
object from an
OEFormat.OEB file. The following
steps are taken to improve the performance of
OEShapeDatabase.Open by as much as 10-fold:
Sets the energy of each conformer to
0.0to avoid writing it to OEB.
Suppresses hydrogens and reorders reference conformers for compression.
Pre-calculates color atoms.
Pre-calculates self-color and self-shape terms for all conformers.
It is recommended to call
the oemolostream before writing out to
OEB. This will store conformers in “PRE-compressed” form
therefore alleviating the need to Gzip the
OEB file and
consequently improving the performance of
In general, calling
OEPRECompress will result in a smaller
file than the default
OEB.GZ output from OMEGA.
OEB file size is of chief concern a further reduction in
file size can be achieved by using an
OEMCMolType.HalfFloatCartesian molecule, which
stores reference coordinates and torsions in half floating
point precision (16-bit). The following code snippet demonstrates
how to cast the resultant molecule from
to use half precision:
OEPrepareFastROCSMol(mol); OEMol halfMol(mol, OEMCMolType::HalfFloatCartesian); OEWriteMolecule(ofs, halfMol);
OEPrepareFastROCSMol(mol) halfMol = OEMol(mol, OEMCMolType_HalfFloatCartesian) OEWriteMolecule(ofs, halfMol)
16-bit floating point will give a file size saving of approximately 12% with a tradeoff of about 7% more performance when loading the OEB from disk into memory.
cache color atoms and self color terms for the
force field. The second overload that takes a
OEColorForceField can be used to override