Bugs item #3014855, was opened at 2010-06-11 15:35
Message generated for change (Tracker Item Submitted) made by dan2097
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=428740&aid=3014855&group_id=40728

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Daniel Lowe (dan2097)
Assigned to: Nobody/Anonymous (nobody)
Summary: CML hydrogenCount attribute handling bug

Initial Comment:
I am trying to output CML corresponding to the resonance form of carbon 
monoxide, [C]=O
As it is not necessarily clear whether hydrogen are implicit or explicit I have 
added hydrogenCount="0" to the carbon to say explicitly that the carbon has no 
hydrogens. OpenBabel however appears to ignore hydrogenCount="0" implicitly 
adding two hydrogens.

On a related note OpenBabel's handling of CML's hydrogenCount attribute when 
explicit hydrogen are present is technically wrong.
If you have an atom with hydrogenCount="2" and one explicit hydrogen the number 
of hydrogens bonded tor the atom should according to the CML spec still 
actually be 2 , not 3.

Taken from http://cml.sourceforge.net/schema/cmlCore/HTMLDOCS/cmlCore.pdf :
"hydrogenCount[el.atom.hydrogenCount]
The total number of hydrogen atoms bonded to an atom.
The total number of hydrogen atoms bonded to an atom, whether explicitly 
included
as atoms or not. It is an error to have hydrogen count less than the explicit 
hydrogen
count. There is no default value and no assumptions about hydrogen Count can be
made if it is not given."

I have attached  a zip file with a CML file demonstrating both cases.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=428740&aid=3014855&group_id=40728

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
OpenBabel-Devel mailing list
OpenBabel-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-devel

Reply via email to