-
Notifications
You must be signed in to change notification settings - Fork 244
Adding Nitrogen to RMG-Py #160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
electron pairs along with function to manipulate and request their values.
lists with hydrogen atoms from the function fromAdjacencyList requiring that the input adjacency list have include already all hydrogen atoms. Added a new code section calculating and storing the number of lone electron pairs and electric charges for each atom which is possible only if the adjacency list contains all hydrogen atoms.
pair resonance and extend the electronic charge calculation for the special case of hydrogen.
This function writes for debugging the molecules in the edge into a ChemkinFile similar to the function saveChemkinFile for the core molecules but with additional information.
- adding function isNitrogen() to confirm that an atom is a nitrogen atom - updated and renamed the functions identifying lone pair - radical electron shift resonance isomers - added functions identifying resonance isomers with nitrogen atoms having two double bonds (N4dd) and nitrogen atoms having one triple and one single bond (N4ts) - removed isRadical() in generateResonanceIsomers() because it is again used inside getAdjacentResonanceIsomers() and getLonePairRadicalIsomers() and is not required for getN4dd_N4tsResonanceIsomers()
pairs - also added the atom type N2d
Because of the many new molecular structures possible by accounting for lone electron pairs, such as ions and new forms of radicals, we have to forbid, at least at the moment, certain structures until we have more thermodynamic and kinetics information for them in our libraries. - Until we have more thermodynamic data of charged molecules we will forbid them - We also forbid positively charged oxygen atoms - We forbid at least at the moment oxygen atoms with bond order larger than two and radical oxygen with a bond order of two
forming single bonds Example reaction: Acatat ion (CH3CO2-) reacting with water (H2O) In both of the two contributing resonance structures of the Acetat ion one of the two oxygen atoms is connected to the carbon atom by a single bond and bears three lone electron pairs while the other oxygen atom is connected by a double bond and bears two lone electron pairs. The oxygen atom with three lone electron pairs can abstract a proton (H+) from a water molecule where one of the three lone electron pairs provides both electrons for the new single bond formed to the new hydrogen atom, resulting in an acetic acid (CH3COOH) and a hydroxide (OH-) molecule.
lines around atom symbols - Needs further improvement to account for the direction of bonds to adjacent atoms and the special drawing of small molecules
These action will be first used in the lone_electron_pair_bond reaction family - GAIN_PAIR increases the number of lone electron pairs on a specific atom - LOSE_PAIR decreases the number of lone electron pairs on a specific atom
- adding attributes for lone electron pairs - adding functions __gainPair() and __losePair() and handling of the new reaction recipe actions GAIN_PAIR and LOSE_PAIR
- temporarily, until we have more thermo and kinetics data on ions
- treating special case of nitrogen in NO2 groups
Conflicts: rmgpy/molecule/atomtype.py
pairs The following adjacency list example describes NO2 with the radical electron on the nitrogen atom with the following parameters where numberLoneElectronPairs is new and optional: atomIndex atomType numberRadicalElectrons numberLoneElectronPairs bonds{} 1 N 1 0 {2,D} {3,S} 2 O 0 2 {1,D} 3 O 0 3 {1,S}
Conflicts: rmgpy/molecule/molecule.pxd rmgpy/molecule/molecule.py
nitrite (RONO) compounds and vice versa.
Conflicts: rmgpy/molecule/adjlist.py rmgpy/molecule/atomtype.py
Because RDKit cannot handle non-standard valency like tetra-valent nitrogen RMG is falling back to previous drawing functions and replaces RDKit's toSMILE with getFormula. Temporarily fixes ReactionMechanismGenerator#156
For bookkeeping- this is a list of unittests that now fail due to this branch (mostly related to adjacency lists)
|
Could you also write a new example job input file and put it in the examples folder? That would be very helpful. |
Yes, I will fix the failing unit tests and provide and example input file |
The number of lone electron pairs is not defined for groups, therefore should not be printed for groups
Add explicit hydrogen.
set removeH = False add number of lone electron pairs to setup molecule
set removeH = False
Introducing 1-centered biradicals to the H-abstraction family lets RMG find the special case of CH2(T) + CH = CH + CH2(T). However for the reverse reaction it recognizes that nothing happens and removes the reverse reaction from the reaction list which leads an error for empty reaction lists.
- uses the newly added libraries
I have added an example input for nitrogen in 65084ca |
S - singlet D - doublet T - triplet Q - quartet V - quintet
The current assumptions for newly found products is that they attain the highest possible multiplicity as this in most cases the most stable species and resulting often in the fastest kinetics. However if we start with a singlet biradical reactant in the forward direction we find with this assumption only the triplet biradical as product of the reverse reaction. I became aware of this because I have added the nitrogen atom as a triradical to the three important reaction families H_abstraction, Disproportionation and R_Addition_MultipleBond. I think making it very general is the simplest solution. For that I have added the electronic states of quartet (Q) and quintet (V). I didn’t want to continue hardcode specific exceptions. Therefore I have modified the function __generateProductStructures() to find all possible electronic states for the newly found product structures and add all possible combinations of these products to a product structures list. This list can also contain spin-forbidden reactions! But instead of hardcoding the removal of them I think we should add their often very slow kinetics to the library. I have extended __generateReactions() to make a list of reactions using the new list of product structures. That way it will find the reverse reaction leading to the correct electronic state of the reactants of the forward reaction.
- improvements to obtain correct reaction degeneracy - replace while loop with if conditions
This function returns a list of atoms of the molecules containing at least one unpaired electron.
- include the requirement for an existing lone electron pair for N5dd-N5ts resonance
- this prevents two edge files having the same number of species from overwriting each other
Conflicts: rmgpy/rmg/main.py rmgpy/rmg/model.py
- not using Substitution_O for now
- add function getTransportPropertiesViaLennardJonesParameters(self,species) to transport.py - use this function as a fall back only if the library and the transport groups do not have proper information
This extension brings the following features to RMG-Py:
Requirements:
Limitations: