To everyone:

On Tuesday 23 January 2007 13:59, Stefan Kuhn wrote:
> jcp right now renders "any" bonds in mdl as single bonds. The mdl reader
> does not read the any type. The code of  mdl reader is this:
>                 if (order == 4) {
>                     // aromatic bond
>                     bond = molecule.getBuilder().newBond(a1, a2,
> CDKConstants.BONDORDER_AROMATIC, stereo);

Mmm... I thought we got rid of all usage of that :(

>                     // mark both atoms and the bond as aromatic
>                     bond.setFlag(CDKConstants.ISAROMATIC, true);
>                     a1.setFlag(CDKConstants.ISAROMATIC, true);
>                     a2.setFlag(CDKConstants.ISAROMATIC, true);

Using flags, as is done here, it the agreed way of doing it.

>                     molecule.addBond(bond);
>                 } else {
>                     bond = molecule.getBuilder().newBond(a1, a2, (double)
> order, stereo);
>                     molecule.addBond(bond);
>                 }

Mmm....

> So we can see that order 8=any is not handled and that any is actually set
> to 8 (abstract renderer renders anything unknown to single) and that
> aromatic is still set to 1.5 (BONDORDER_AROAMTIC is 1.5). This is a bit
> nasty. 

Agreed.

> My suggestion: 
> Rename CDKConstants. BONDORDER_AROMATIC to BONDORDER_UNKNOWN (this is what
> it really is) and set flags for aromatic/any alongside.

I think that makes sense. I would suggest to still render UNKNOWN as a single 
bond, to, at least, indicate the connectivity... possibly as grey or so? What 
does the IUPAC suggest about this?

About the 8=any... I think we should use a flag for that too, and set the 
order too to UNKNOWN.

Everyone: I think we need a community agreement here... what should the 
behavior with respect with respect the 4=aromatic, 8=any, etc... ?

Egon

-- 
http://chem-bla-ics.blogspot.com/

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Cdk-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cdk-user

Reply via email to