Thanks,

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)) {
                mdlWriter.write(mol);
                mdlWriter.close();
            }

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




On 13 May 2014, at 22:06, John May <john...@ebi.ac.uk> 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. 
> 
> http://cdk.github.io/cdk/1.5/docs/api/index.html?org/openscience/cdk/smiles/SmilesGenerator.html
> 
> J
> 
> On 13 May 2014, at 17:05, Syed Asad Rahman <a...@ebi.ac.uk> wrote:
> 
>> Hi,
>> 
>> 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)
>> 
>> Thanks,
>> 
>> Asad
>> 
>> PS: Attached is a molecule (L-Alanine) with Stereo centre.
>> 
>> <Mol_Stereo.mol>
> 

------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user

Reply via email to