From: Vincent Le G. <vin...@gm...> - 2010-04-20 11:22:12
|
2010/4/20 Egon Willighagen <ego...@gm...> > On Tue, Apr 20, 2010 at 12:56 PM, Nina Jeliazkova <ni...@ac...> wrote: > >> The > >> molfile specification does not have a bonder order 4, just 1-3. Many > >> files write, however, molfile query structures, where 4 indicates an > >> aromatic atom, but it is not a bond order. > > > > This is correct, and still - wouldn't it be a better approach (more user > > friendly) to interpret bond order 4 as aromatic - or at least have this > as > > optional behaviour in MolReader code ? > > If not mistaken, the RELAXED mode is doing this... but would need to > check... > > I don't know the RELAXED mode. But i'm thinking: if there is a RELAXED mode allowing such bond, then the STRICT one (which we are talking about ?) should send an error when meeting the aromatic flag doesn't it? Also, even if it read the aromatic flag and set the corresponding CDK aromatic property, what about bond orders? Especially, what would be the output SDF in such case? I'm gonna make some tests about that today if I've time :) > > Now, the CDK current does not have a unknown bond order (we need a > > patch for that), so upon reading it (incorrectly?) defaults to > > SINGLE... causing the cyclohexane... now, please let us know what > > software created the incorrect MDL molfile, and please file a bug > > report against that project... > > > > Otherwise, use the DeduceBondOrder (or so) class to assign proper bond > > orders... > > > > Unfortunately no code will be able to guess benzene from cyclohexane ... > > True... but the data model in the file is not really cyclohexane... > Once the molecule have been loaded by the current reader, it becomes cyclohexane (all bonds order are set to 1). There are only two possibilities I think: 1. Allow such bond representation (aromatic = no explicit order defined) in the CDK molecular model, along with proper bond order definition. 2. Use DeduceBondOrder-like algorithm by (during the loading process...) default when such flag is encountered. the lack of explicit hydrogens ensures this to work... > This means that I can get the benzene back if I use DeduceBondOrder after reading and before adding hydrogens (if I understand well). But then the problem would be: 1. One don't know when to use the deduce bond order, as the aromatic flag is silently read (and converted) by the reader. 2. It's still quite dangerous: after reading, the molecule is transformed. So we clearely have to use Hadder in the right order to get the molecule back. Anyway, I will try out relaxed mode just to see how it handle these issues :) |