rdkit.Chem.Pharm2D.Gobbi_Pharm2D

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