There is AssignTotalChargeToAtoms which is called when parsing the
gamess format, but not, apparently, gaussian.
Again, if you could upload examples of failures to a GitHub Issue (or
even better, start a pull request with failing tests added to the
testing framework) that would be helpful.
David Koes
Associate Professor
Computational & Systems Biology
University of Pittsburgh
On 6/7/21 8:22 AM, Marie-Madeleine Walz wrote:
Hi David,
thank you for your reply. I tested your code that assigns a sp2
hybridisation to a N as e.g. in azete (in mol.cpp), and it solves the
incorrect bond orders.
However, I think that this is a general problem: I have numerous
compounds that get incorrect bond orders and that end up with a
different charge than specified in the Gaussian output file (like e.g.
sulfite and sulfur trioxide). I think it might be a good idea to have
somewhere a general "charge checkā. (Maybe there is and I miss to use
it? I checked whether OB is getting the specified charge and it seems to
get it.)
For example, it would be great if there is a function that checks (i)
the charge of the compound (or whether it is a radical) and (ii) the sum
of bond orders to a certain atom (I guess that is done with
GetExplicitValence()). If a compound is neutral (and not a radical) and
ends up with e.g. a C that only has three single bonds, this should be
somehow corrected.
Is there any way to do this with the existing OB functions, i.e. without
changing the code?
With kind regards,
Madeleine
_______________________________________________
OpenBabel-Devel mailing list
OpenBabel-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-devel