Package CHEM :: Package CombiCDB :: Module SynthesisUtil :: Class BaseReactantPool
[hide private]
[frames] | no frames]

Class BaseReactantPool



Base class defining what a reactant pool must do to satisfy the needs of the RetroSynthesis class.

Instance Methods [hide private]
 
search(self, queryMol, resultsLimit)
Given a query molecule object, return the top scored / similar results out of the reactant pool, up to resultsLimit items.
 
__contains__(self, queryMol)
Do an exact search / lookup.
Method Details [hide private]

search(self, queryMol, resultsLimit)

 
Given a query molecule object, return the top scored / similar results out of the reactant pool, up to resultsLimit items. The results should be 2-ples each consisting of a result molecule object and the similarity score.

__contains__(self, queryMol)
(In operator)

 
Do an exact search / lookup. Return true if and only if the queryMol is found within the reactant pool. Don't just take the first result from the "search" method, because it turns out multiple results may yield 1.0 similarity, even if they're not quite exactly what you were looking for.