Package CHEM :: Package CombiCDB :: Module MechanismModel :: Class ElectronArrow
[hide private]
[frames] | no frames]

Class ElectronArrow



Class / struct containing electron flow information for reaction mechanisms. Should map directly to a single curved arrow for an arrow-pushing reaction mechanism.

Instance Methods [hide private]
 
__init__(self, mol, sourceIndexes, nElectrons, targetIndexes)
Initialization constructor given the (composite) molecule object the arrows would act upon.
 
__str__(self)
Format into arrow code
 
apply(self, mol, halfBondIndexes=None)
Apply the electron arrow pushing to the respective molecule to actually "move" the electrons indicated, producing an (intermediate) produce.
Static Methods [hide private]
 
applyAll(mol, arrowObjList)
Apply all of the electron arrow objects in the list to the respective (composite) molecule to actually "move" the electrons and produce a product.
 
parseArrowCode(arrowCode)
Convenience function to parse out arrow code strings.
 
parseArrowCodes(mol, arrowCodes)
Further convenience function.
Class Variables [hide private]
  sourceIndexes = <CHEM.DB.rdb.search.NameRxnPatternMatchingMode...
  sourceAtoms = <CHEM.DB.rdb.search.NameRxnPatternMatchingModel....
  nElectrons = 0
  targetIndexes = <CHEM.DB.rdb.search.NameRxnPatternMatchingMode...
  targetAtoms = <CHEM.DB.rdb.search.NameRxnPatternMatchingModel....
Method Details [hide private]

__init__(self, mol, sourceIndexes, nElectrons, targetIndexes)
(Constructor)

 
Initialization constructor given the (composite) molecule object the arrows would act upon. The source and target indexes correspond to atom mapping indexes to indicate where the arrow comes from and goes to.

applyAll(mol, arrowObjList)
Static Method

 

Apply all of the electron arrow objects in the list to the respective (composite) molecule to actually "move" the electrons and produce a product.

For now just process each arrow object sequentially. Works for most cases, but will cause problems with radical reactions where often 2 simultaneous movements / arrows are needed to complete or break a bond. Will eventually need some more wholistic approach that keeps some tracking variables to deal with such cases.

parseArrowCode(arrowCode)
Static Method

 
Convenience function to parse out arrow code strings.  Syntax described elsewhere, including
http://contact15.ics.uci.edu/~chemdb/index.php/Web_Development#Details_on_.27arrow_description.27_syntax

Returns a 3-ple consisting of 
- The atom map indexes of the source atoms
- The number of electrons moving with the arrow (1 or 2)
- The atom map indexes of the target atoms

parseArrowCodes(mol, arrowCodes)
Static Method

 
Further convenience function. Given a composite string representing multiple electron flow arrows and the (composite) molecule they are intended to act upon, parse out all of them and return a list of respective ElectronArrow object instances.

Class Variable Details [hide private]

sourceIndexes

Value:
None

sourceAtoms

Value:
None

targetIndexes

Value:
None

targetAtoms

Value:
None