SiMolecule / centres

Perception and labelling of stereogenic centres in chemical structures
BSD 2-Clause "Simplified" License
16 stars 3 forks source link

Atropisomer is detected and given configuration when aryl ring on one side is symmetrical #14

Closed iclkevin closed 6 months ago

iclkevin commented 7 months ago

In the attached MOL file (ext changed to .txt so I can attach it), the bottom aryl ring is symmetrical, but CENTRES gives the connecting bond a configuration of "M" instead of "ns". I tested this both within our system using the CENTRES API and using the JAR provided in the releases downloads. atrop_achiral.txt

johnmay commented 7 months ago

Thanks. It looks to be an issue with the changing of the roots, the simple fix is to be less optimal and initialise the digraph a new. I suspect this is also the issue with #15

johnmay commented 7 months ago

OK done a bit of probing and long term memory recall. I think this is actually due to an omission in the spec. Double bonds are normally "open'ed up" unless they are connected to the root in the digraph (i.e. C[S@H](=O)CC). However if you do this on atropisomers you artificially split ties... so probably you should open up double bond there.

iclkevin commented 7 months ago

I don't really understand as the two aromatic bonds in the same ring connected to the aryl-aryl single bond should be equivalent to CIP, but my level of expertise in this area is far inferior. If I can help in any way, please just let me know.

johnmay commented 7 months ago

So the issue is when you have a double bond in the digraph you normally open it up:

           |   |
-C=C- => - C - C -

This is to handle the alternating single and double bonds, i.e. in aryl's.

You don't do this on the root node due to tetrahedral stereo involving a double bond. Atropisomers are an odd case because you have a double on the root but it should be duplicated since otherwise you break the symmetry.

Very interesting corner case, but think I know the fix just need to find time to play around with it. Thanks again for reporting these.

johnmay commented 7 months ago

BTW you can also just paste the molfile into CDK depict and test it there:

johnmay commented 7 months ago

Screenshot 2024-01-24 at 14 02 09

iclkevin commented 7 months ago

Anytime, and thanks for the link. Thank you for this project!

iclkevin commented 6 months ago

With the updates, all of our tests pass. Thank you.

johnmay commented 6 months ago

Thank you for reporting, any other issues let me know. Despite all the effort I still dislike the CIP system as overly complicated/complex.