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

Class XLogPAnnotator



BaseAnnotator.BaseAnnotator --+    
                              |    
  BaseAnnotator.SingleAnnotator --+
                                  |
                                 XLogPAnnotator

Estimate the chemical's logP octanol / water partition coefficient based on the xLogP program.

http://www.ics.uci.edu/~dock/manuals/xlogp2.1/
>>> annotator = XLogPAnnotator();
>>> print "%.2f" % callBySmiles( annotator, "C1OC(C)NCO1")[0]; 
0.11
>>> print "%.2f" % callBySmiles( annotator, "C1OCNCO1")[0]; 
-0.35
>>> print "%.2f" % callBySmiles( annotator, "C1O[C@H](C)NCO1")[0]; 
0.11
>>> print "%.2f" % callBySmiles( annotator, "COCN(C)C")[0]; 
0.01
>>> print "%.2f" % callBySmiles( annotator, "OC(C)N")[0]; 
-0.68
>>> print "%.2f" % callBySmiles( annotator, "OC=C")[0]; 
0.50
>>> print "%.2f" % callBySmiles( annotator, "c1ccccc1O")[0]; 
1.62
>>> print "%.2f" % callBySmiles( annotator, "c1ccccc1c2ccccc2")[0]; 
3.96


Instance Methods [hide private]
 
__init__(self)
Constructor.
 
__del__(self)
Destructor.
 
allColumns(self)
Return an ordered sequence of all the column names that this multiple annotator can generate values for.
 
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)
(Constructor)

 
Constructor. Get a handle on a temp file to save mol2 format that xLogP expects.
Overrides: BaseAnnotator.SingleAnnotator.__init__

__del__(self)
(Destructor)

 
Destructor. Delete any temp files that were created. This is the right way to do it, but may not work and cause warning messages in unit tests because the os module itself seems to get destructed before this destructor is called.

allColumns(self)

 

Return an ordered sequence of all the column names that this multiple annotator can generate values for.

To facilitate ease of filtering with case-insensitivity, all of the values returned by this method should be lowercase.
Overrides: BaseAnnotator.BaseAnnotator.allColumns
(inherited documentation)

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)