I've noticed that in this document:
That the MDLV2000 format actually is supposed to support degenerate bond types, like so (as quoted from pate 48):
1 = Single, 2 = Double,
3 = Triple, 4 = Aromatic,
5 = Single or Double,
6 = Single or Aromatic,
7 = Double or Aromatic, 8 = Any
Normally I wouldn't care about using a connection table format for degenerate bonds (I'd just use SMARTS), but for one particular application I actually need to use CTAB-like formats.
In the MDLV2000Writer class, the writeMolecule method seems to support only the first 4 of these:
int bondType; if (writeAromaticBondTypes.isSet() && bond.getFlag(CDKConstants.ISAROMATIC)) bondType=4; else if (bond.getFlag(CDKConstants.SINGLE_OR_DOUBLE) && bond.getFlag(CDKConstants.ISAROMATIC)) bondType=4; else if (Order.QUADRUPLE == bond.getOrder()) throw new CDKException("MDL molfiles do not support quadruple bonds."); else bondType = bond.getOrder().numeric(); line += formatMDLInt(bondType,3);
Yet I could have sworn that the MDLV2000 reader actually supports all 8. Am I missing something?
In any case I think it'd be cool to have the other 4. That document I quoted does mention that the degenerate things are only to be used in substructure searches but seeing as CDK has that anyway, why not?
Log in to post a comment.