Hi Craig, >From what you say, it sounds like this is a better discussion for the OpenSMILES list. My intention is to match existing usage and what I believe to be Daylight usage. Let's have this discussion over there, and can clarify the spec either way depending on the outcome.
- Noel On 2 March 2017 at 19:34, Craig James <cja...@emolecules.com> wrote: > Hi Noel, > > On Thu, Mar 2, 2017 at 10:11 AM, Noel O'Boyle <baoille...@gmail.com> wrote: >> >> In the course of sorting out the handling of implicit Hs, I've found >> that the current SMILES writer writes hypervalent atoms from the >> organic subset in square brackets. E.g. Texas carbons: >> >> >obabel -:C(C)(C)(C)(C)C -osmi >> [C](C)(C)(C)(C)C >> >> or "FIF" as "F[I]F". >> >> This is unusual behaviour compared to other toolkits and I think lack >> of brackets are preferred where possible, so I've changed this (on my >> branch). If this is an issue for anyone, now's the time to duke it >> out. > > > Well, "FIF" violates the OpenSMILES spec in section 3.1.5, which states that > the "organic subset" are only allowed outside of brackets if they're in > their normal lowest-valence state. Actually, now that I read it, it's not > well written and has room for (mis)interpretation. The phrase that I think > applies in OpenSMILES is: > > An atom is specified [without brackets] has the following properties: > > "implicit hydrogens" are added such that valence of the atom is in the > lowest normal state for that element > > You might argue from this that since you don't have to add any hydrogens, > it's clear what it means. But someone else might say, "you have to add > charge to balance it." > > Daylight's page is more clear. It says: > > ... the "organic subset" B, C, N, O, P, S, F, Cl, Br, and I may be written > without brackets if the number of attached hydrogens conforms to the lowest > normal valence consistent with explicit bonds. > > > If you can say, "It's obvious ...", and this is a feature everyone would > like, then the OpenSMILES spec could be changed. > > Craig > >> >> >> - Noel >> >> >> ------------------------------------------------------------------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, SlashDot.org! http://sdm.link/slashdot >> _______________________________________________ >> OpenBabel-Devel mailing list >> OpenBabel-Devel@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/openbabel-devel > > ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ OpenBabel-Devel mailing list OpenBabel-Devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbabel-devel