diff --git a/tool/sdg/src/main/java/org/openscience/cdk/layout/StructureDiagramGenerator.java b/tool/sdg/src/main/java/org/openscience/cdk/layout/StructureDiagramGenerator.java index 701970fcb6..40624c38ff 100644 --- a/tool/sdg/src/main/java/org/openscience/cdk/layout/StructureDiagramGenerator.java +++ b/tool/sdg/src/main/java/org/openscience/cdk/layout/StructureDiagramGenerator.java @@ -1071,8 +1071,8 @@ private void generateFragmentCoordinates(IAtomContainer mol, List elements = StereoElementFactory.using2DCoordinates(mol).createAll(); + int numCis = 0; + int numTrans = 0; + for (IStereoElement se : elements) { + if (se instanceof IDoubleBondStereochemistry) { + IDoubleBondStereochemistry.Conformation config = ((IDoubleBondStereochemistry) se).getStereo(); + if (config == IDoubleBondStereochemistry.Conformation.TOGETHER) + numCis++; + else if (config == IDoubleBondStereochemistry.Conformation.OPPOSITE) + numTrans++; + } + } + assertThat(numCis, is(2)); + assertThat(numTrans, is(2)); + } }