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:

  1. Interactions can only be between atoms of the same type

  2. Interactions can only be favorable

  3. Interactions can only be of type “gaussian”

  4. user defined types are not permitted

in the following code example:

        OEColorForceField cff = new OEColorForceField();
        cff.Init(OEColorFFType.ImplicitMillsDeanNoRings);
        cff.ClearInteractions();
        int donorType = cff.GetType("donor");
        int accepType = cff.GetType("acceptor");
        cff.AddInteraction(donorType, donorType, "gaussian", -1.0f, 1.0f);
        cff.AddInteraction(accepType, accepType, "gaussian", -1.0f, 1.0f);
        OEShapeDatabase dbase = new OEShapeDatabase(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