Skip to content

Commit

Permalink
Improved conversion of AtomContainer to CMLMolecule
Browse files Browse the repository at this point in the history
Tools in the CML library tend to use the XMLContent value (see. [1])
Also ChemAxon MarvinSketch will not import with the bondStereo invalid
(probably a bug) but adding the XML value fixes this.

[1]
http://www.jarvana.com/jarvana/view/org/xml-cml/jumbo/6.0/jumbo-6.0-sour
ces.jar!/org/xmlcml/cml/tools/StereochemistryTool.java?format=ok

Change-Id: I141a43ca9e028b1da7cbf79cd13bf72934638012
Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
  • Loading branch information
johnmay authored and egonw committed Jun 14, 2012
1 parent 8caf84c commit b4e480c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/org/openscience/cdk/libio/cml/Convertor.java
Expand Up @@ -734,8 +734,10 @@ public CMLBond cdkBondToCMLBond(IBond cdkBond) {
this.checkPrefix(bondStereo);
if (cdkBond.getStereo() == IBond.Stereo.UP) {
bondStereo.setDictRef("cml:W");
bondStereo.setXMLContent("W");
} else {
bondStereo.setDictRef("cml:H");
bondStereo.setXMLContent("H");
}
cmlBond.appendChild(bondStereo);
}
Expand Down

0 comments on commit b4e480c

Please sign in to comment.