Package CHEM :: Package Annotation :: Module ChemicalAnnotators :: Class FingerprintAnnotator
[hide private]
[frames] | no frames]

Class FingerprintAnnotator



BaseAnnotator.BaseAnnotator --+    
                              |    
  BaseAnnotator.SingleAnnotator --+
                                  |
                                 FingerprintAnnotator

Calculate the fingerprint string for a molecule. Instantiate with the appropriate construction options. Must specify the column name to match to since this would differ depending on the construction options.

Given an OEMolBase input object, construct the respective fingerprint object and return the string representation.
>>> from openeye.oechem import OEGraphMol, OEParseSmiles
>>> from CHEM.Common.Util import generateFingerprint
>>> mol = OEGraphMol();
>>> OEParseSmiles(mol,"c1ccccc1O");
1
>>> annotator = FingerprintAnnotator();
>>> print annotator(mol);
1024.-------1-3-------3------7------1---1--------0-----------f---------------------------------------------------0-----------------------7-----------7-------------f--3---------
>>> annotator = FingerprintAnnotator(fpSize=512);
>>> print annotator(mol);
512.-------1-3-------3----f-7------1---1--------0--1--------f--1-------------3--0---------


Instance Methods [hide private]
 
__init__(self, colName=FP_COLUMN, fpMax=FP_MAX, fpMin=FP_MIN, fpSize=FP_SIZE)
Initialization constructor
 
allColumns(self)
Just return the column name that this annotator is meant to populate
 
allValues(self, input)
Return an ordered sequence of all the values this multiple annotator can calculate off of the input.

Inherited from BaseAnnotator.SingleAnnotator: __call__, columnName

Inherited from BaseAnnotator.BaseAnnotator: annotateDict, iteritems, iterkeys, itervalues, keys, specifyColumns, values

Class Variables [hide private]

Inherited from BaseAnnotator.BaseAnnotator: specificCols

Method Details [hide private]

__init__(self, colName=FP_COLUMN, fpMax=FP_MAX, fpMin=FP_MIN, fpSize=FP_SIZE)
(Constructor)

 
Initialization constructor
Overrides: BaseAnnotator.SingleAnnotator.__init__

allColumns(self)

 
Just return the column name that this annotator is meant to populate
>>> annotator = FingerprintAnnotator();
>>> print annotator.columnName();
fingerprint_1
>>> annotator = FingerprintAnnotator("anotherColumn");
>>> print annotator.columnName();
anotherColumn
Overrides: BaseAnnotator.BaseAnnotator.allColumns

allValues(self, input)

 
Return an ordered sequence of all the values this multiple annotator can calculate off of the input. The order must correspond to the column list returned by allColumns so the caller can know which element is which.
Overrides: BaseAnnotator.BaseAnnotator.allValues
(inherited documentation)