GreenGroup/RMG-Py — pull request #160 by bbuesser (2013-11-19 17:48:07+00:00)
Title: Adding Nitrogen to RMG-Py

This extension brings the following features to RMG-Py:

- new atom types for tri-valent and penta-valent nitrogen
- the atom objects store a new attribute describing the number if lone electron pairs
- new functions identifying resonance structures related to nitrogen atoms
- functionality to change the number of lone electron pairs in reaction recipes for new reaction families
- because of the definition of lone electron pairs the atom object attribute "charge" is now automatically assigned allowing formal charges
- the function fromAdjacencyList accepts an optional parameter, between the radical number and the first bond definition, that describes the number of lone electron pairs (e.g.: 3 N 0 1 {1,S} … would be a non-radical nitrogen atom with one lone electron pair). The function toAdjacencyList() always writes this number of lone electron pairs. It is intended to become a useful feature in defining functional groups involving lone electron pairs.

Requirements:

- requires the latest update of RMG-database
- to correctly assign the number of lone electron pairs from adjacency lists explicit hydrogen atoms are required! All thermochemistry and kinetic databases have been updated accordingly.
- because of the limitation of RDKit to tri-valent nitrogen RDKit is replaced in "fall back" blocks by OpenBabel in the functions toSMILES(), and toInChI() in molecule.py and the drawing functions of draw.py. This can be removed later if RDKit becomes ready for penta-valent nitrogen. Therefore RMG-Py is only depending on OpenBabel if nitrogen is desired.

Limitations:

- so far fromAdjacenyList() is the only way of molecule input that has been tested
- because of the formal charges beta-scission reactions, for example, could lead to species that are ions (sum of all atomic charges != 0). Because the thermochemistry and kinetic libraries do not contain information on ions so far, the formation of ions has currently been prohibited in isMoleculeForbidden()
- because the QM calculation of thermochemistry has always relied on RDKit it is currently not called for species containing a penta-valent nitrogen atom