Package CHEM :: Package Annotation :: Module ReactionAnnotators :: Class ReactionSmilesAnnotator
[hide private]
[frames] | no frames]

Class ReactionSmilesAnnotator



BaseAnnotator.BaseAnnotator --+    
                              |    
  BaseAnnotator.SingleAnnotator --+
                                  |
                                 ReactionSmilesAnnotator

Generate a canonical SMILES representation of the reaction represented in the OEMolBase. Almost as simple as just calling OECreateIsoSmiString, except that does not canonize any atom-mapping numbers.

Note that this will actually modify the original input reaction molecule into "canonical." This could actually be a good thing to be done before any other functions, but be aware in case you don't want changes to occur.
>>> annotator = ReactionSmilesAnnotator();
>>> print callBySmiles( annotator, "[C@:1]([*:20])([*:21])([*:22])[O:2].[Br:5][P:6]([Br:7])[Br:8]>>[C@@:1]([*:20])([*:21])([*:22])[Br:8].[Br:5][P:6]([Br:7])[O:2]")[0];
c1ccc(cc1)O
>>> print callBySmiles( annotator, "[Br:5][P:6]([Br:7])[Br:8].[C@:1]([*:20])([*:21])([*:22])[O:2]>>[C@@:1]([*:20])([*:21])([*:22])[Br:8].[Br:5][P:6]([Br:7])[O:2]")[0];
c1ccncc1
>>> print callBySmiles( annotator, "[Br:5][P:6]([Br:7])[Br:8].[C@:1]([*:30])([*:31])([*:32])[O:2]>>[C@@:1]([*:30])([*:31])([*:32])[Br:8].[Br:5][P:6]([Br:7])[O:2]")[0];
CCO


Instance Methods [hide private]
 
allColumns(self)
Return an ordered sequence of all the column names that this multiple annotator can generate values for.
 
values(self, input)
Return an ordered sequence of the values this multiple annotator will calculate off of the input.

Inherited from BaseAnnotator.SingleAnnotator: __call__, __init__, columnName

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

Class Variables [hide private]
  reactionCanonizer = <CHEM.DB.rdb.search.NameRxnPatternMatching...

Inherited from BaseAnnotator.BaseAnnotator: specificCols

Method Details [hide private]

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)

values(self, input)

 
Return an ordered sequence of the values this multiple annotator will calculate off of the input. The order must correspond to the column list returned by the keys method so the caller can know which element is which. The result should be a subset of the allValues method as specified by the specificCols parameter to the constructor or specifyColumns method.
Overrides: BaseAnnotator.BaseAnnotator.values
(inherited documentation)

Class Variable Details [hide private]

reactionCanonizer

Value:
None