I tried this code, the isomeric seems to hold the stereo information but converting it back to MDL file format, I am loosing the Stereo information in the bond connection table.

Here is my snippet.

The MDL is loosing the up/down info. in the bond section.

       SmilesParser smilesParser = new SmilesParser(DefaultChemObjectBuilder.getInstance());
        IAtomContainer mol = smilesParser.parseSmiles("C[C@H](N)C(O)=O");
        String sm = SmilesGenerator.isomeric().aromatic().create(mol);
        Assert.assertEquals("C[C@H](N)C(O)=O", sm);

        try (ByteArrayOutputStream baos = new ByteArrayOutputStream()) {
            try (MDLV2000Writer mdlWriter = new MDLV2000Writer(baos)) {

       System.out.println("ac " + baos.toString());

On 13 May 2014, at 22:06, John May <> wrote:

Hi Asad,

You are generating a generic SMILES, you probably want an isomeric SMILES. Both and non-canonical and intended for storage, canonical equivalence are unique and absolite.


On 13 May 2014, at 17:05, Syed Asad Rahman <> wrote:


What is the best way to preserve the stereo chemistry in the CDK while converting an AtomContainer to SMILES and back (round trip)?

IAtomContainer=>SMILES=> IAtomContainer (leads to loss of stereo information)



PS: Attached is a molecule (L-Alanine) with Stereo centre.