Using a Custom Color ForceField in FastROCS¶
Similar to the Shape Toolkit, a custom color forcefield can be used to compare color features beyond those captured with the default forcefield. To use a custom color forcefield, specify your forcefield during the initialization of your OEShapeDatabase OEShapeDatabase
Custom color forcefields in FastROCS are constructed the same way they are in the OEColorForceField class in the OEShape TK but are restricted to the following:
Interactions can only be between atoms of the same type
Interactions can only be favorable
Interactions can only be of type “gaussian”
user defined types are not permitted
in the following code example:
OEShape::OEColorForceField cff;
cff.Init(OEShape::OEColorFFType::ImplicitMillsDeanNoRings);
cff.ClearInteractions();
//add custom interactions
cff.AddInteraction(
cff.GetType("donor"), cff.GetType("donor"), "gaussian", -1.0, 2.0
);
cff.AddInteraction(
cff.GetType("acceptor"), cff.GetType("acceptor"), "gaussian", -1.0, 2.0
);
OEShapeDatabase dbase(cff);
a color forcefield is created that will only count interactions between pairs of acceptors and pairs of donors. The -1.0 indicates a favorable interaction, with standard weighting. 2.0 is the range of the color interaction in space.
See also
OEColorForceField class in the OEShape TK