Package rdkit :: Package Chem :: Package Pharm2D :: Module Gobbi_Pharm2D
[hide private]
[frames] | no frames]

Source Code for Module rdkit.Chem.Pharm2D.Gobbi_Pharm2D

 1  # 
 2  #  Copyright (C) 2003-2008 Greg Landrum and Rational Discovery LLC 
 3  # 
 4  #   @@ All Rights Reserved @@ 
 5  #  This file is part of the RDKit. 
 6  #  The contents are covered by the terms of the BSD license 
 7  #  which is included in the file license.txt, found at the root 
 8  #  of the RDKit source tree. 
 9  # 
10  """ Definitions for 2D Pharmacophores from: 
11    Gobbi and Poppinger, Biotech. Bioeng. _61_ 47-54 (1998) 
12   
13  """ 
14  from rdkit.Chem import ChemicalFeatures 
15  from rdkit.Chem.Pharm2D.SigFactory import SigFactory 
16   
17  fdef = """ 
18  DefineFeature Hydrophobic [$([C;H2,H1](!=*)[C;H2,H1][C;H2,H1][$([C;H1,H2,H3]);!$(C=*)]),$(C([C;H2,H3])([C;H2,H3])[C;H2,H3])] 
19    Family LH 
20    Weights 1.0 
21  EndFeature 
22  DefineFeature Donor [$([N;!H0;v3]),$([N;!H0;+1;v4]),$([O,S;H1;+0]),$([n;H1;+0])] 
23    Family HD 
24    Weights 1.0 
25  EndFeature 
26  DefineFeature Acceptor [$([O,S;H1;v2]-[!$(*=[O,N,P,S])]),$([O,S;H0;v2]),$([O,S;-]),$([N&v3;H1,H2]-[!$(*=[O,N,P,S])]),$([N;v3;H0]),$([n,o,s;+0]),F] 
27    Family HA 
28    Weights 1.0 
29  EndFeature 
30  DefineFeature AromaticAttachment [$([a;D3](@*)(@*)*)] 
31    Family AR 
32    Weights 1.0 
33  EndFeature 
34  DefineFeature AliphaticAttachment [$([A;D3](@*)(@*)*)] 
35    Family RR 
36    Weights 1.0 
37  EndFeature 
38  DefineFeature UnusualAtom [!#1;!#6;!#7;!#8;!#9;!#16;!#17;!#35;!#53] 
39    Family X 
40    Weights 1.0 
41  EndFeature 
42  DefineFeature BasicGroup [$([N;H2&+0][$([C,a]);!$([C,a](=O))]),$([N;H1&+0]([$([C,a]);!$([C,a](=O))])[$([C,a]);!$([C,a](=O))]),$([N;H0&+0]([C;!$(C(=O))])([C;!$(C(=O))])[C;!$(C(=O))]),$([N,n;X2;+0])] 
43    Family BG 
44    Weights 1.0 
45  EndFeature 
46  DefineFeature AcidicGroup [$([C,S](=[O,S,P])-[O;H1])] 
47    Family AG 
48    Weights 1.0 
49  EndFeature 
50  """ 
51  defaultBins = [(2, 3), (3, 4), (4, 5), (5, 6), (6, 7), (7, 8), (8, 100)] 
52   
53   
54 -def _init():
55 global labels, patts, factory 56 featFactory = ChemicalFeatures.BuildFeatureFactoryFromString(fdef) 57 factory = SigFactory(featFactory, minPointCount=2, maxPointCount=3) 58 factory.SetBins(defaultBins) 59 factory.Init()
60 61 62 _init() 63