rdkit.Chem.Pharm2D.Signature.Pharm2DSig

Package rdkit :: Package Chem :: Package Pharm2D :: Module Signature :: Class Pharm2DSig |
[hide private]
[frames] | no frames]

# Class Pharm2DSig

    object --+
             |
            Pharm2DSig

    **Notes on Use**

      - After any changes, the Init() method should be called

    **Important Attributes**

     - patterns: a list of SmartsPatterns used to determine the features
        patterns can be initialized directly from the list or from a list of SMARTS
        strings

     - bins: the list of distance bins to be used.

     - minCount/maxCount: the minimum/maximum number of points to be included
        in a pharmacophore

     - shortestPathsOnly: toggles limiting the path-discovery algorithms to
        only find the shortest paths between 2 features.

     - includeBondOrder: toggles inclusion of bond order in consideration of
        shortest paths.

    **Limitations of Current Implementation**

     - All distances have the same numbers of bins

     - Only shortest-path matches are implemented

Instance Methods | [hide private]
GetBin(self, which) |
GetBit(self, patts, dists, checkPatts=1) returns the value of a |
GetBitDescription(self, bitIdx, includeBins=0, fullPage=1) returns HTML with a description of the bit |
GetBitIdx(self, patts, dists, checkPatts=1) returns the index for a pharmacophore described using a set of patterns and distances |
GetBitInfo(self, idx) returns information about the given bit |
GetIncludeBondOrder(self) |
GetLabel(self, which) |
GetMaxCount(self) |
GetMaxDist(self) |
GetMinCount(self) |
GetMinDist(self) |
GetNumBins(self) |
GetNumPatterns(self) |
GetOnBits(self) returns our on bits |
GetPattern(self, which) |
GetShortestPathsOnly(self) |
GetSize(self) |
Init(self, createBitVect=1) Initializes internal parameters. |
SetBins(self, bins) bins should be a list of 2-tuples |
SetBit(self, patts, dists, checkPatts=1) sets the bit defined by a collection of patterns and distances |
SetIncludeBondOrder(self, val) |
SetLabels(self, labels) |
SetMaxCount(self, max) |
SetMinCount(self, min) |
SetPatterns(self, patts) |
SetPatternsFromSmarts(self, smarts) |
SetShortestPathsOnly(self, val) |
__getitem__(self, idx) |
__getstate__(self) used by the pickling machinery |
__init__(self, patts=None, bins=None, labels=None, minCnt=2, maxCnt=4, shortestPathsOnly=1, includeBondOrder=0) x.__init__(...) initializes x; see x.__class__.__doc__ for signature |
__len__(self) |
__setstate__(self, state) used by the pickling machinery |
_findBinIdx(self, dists, bins, scaffolds) OBSOLETE: this has been rewritten in C++ Internal use only Returns the index of a bin defined by a set of distances. |
_initLocals(self) Internal use only |
Inherited from `object`: `__delattr__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__str__`

Properties | [hide private]
Inherited from `object`: `__class__`

Method Details | [hide private]

### GetBit(self, patts, dists, checkPatts=1) |
    returns the value of a

    **Arguments***

      - patts: a sequence of pattern indices

      - dists: a sequence of distance between the patterns, only the
        unique distances should be included, and they should be in the
        order defined in Utils.

      - checkPatts: (optional) if nonzero, the pattern vector is
        checked to ensure it is sorted

    **Returns**

       whether or not the bit is set

### GetBitDescription(self, bitIdx, includeBins=0, fullPage=1) |
    returns HTML with a description of the bit

    **Arguments**

      - bitIdx: an integer bit index

      - includeBins: (optional) if nonzero, information about the bins will be
        included as well

      - fullPage: (optional) if nonzero, html headers and footers will
        be included (so as to make the output a complete page)

    **Returns**

      a string with the HTML

### GetBitIdx(self, patts, dists, checkPatts=1) |
    returns the index for a pharmacophore described using a set of
      patterns and distances

    **Arguments***

      - patts: a sequence of pattern indices

      - dists: a sequence of distance between the patterns, only the
        unique distances should be included, and they should be in the
        order defined in Utils.

      - checkPatts: (optional) if nonzero, the pattern vector is
        checked to ensure it is sorted

    **Returns**

      the integer bit index

### GetBitInfo(self, idx) |
    returns information about the given bit

    **Arguments**

      - idx: the bit index to be considered

    **Returns**

      a 3-tuple:

        1) the number of points in the pharmacophore

        2) the proto-pharmacophore (tuple of pattern indices)

        3) the scaffold (tuple of distance indices)

### Init(self, createBitVect=1) |
    Initializes internal parameters.  This **must** be called after
      making any changes to the signature

    **Arguments**

      - createBitVect: (optional) if this is nonzero, the bit vector
        used to store the on bits will be allocated.  Otherwise the
        existing bit vect will be reused (it better be big enough)

### SetBit(self, patts, dists, checkPatts=1) |
    sets the bit defined by a collection of patterns and distances

    **Arguments***

      - patts: a sequence of pattern indices

      - dists: a sequence of distance between the patterns, only the
        unique distances should be included, and they should be in the
        order defined in Utils.

      - checkPatts: (optional) if nonzero, the pattern vector is
        checked to ensure it is sorted

    **Returns**

      the original status of the bit (whether or not it was set)

### __init__(self, patts=None, bins=None, labels=None, minCnt=2, maxCnt=4, shortestPathsOnly=1, includeBondOrder=0) (Constructor) |
    x.__init__(...) initializes x; see x.__class__.__doc__ for signature
Overrides: object.__init__ (inherited documentation)

### _findBinIdx(self, dists, bins, scaffolds) |
    OBSOLETE: this has been rewritten in C++
    Internal use only
     Returns the index of a bin defined by a set of distances.

    **Arguments**

      - dists: a sequence of distances (not binned)

      - bins: a sorted sequence of distance bins (2-tuples)

      - scaffolds: a list of possible scaffolds (bin combinations)

    **Returns**

      an integer bin index

    **Note**

      the value returned here is not an index in the overall
      signature.  It is, rather, an offset of a scaffold in the
      possible combinations of distance bins for a given
      proto-pharmacophore.