File: __init__.py

package info (click to toggle)
rdkit 202009.4-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 129,624 kB
  • sloc: cpp: 288,030; python: 75,571; java: 6,999; ansic: 5,481; sql: 1,968; yacc: 1,842; lex: 1,254; makefile: 572; javascript: 461; xml: 229; fortran: 183; sh: 134; cs: 93
file content (23 lines) | stat: -rw-r--r-- 888 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#
# Copyright (C) 2002-2009 greg Landrum and Rational Discovery LLC
#
""" module with functionality for 2D pharmacophores

"""


def DefaultSigFactory(fdefFile=None, minPointCount=2, maxPointCount=3,
                      bins=[(2, 3), (3, 4), (4, 5), (5, 6), (6, 7), (7, 8), (8, 100)]):
  from rdkit.Chem.Pharm2D import SigFactory
  from rdkit.Chem import ChemicalFeatures
  if fdefFile is None:
    from rdkit import RDConfig
    import os.path
    fdefFile = os.path.join(RDConfig.RDDataDir, 'BaseFeatures.fdef')
  featFactory = ChemicalFeatures.BuildFeatureFactory(fdefFile, )
  factory = SigFactory.SigFactory(featFactory, skipFeats=('ZnBinder', 'LumpedHydrophobe'),
                                  minPointCount=minPointCount, maxPointCount=maxPointCount,
                                  trianglePruneBins=False)
  factory.SetBins(tuple(bins))
  factory.Init()
  return factory