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

Source Code for Module rdkit.Chem.Pharm2D.Gobbi_Pharm2D

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