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, 2008 OpenEye Scientific Software, Inc.
3 ******************************************************************************/
4 package openeye.examples.oezap;
5
6 import openeye.oechem.*;
7 import openeye.oezap.*;
8
9 public class CalcET {
10 public static void main(String argv[]) {
11 if (argv.length != 2) {
12 System.err.println("usage: CalcET <reference> <fitfile>");
13 System.exit(1);
14 }
15
16 OEGraphMol refmol = new OEGraphMol();
17 oemolistream ifs = new oemolistream();
18 if (!ifs.open(argv[0])) {
19 System.err.println("Unable to open for reading: " + argv[0]);
20 System.exit(1);
21 }
22 oechem.OEReadMolecule(ifs, refmol);
23 oechem.OEAssignBondiVdWRadii(refmol);
24 oechem.OEMMFFAtomTypes(refmol);
25 oechem.OEMMFF94PartialCharges(refmol);
26 ifs.close();
27
28 OEET et = new OEET();
29 et.SetRefMol(refmol);
30
31 System.err.println("dielectric: " + et.GetDielectric());
32 System.err.println("inner mask: " + et.GetInnerMask());
33 System.err.println("outer mask: " + et.GetOuterMask());
34 System.err.println("salt conc : " + et.GetSaltConcentration());
35 System.err.println("join : " + et.GetJoin());
36
37 OEGraphMol fitmol = new OEGraphMol();
38 if (!ifs.open(argv[1])) {
39 System.err.println("Unable to open for reading: " + argv[1]);
40 System.exit(1);
41 }
42 while (oechem.OEReadMolecule(ifs, fitmol)) {
43 oechem.OEAssignBondiVdWRadii(fitmol);
44 oechem.OEMMFFAtomTypes(fitmol);
45 oechem.OEMMFF94PartialCharges(fitmol);
46 System.err.println("Title: " + fitmol.GetTitle() + " ET "
47 + et.Tanimoto(fitmol));
48 }
49 ifs.close();
50 }
51 }