Here's a POB (plain old bug) in the latest source code: echo "[Cl+]" | babel -i smi -o can [ClH+]
The SMILES specification says that no matter what is inside of the brackets for an atom, it can't be changed. Hydrogens and charge in particular, no matter whether they make sense or not, must not be altered. If I specify something like [Cl+], it means a weirdly charged Cl atom (maybe I'm a high-vacuum physicist describing an ion stream...). You can't add hydrogens or change the charge on atoms that were in brackets in the input SMILES. http://opensmiles.org/spec/open-smiles-3-input.html#3.1.2 "If no "Hn" is specified, it is identical to H0." http://www.daylight.com/dayhtml/doc/theory/theory.smiles.html#RTFToC16 "The number of attached hydrogens is shown by the symbol H followed by an optional digit. Similarly, a formal charge is shown by one of the symbols + or -, followed by an optional digit. If unspecified, the number of attached hydrogens and charge are assumed to be zero for an atom inside brackets." Craig ------------------------------------------------------------------------------ Beautiful is writing same markup. Internet Explorer 9 supports standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. Spend less time writing and rewriting code and more time creating great experiences on the web. Be a part of the beta today. http://p.sf.net/sfu/beautyoftheweb _______________________________________________ OpenBabel-Devel mailing list OpenBabel-Devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbabel-devel