Electrostatic similarity may be calculated using the OEET class. The following example program shows how to obtain the electrostatic Tanimoto between a reference molecule and a trial molecule. The electrostatic Tanimoto is affected by the partitial charges of the molecules as well as the three-dimensional structure, including the tautomer state, spacial orientation, and conformation. In the example program shown below, MMFF charges are assigned to the molecules, but it is assumed that they have already been spatially aligned.
1 /*******************************************************************
2 Copyright (C) 2006,2007, 2008 OpenEye Scientific Software, Inc.
3 *******************************************************************/
4 #include "openeye.h"
5
6 #include "oezap.h"
7 #include "oechem.h"
8 #include "oesystem.h"
9 #include "oeplatform.h"
10
11 using namespace OEPB;
12 using namespace OEChem;
13 using namespace OESystem;
14 using namespace OEPlatform;
15
16 int main(int argc, char *argv[])
17 {
18 if (argc!=3)
19 OEThrow.Usage("%s <reffile> <fitfile>", argv[0]);
20
21 OEGraphMol refmol, fitmol;
22
23 oemolistream ifs;
24 if (!ifs.open(argv[1]))
25 OEThrow.Fatal("Could not open %s for reading", argv[1]);
26 OEReadMolecule(ifs,refmol);
27
28 OEMMFFAtomTypes(refmol);
29 OEMMFF94PartialCharges(refmol);
30 OEAssignBondiVdWRadii(refmol);
31
32 OEET et;
33 et.SetRefMol(refmol);
34
35 float tanimoto;
36
37 if (!ifs.open(argv[2]))
38 OEThrow.Fatal("Could not open %s for reading", argv[2]);
39
40 while (OEReadMolecule(ifs, fitmol))
41 {
42 OEMMFFAtomTypes(fitmol);
43 OEMMFF94PartialCharges(fitmol);
44 OEAssignBondiVdWRadii(fitmol);
45
46 tanimoto=et.Tanimoto(fitmol);
47 OEThrow.Info("Title: %s, ET %4.2f", fitmol.GetTitle(), tanimoto);
48 }
49
50 return 0;
51 }