Home | Trees | Indices | Help |
---|
|
|
|||
Orbital |
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|
|||
ORBITAL_TYPES = Set(["sigma", "pi", "s", "sp0", "sp", "sp1", "
|
|||
BOND_ORBITAL_TYPES = Set(["sigma", "pi"])
|
|
|
|
|
|
|
|
OEChem has OEGetHybridization method, and this works similarly. Return value is the p character of the hybridization, for example 2 for sp2 Simple rule based now, that should work for atoms up to the second row at least. Easy to tell if this atom has more than one pi bond. Otherwise, assume is sp3 unless have an empty orbital then assume is sp2. Or, if have a lone pair in an aromatic system, must be sp2. In cases like oxygen of C=CO, is probably somewhere in between. Hydrogen is special case. |
|
For the given molecule or intermediate, enumerate all of the reasonable resonance structures by shifting electrons around available p atomic orbitals and pi molecular orbitals. For efficiency, will always be the same molecule object yielded, just modified. Caller must make sure that it comes back in the same state. Strategy: Look for any 2 adjacent atoms hybridized with p or pi orbitals and rearrange electrons in a chemically natural manner. After any case, recursively look for more possibilities. Use observedSmilesSet to avoid recursion loops |
Simple wrapper around resonance structureIter method. Before generating the resonance structures however, will give a unique atom map label to every atom in the molecule with the effect that symmetric resonance structures will each be counted individually, instead of being skipped over as if identical. undoLabels: Specifies whether to clear out these fake labels before each result is yielded |
Helper to label the atom map attribute of all of the atoms of the molecule equal to their index position in the molecule, which ensures they will all receive a unique value. If undoDict provided, then store the original values of the atom map indexes so they can later be restored by the undoLabelUniqueAtomMaps function. |
|
Given just the p and pi orbitals for the given bond, enumerate each natural way of rearranging the electrons within them. Don't have to consider mirror cases, leave that as caller's responsibility by calling this function twice, but swapping the begin and end atoms and pOrbs. Cases of interest (not counting radicals for now): - Both atoms share a pi molecular orbital. That is, the bond includes a pi bond. . Separate the pi molecular orbitals into one empty orbital (+ charge) and one lone pair orbital (- charge). Then caller can recurse on this intermediate which should fit the above rules. - One atom has lone pair, other has empty p orbital (artificial case representing charge separation modeling) . Move lone pair to empty p orbital to form new pi bond here - One atom has pi molecular orbital other has empty p orbital . Move the pi electrons to form a new pi bond here - One atom has a lone pair in p orbital, other has a pi molecular orbital . Move the lone pair into a new pi bond . Move the pi electrons to a lone pair over the far (3rd) atom Additional case where atoms each have a pi molecular orbital, but not the same one, like the central bond in C=C-C=C. Do nothing here, let another case separate the pi orbital of one of the adjacent double bonds, and then it will look like a case we can work with (lone pair or empty orbital next to pi orbital). Note that this keeps yielding the same (but modified) molecule object. Thus, in implementing, after each yield usage, the atom and bond states must be returned to how they were. |
The real implementation method. Interface method is just a wrapper on this one with a filter to eliminate overcharged resonance structure proposals. Can almost just use the moveOrbitalElectrons functions from every beginPOrb to every endPOrb and let that sort out the details. This would work, except that we need to undo the changes at each step to revert the molecule to its original state, which is hard to do if we don't know the specific steps. |
Figure out the total gross positive and negative charge on the molecule, which may be non-zero even if the net charge on the molecule is zero. For example: >>> from CHEM.Common.Util import molBySmiles; >>> print grossFormalCharges(molBySmiles( "CC(=O)Cl" )); (0, 0) >>> print grossFormalCharges(molBySmiles( "[OH3+]" )); (1, 0) >>> print grossFormalCharges(molBySmiles( "CC[N+](=O)[O-]" )); (1, -1) >>> print grossFormalCharges(molBySmiles( "[N-]=[N+]=[N-]" )); (1, -2) |
The molecule should represent a proposed resonance structure. Decide whether it should be accepted as a valid / meaningful one. For example: Don't accept charge separated structures if it leaves an empty orbital (incomplete octet) on the formal positive atom. It's okay if the formal positive atom has a complete octet, like the nitrogen on nitro and azide groups. Also okay if lone positive charge, like carbocation with no anion available to "fill-in" the empty orbital. |
Most general half-reaction, movement of electrons from one molecular orbital to another. Function should figure out all of the substeps necessary to properly represent the change, including consideration for whether the orbitals are atomic (non-bond) or molecular (bond). Assume this is called in a sensible manner however. Cannot use any arbitary orbitals as the arguments. The source orbital (orb1) must contain electrons to move, no empty orbitals allowed. The target orbital (orb2) must have space for electrons to move in. In general this means it is either an empty orbital or a bond orbital which can displace the existing bond electrons to the neighbor atom. No lone pairs allowed. Returns a 2-ple consisting of the bond just created or added to by the move and a string representing the respective "arrow-pushing" diagram. |
|
Move electrons from atom1 to atom2. If these are bonded already, just change the bond order and adjust the formal charges. If they are not already bonded, then create a new bond and adjust the formal charges. If moving single electrons (radical reactions) better provide halfBonds list. Used to keep track of which bonds have only been "half-formed" by a radical movement, and are waiting for a complementary one to complete or eliminate the bond. Note that the bond could be "1 1/2" or "2 1/2." The point is that it's just not a whole number bond yet. Return 2-ple with reference to new bond object if it was created and the arrow code string representing the electron movement. |
Move electrons from the bond to the target atom. If the atom is already part of the bond, then just down shift the bond order (maybe deleting the bond altogether) and adjust atom formal charges. Otherwise, down shift this bond order and create a new one to the atom, again adjusting atom formal charges. Note that this only works if the "pivotAtom" is specified. That is, the atom which appears in both the source and the target bond. Otherwise, without the polarity of the source bond specified, can't tell which end to remain connected to. Return the arrow code string representing the electron movement. |
Given 2 molecules, that should be based on a common one, determine how many atoms in the molecule have been altered by electron rearrangement. One of the molecules should probably have been a copy of the other, because this method depends on the mol.GetAtoms iterator returning the atoms in the same order. If that's the case, will go through each matching pair of atoms and check whether they share the same bond orders and formal charge. If not, assume the electron arrangement has changed. |
|
|
Reparse the molecule SMILES string to ensure any unusual properties are cleared out. Happens often when doing direct molecule graph manipulations or reaction processing. In addition, check molecule bonds and atoms and clear out any bogus stereoassignments. |
Assume the molecule object represents a racemic mixture of otherwise identical isomers. Go through every unassigned stereocenter and generate all possible specific isomers by assiging all possible stereo configurations. allCisTrans: If true, will enumerate all cis-trans isomers for unspecified chiral bonds. Otherwise, will only generate one with the bulkiest (largest by molecular weight) groups trans to each other |
Given a list of molecule objects, call enumerateRacemicMixture on each to yield a list of all possible isomer combinations of the molecules. currStereoList is the current list of fully-stereospecified molecules. One it reaches the same length of the original molList, one complete set of stereoisomers has been produced and can be returned. Use to track depth in recursion |
|
|
|
|
ORBITAL_TYPES
|
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0beta1 on Thu Nov 8 17:49:22 2007 | http://epydoc.sourceforge.net |