Dear all, When I made the changes to the handling of stereochemistry in the Q3 2008 release of the RDKit, I attempted to get the canonicalization of ring stereochemistry specifications (i.e. things like the molecule encoded by the SMILES "c...@h]1cc[c@@H](C)CC1") right. I knew that it was unlikely that I had actually done so, so I added a warning to the code that you probably have seen: Warning: ring stereochemistry detected. This may not be handled correctly. Based on the tests I did before the release, I believed that the current status of the code was correct a large enough fraction of the time that this warning was sufficient.
After some large-scale testing done by a colleague, it turns out that this assumption was very bad: the handling of ring stereochemistry was incorrect much, much too frequently. To be explicit: the SMILES that were being generated for molecules that fell into this class did not have the correct stereochemistry; i.e. the molecules were wrong. This is far from acceptable: it's ok to generate output that's non-canonical, but not output that's incorrect. Here's what I have done in order to address this: - The stereochemistry specifications on ring atoms are no longer canonicalized. - The warning about ring stereochemistry has been moved into the SMILES writer and now indicates clearly that the output is not canonical - Detection of cases that can have ring stereochemistry has been improved; spiro centers, symmetrically substituted centers, and bridged systems no longer trigger the warning. These changes are all in svn; I encourage you to update if you are building from source. I plan to do the Q4 release sometime in the next couple of weeks; the changes will also be in that release. Once I've assembled a sufficiently large set of test molecules I will revisit the canonicalization of these systems sometime next year and try again to get this right. This is definitely the fun part of an open-source project: everyone sees when you screw up. :-S -greg

