rdkit.Chem.Pharm2D

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

# Source Code for Package rdkit.Chem.Pharm2D

     1  #
     2  # Copyright (C) 2002-2009 greg Landrum and Rational Discovery LLC
     3  #
     4  """ module with functionality for 2D pharmacophores
     5
     6  """
     7
     8
     9 -def DefaultSigFactory(fdefFile=None, minPointCount=2, maxPointCount=3,
    10                        bins=[(2, 3), (3, 4), (4, 5), (5, 6), (6, 7), (7, 8), (8, 100)]):
    11    from rdkit.Chem.Pharm2D import SigFactory
    12    from rdkit.Chem import ChemicalFeatures
    13    if fdefFile is None:
    14      from rdkit import RDConfig
    15      import os.path
    16      fdefFile = os.path.join(RDConfig.RDDataDir, 'BaseFeatures.fdef')
    17    featFactory = ChemicalFeatures.BuildFeatureFactory(fdefFile, )
    18    factory = SigFactory.SigFactory(featFactory, skipFeats=('ZnBinder', 'LumpedHydrophobe'),
    19                                    minPointCount=minPointCount, maxPointCount=maxPointCount,
    20                                    trianglePruneBins=False)
    21    factory.SetBins(tuple(bins))
    22    factory.Init()
    23    return factory
    24