Backward compatibility of extended SMILES/SMARTS export

User 1acfa01768

23-04-2013 14:42:47

Regarding Extended SMILES, SMARTS format


Are the extended formats "backward compatible" to the regular SMILES/SMARTS format when exporting molecules that don't need the extended format?


i.e. I have a Molecule object and export to an extended format. If that molecule doesn't not require the extended format, do I get the same thing as if I exported it to the non-extended format?


e.g.:


molecule.toFormat("smiles:u").equals(molecule.toFormat("cxsmiles:u"));

Thanks.

ChemAxon 25dcd765a3

24-04-2013 10:11:15


If that molecule doesn't not require the extended format, do I get the same thing as if I exported it to the non-extended format?

The answer is yes, but this is a very tricky question wheter the molecule requires extended format.


Let me explain a bit.


If your molecule comes from SMILES then usually the generated SMILES ans CxSMILES will be the same, but if your molecule eg contains superfluous setero information this does not hold. Here is two smiles for example:


C[C@@H](O)[C@@H](C)O this molecule valid stereoinfo so the generated SMILES and CxSMILES are the same


C[C@@H](O)C this molecule has superfluous stereoinfo so the cxsmiles part local parity information will contain additional info: CC(C)O |@@:1|