Chem.Pharm2D.LazyGenerator.Generator

Package Chem :: Package Pharm2D :: Module LazyGenerator :: Class Generator |
[hide private]
[frames] | no frames]

# Class Generator

source code

    object --+
             |
            Generator

    Important attributes:

     - mol: the molecules whose signature is being worked with

     - sig: the signature to be used to decide what bits are set in the
       molecule.  This signature can be considered to be constant in
       this class, none of the class methods modify sig

Instance Methods | [hide private]
__init__(self, sig, mol, dMat=None, bitCache=1) constructor **Arguments** - sig: a signature, see class docs - mol: a molecule, see class docs - dMat: (optional) a distance matrix for the molecule. | source code
GetBit(self, idx) returns a bool indicating whether or not the bit is set... | source code
__len__(self) allows class to support len()... | source code
__getitem__(self, itm) allows class to support random access. | source code
Inherited from `object`: `__delattr__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__str__`

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

Method Details | [hide private]

### __init__(self, sig, mol, dMat=None, bitCache=1) (Constructor) | source code
    constructor

    **Arguments**

     - sig: a signature, see class docs

     - mol: a molecule, see class docs

     - dMat: (optional) a distance matrix for the molecule.  If this
       is not provided, one will be calculated

     - bitCache: (optional) if nonzero, a local cache of which bits
       have been queried will be maintained.  Otherwise things must
       be recalculate each time a bit is queried.
Overrides: object.__init__

### GetBit(self, idx) | source code
    returns a bool indicating whether or not the bit is set

### __len__(self) (Length operator) | source code
    allows class to support len()

### __getitem__(self, itm) (Indexing operator) | source code
    allows class to support random access.
    Calls self.GetBit()