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 multi-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 theOEB
and improving the performance ofOEMolDatabase::Open
.Sets the energy of each conformer to
0.0
to avoid writing it toOEB
.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.
Warning
This function should not be used to prepare a database intended to be
used with a OEShapeDatabaseType::Sitehopper
database