Two color force fields, ImplicitMillsDean and ExplicitMillsDean, are built into the Shape toolkit. (The OEColorForceField class is defined in the next section.) Both of these force fields define similar 6 TYPE color force-fields. The types are hydrogen-bond donors, hydrogen-bond acceptors, hydrophobes, anions, cations, and rings. The ImplicitMillsDean force field is recommended.
ImplicitMillsDean includes a simple pKa model that assumes pH=7. It defines cations, anions, donors and acceptors in such a way that they will be assigned the appropriate value independent of the protonation state in the reference or fit molecule. For example, if a molecule contains a carboxylate, ImplicitMillsDean will consider it an anionic center independent of whether it is protonated or deprotonated. This is convenient for searching databases which have not had careful curation of their protonation states. The ExplicitMillsDean file has a similar overall interaction model, however, it does not include a pKa model. It interprets the protonation and charge state of each molecule exactly. Thus, if a sulfate is protonated and neutral, it will not be considered an anion.
The hydrogen-bond models in both ImplicitMillsDean and ExplicitMillsDean are extensions of the original model presented by Mills and Dean(1). They both have donors and acceptors segregated into strong, moderate and weak categories.
This next example uses the ImplicitMillsDean force field to rescore a set of ROCS hits and add the color scores to SD tags.
1 #!/usr/bin/env python
2 # Copyright (C) 2005,2006 OpenEye Scientific Software, Inc.
3 import os, sys
4 from openeye.oechem import *
5 from openeye.oeshape import *
6
7 if len(sys.argv)!=4:
8 OEThrow.Usage("colorscore.py <reffile> <rocs_hits_file> <output.sdf>")
9
10 reffs = oemolistream(sys.argv[1])
11 fitfs = oemolistream(sys.argv[2])
12 outfs = oemolostream(sys.argv[3])
13
14 refmol=OEGraphMol()
15 OEReadMolecule(reffs, refmol)
16
17 ov=OEColorOverlap()
18 ov.SetColorForceField(OEColorFFType_ImplicitMillsDean)
19 ov.SetRefMol(refmol)
20
21 print "Ref. Title:", refmol.GetTitle()
22 print "Self color:", ov.GetSelfColor()
23
24 res = OEColorResults()
25 fitmol = OEGraphMol()
26 while OEReadMolecule(fitfs, fitmol):
27 ov.ColorScore(fitmol, res)
28 OESetSDData(fitmol, "MyColorScore", "%.2f"%res.colorscore)
29 OESetSDData(fitmol, "MyScaledColor", "%.2f"%res.scaledcolor)
30 OEWriteMolecule(outfs, fitmol)
31
32 print "Fit Title:", fitmol.GetTitle(),
33 print "Color Score: %.2f"%res.colorscore,
34 print "Scaled Color: %.2f"%res.scaledcolor
35