class OEBestOverlay
This class is used to optimize the overlap between 2 molecules. Both
molecules can contain one or more conformers. The reference molecule
is held rigid and the fit molecule orientation is calculated to
maximize overlap. Each conformer of the fit molecule is optimized
against each conformer of the reference molecule, resulting in a large
number of results that can be returned. The
OEBestOverlayResults and OEBestOverlayScore classes are
used to make handling this large amount of results easier.
Additionally, the reference or fit shape can be a grid instead of a molecule.
OEBestOverlay() OEBestOverlay(const OEBestOverlay &) OEBestOverlay(const OEChem::OEMCMolBase &refmol) OEBestOverlay(const OESystem::OEScalarGrid &refgrid, float interpolate=0.5f)
An empty OEBestOverlay class instance can be created, or a new instance can take the reference molecule or grid as an argument. Note that by default, grids that have a resolution larger that 0.5Åwill be interpolated to that resolution.
OEBestOverlay &operator=(const OEBestOverlay &)
Assignment operator. The contents of the passed OEBestOverlay reference are copied into an OEBestOverlay instance.
void ClearColorForceField()
Clear out any color force field. No color scores will be calculated.
bool GetAllColor() const
float GetCarbonRadius() const
Return the current value for the carbon radius approximation.
unsigned int GetInertialAxialDivisions() const
unsigned int GetInitialOrientation() const
Get the current value for initial orientation. Possible values are from the OEBOOrientation namespace (section 9.2).
float GetMaxRandomTranslation() const
Get the value in Åof maximum random translation.
unsigned int GetMethod() const
Return the current value of overlap method.
unsigned int GetMinimizeType() const
Get the current value for minimize type. Possible values are from the OEBOMinType namespace (section 9.1).
unsigned int GetNumRandomStarts() const
Get the current number of random starts.
unsigned int GetRadiiApproximation() const
Return the current value of the radii approximation.
unsigned int GetRandomSeed() const
Get the current value of the random seed.
const OESystem::OEScalarGrid *GetRefGrid() const
const OEChem::OEMCMolBase *GetRefMol() const
float GetRefSelfColor()
Return the self color score of the reference molecule.
unsigned int GetRefSymmetry(unsigned int confIdx) const
unsigned int GetRepresentationLevel() const
Return the current representation level.
float GetSymmetryThreshold() const
bool GetUseHydrogens() const
Return the status of hydrogen use in OEBestOverlay.
OESystem::OEIterBase< OEBestOverlayResults >* Overlay(const OEChem::OEMCMolBase &fitmol) OESystem::OEIterBase< OEBestOverlayResults >* Overlay(const OESystem::OEScalarGrid &fitgrid)
Perform the calculation and return the an iterator of the results.
void SetAllColor(bool state)
void SetCarbonRadius(float cradius)
Set the radius to use when using OEOverlapRadii::Carbon. By default this is set to 1.7Å.
Set the color force field to be used. Once set, color scores will be calculated
and included in the results. Color gradients will not be included in the
optimization unless specifically set using SetColorOptimize(true)
bool SetColorForceField(const OEColorForceField &cff)
Set using an existing instance of OEColorForceField. This should already have types and interactions set up.
bool SetColorForceField(unsigned int type)
Set using one of the built-in color force fields as defined in the
OEColorFFType namespace (section 9.3).
bool SetColorForceField(OEPlatform::oeistream &is) bool SetColorForceField(const std::string &filename)
Read in a color force field from an input stream or from a given filename.
void SetColorOptimize(bool state)
Add color gradients to shape gradients in the optimization. Has no effect unless
a color force field is also set via SetColorForceField.
void SetInertialAxialDivisions(unsigned int divisions)
void SetInitialOrientation(unsigned int orient)
Determines the initial orientation (starting position) for each optimization. The default is OEBOOrientation::Inertial. Alternatives are defined in the OEBOOrientation namespace (section 9.2).
void SetMaxRandomTranslation(float trans)
If using random starts, this set the maximum distance (in Å) that the center of mass of the fit molecule will be moved away from the center calculated for inertial frame alignment.
void SetMethod(unsigned int method)
Set the method used to calculate overlap. The default for OEBestOverlay is OEOverlapMethod::Grid. Alternatives are defined in the OEOverlapMethod namespace (section 9.4
void SetMinimizeType(unsigned int type)
Set the score to use in the optimization. Options are in the OEBOMinType namespace (section 9.1).
void SetNumRandomStarts(unsigned int n)
If SetInitialOrientation is set to OEBOOrientation::Random, this method sets the number of random starting positions that will be used.
void SetRadiiApproximation(unsigned int type)
Set the radius approximation used to calculate overlap. The default for OEBestOverlay is OEOverlapRadii::Carbon. Alternatives are defined in the OEOverlapRadii namespace (section 9.5
void SetRandomSeed(unsigned int seed)
Set a random seed value to allow reproducible random searches.
bool SetRefGrid(const OESystem::OEScalarGrid &refgrid, float interpolate=0.5f)
Set a reference grid for the calculation. OEBestOverlay makes an internal copy. Pre-existing reference molecules or grids are replaced.
bool SetRefMol(const OEChem::OEMCMolBase &refmol)
Set a reference molecule for the calculation. OEBestOverlay makes an internal copy. Pre-existing reference molecules or grids are replaced.
void SetRepresentationLevel(unsigned int type)
Set the representation level for the gaussians in OEBestOverlay. The default is OEOverlapRepresentation::Atomic. Alternatives are defined in the OEOverlapRepresentation namespace (section 9.6).
void SetSymmetryThreshold(float threshold)
void SetUseHydrogens(bool state)
Boolean to determine whether hydrogens are included in the shape calculation. By default this is false and hydrogens are ignored.