Package CHEM :: Package CombiCDB :: Module ReactionModel :: Class BaseReagent
[hide private]
[frames] | no frames]

Class BaseReagent



           object --+        
                    |        
                 dict --+    
                        |    
Common.Model.RowItemModel --+
                            |
                           BaseReagent

Generic object class to model reaction reagents. Should be able to provide a description of what the reagent is and, given some reactant molecules, produce legitimate product molecules that such a reagent would result in.

Instance Methods [hide private]
 
__init__(self, initData=None, dataKeys=None)
Constructor sets up expected attributes.
 
loadTextProperties(self)
Look for any text-valued properties that should be parsed into some object or list for persistence in the model
 
html(self)
Return an HTML representation of the reagent suitable for presentation on the Web.
 
__str__(self)
Return a simple string representation of the reagent, suitable for list and debugging displays.
 
isRetro(self)
Determine whether or not this represents a retroReagent
 
__call__(self, reactants, supplementalData=None, enumerateRacemicMixtures=True)
Function call (parantheses) operator overload for standard call to generate products based off this reagent and any starting reactant materials.
 
postProcessing(self, products, reactantSmiSet, supplementalData)
Post-processing to clean up product information.
 
postProcess(self, product, extraProducts=None, reactantSmiSet=None, allowIntermediate=None)
Do post-processing cleanup for an individual product molecule.
 
generateProducts(self, reactants, supplementalData=None)
Main method to be overriden by subclasses
 
retro(self)
Return a retro version of the current reagent.

Inherited from Common.Model.RowItemModel: update, valuesByName

Inherited from dict: __cmp__, __contains__, __delitem__, __eq__, __ge__, __getattribute__, __getitem__, __gt__, __hash__, __iter__, __le__, __len__, __lt__, __ne__, __new__, __repr__, __setitem__, clear, copy, fromkeys, get, has_key, items, iteritems, iterkeys, itervalues, keys, pop, popitem, setdefault, values

Inherited from object: __delattr__, __reduce__, __reduce_ex__, __setattr__

Class Variables [hide private]
  inherentReactants = <CHEM.DB.rdb.search.NameRxnPatternMatching...
  inherentProducts = <CHEM.DB.rdb.search.NameRxnPatternMatchingM...
  inherentProductSmiSet = <CHEM.DB.rdb.search.NameRxnPatternMatc...
  countIntermediates = False
  removeInherentProducts = True
  ignoreSelfReactions = False
  originalReagent = <CHEM.DB.rdb.search.NameRxnPatternMatchingMo...
  enforceRetroReactions = False

Inherited from Common.Model.RowItemModel: childData, index, isNew, mol, newCount, tableName

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, initData=None, dataKeys=None)
(Constructor)

 
Constructor sets up expected attributes. Python dictionary is a superclass, so mostly expects initialization data in the form of key-value string pairs that will then be parsed out by the loadTextProperties method.
Overrides: Common.Model.RowItemModel.__init__

html(self)

 
Return an HTML representation of the reagent suitable for presentation on the Web. Should be based on the reagent's html_template property. If '%(depict)s' is present in the template, the reagent's "depict" property should be set to a suitable IMG tag first.

__str__(self)
(Informal representation operator)

 
Return a simple string representation of the reagent, suitable for list and debugging displays. Usually just the reagent's description, unless that's unavailable, then fall back on reagent_id.
Overrides: object.__str__

__call__(self, reactants, supplementalData=None, enumerateRacemicMixtures=True)
(Call operator)

 
Function call (parantheses) operator overload for standard
call to generate products based off this reagent and any
starting reactant materials.

supplementalData: If provided, should be an instance of SupplementalDataModel.
    Besides the standard product return values, additional data will be stored
    in this model for the caller to inspect.
enumerateRacemicMixtures:  Will check all of the provided reactants
    and ensure all of their stereocenters are specified one way or another.
    If they are not specified, all possible isomer configurations will be tried.

postProcessing(self, products, reactantSmiSet, supplementalData)

 
Post-processing to clean up product information. The product generation / prediction may have left behind sentinel value formal charge codes on some atoms and other similar issues that the end user would be uninterested in.

postProcess(self, product, extraProducts=None, reactantSmiSet=None, allowIntermediate=None)

 
Do post-processing cleanup for an individual product molecule. extraProducts: Optional list to store any additional products generated during the post-processing reactantSmiSet: Set of reactant SMILES to avoid counting these as products

retro(self)

 
Return a retro version of the current reagent. Not quite a perfect inverse, but roughly speaking, applying the retro reagent to products of the normal reagent, should yield the normal reactants as retro products.

Class Variable Details [hide private]

inherentReactants

Value:
None

inherentProducts

Value:
None

inherentProductSmiSet

Value:
None

originalReagent

Value:
None