OEShapeDatabasePrepΒΆ

bool OEShapeDatabasePrep(string filein, string fileout,
                         unsigned int cfftype = OEShape::OEColorFFType::OEDefault))

Prepares molecules stored in a OEFormat_OEB file to improve the performance of loading the molecules into an OEShapeDatabase object. This is a mutli-threaded implementation of the shapedatabaseprep example that takes the input OEB filename as the first argument and the output OEB filename as the second argument. An optional argument to specify the color force field type can be passed in. The default color force field is Implicit Mills Dean.

Using this function to prep a database will result in as much as 10-fold performance improvement of OEShapeDatabase.Open. OEShapeDatabasePrep does the following:

  • Pre-compresses the output file with OEPRECompress, alleviating the need to Gzip the OEB and improving the performance of OEMolDatabase.Open.
  • Sets the energy of each conformer to 0.0 to 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.

Note

OEShapeDatabasePrep will cache color atoms and self color terms for the OEColorFFType_ImplicitMillsDean color force field.

Warning

This function is non-deterministic so molecules will not appear in the same order as the input file.