Skip to content

Add support for Aryl-Aryl atropisomerism - #353

Merged
dan2097 merged 10 commits into
dan2097:masterfrom
johnmay:atropisomerism
Nov 14, 2026
Merged

dan2097 merged 10 commits into
dan2097:masterfrom
johnmay:atropisomerism

Conversation

@johnmay

@johnmay johnmay commented Nov 5, 2026

Copy link
Copy Markdown
Contributor
  • We modify the bond stereo to support left/right in addition to cis/trans. Existing testing of bond stereo (non null) was changed to check for cis/trans.
  • Add support to the SMILES writer to emit the RDKit Atropisomer CXSMILES extension. This uses up/down wedges (https://www.rdkit.org/docs/RDKit_Book.html#interpreting-atropisomers-without-coordinates). This is not super nice but it is functional and supported by CDK as well, perhaps in future we have something better. The InChI is adding/added support for atropisomers as well so that can be added when needed. The extension is not enabled by default on the CXSMILES output.
  • Finally we handle the finding/assigning of the axial bond stereo in a similar manner to the other stereo descriptors.

Is functional and ready but...

  • Could do with some more tests for corner cases.
  • M/P/Ra/Sa don't seem to be able to accept locants
Screenshot 2026-11-05 at 11 07 03 Screenshot 2026-11-05 at 11 05 45 Screenshot 2026-11-05 at 11 05 14 Screenshot 2026-11-05 at 11 04 33

johnmay and others added 7 commits November 5, 2026 10:31
Places where null was being checked need to now check the bond is CisTrans. New utility methods hasCisTransSpecified() / hasAtropisomerSpecified() have been added.
The locant handling is implemented but the locant's don't seem to make it through (grammar change needed?).
@dan2097

dan2097 commented Nov 8, 2026

Copy link
Copy Markdown
Owner

The extension is not enabled by default on the CXSMILES output.

As far as I can see this is using CxSMILES official wedge syntax, so syntactically it's not an extension of CxSMILES even if it is semantically

What do you think about having this enabled by default in the "extended SMILES" output. My concern if this isn't done is that it would mean that none of the output modes included this, effectively meaning that this stereochemistry is ignored despite there being no warning.

I think axial stereochemistry in principle can be used with Rac/Rel (atleast RDKit seems to support it:https://www.rdkit.org/docs/RDKit_Book.html#enhanced-stereochemistry), do you want this combination rejected for the moment?

Tangentially to this PR I've noticed that the public getExtendedSmiles() method, doesn't expose passing a customized SmilesOptions bitset, I'll get that fixed once this is merged.

@johnmay

johnmay commented Nov 9, 2026

Copy link
Copy Markdown
Contributor Author

I also think there is a difference between I have an (M) annotated and I have know idea what you are talking about vs I know what you are talking about I just can't give you back a representation of it. But yes it did cross my mind perhaps a new layer of warning might be needed. "Structure has features which are not universally representable" i.e. you can get a CXSMILES but InChI/MOLfile/SMILES will not have everything.

As far as I can see this is using CxSMILES official wedge syntax, so syntactically it's not an extension of CxSMILES even if it is semantically

What do you think about having this enabled by default in the "extended SMILES" output. My concern if this isn't done is that it would mean that none of the output modes included this, effectively meaning that this stereochemistry is ignored despite there being no warning.

I thought I would let you make that call. It is a fudge though, not sure if you rememeber but in OpenBabel 0d molfiles where you could store cis/trans double bonds using wedges:

[john@sentinel:cdk]% /opt/openbabel/bin/obabel -:'C/C=C/C' -omol
==============================
*** Open Babel Warning  in WriteMolecule
  No 2D or 3D coordinates exist. Stereochemical information will be stored using an Open Babel extension. To generate 2D or 3D coordinates instead use --gen2D or --gen3D.

 OpenBabel11092608422D

  4  3  0  0  0  0  0  0  0  0999 V2000
    0.0000    0.0000    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    0.0000    0.0000    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    0.0000    0.0000    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
    0.0000    0.0000    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
  1  2  1  1  0  0  0
  2  3  2  0  0  0  0
  3  4  1  6  0  0  0
M  END
1 molecule converted

🤮

I personal would much prefer a proper extension (new syntax) which allows left/right annotation. Sticking with existing syntax I think a better way to have don it would be with a data sgroup, since you can attach data to sets of atoms:

C=1(C(=CC=C2C=CC=CC12)O)C=1C(=CC=C2C=CC=CC12)O |SgD:0.12:At:@|
C=1(C(=CC=C2C=CC=CC12)O)C=1C(=CC=C2C=CC=CC12)O |SgD:0.12:At:@@|

This is much cleaner but alas RDKit already has it's way so adding another divergent one would be bad. RDKit is uses enough I think it is reasonable to just at it to default CXSMILES.

I think axial stereochemistry in principle can be used with Rac/Rel (atleast RDKit seems to support it:https://www.rdkit.org/docs/RDKit_Book.html#enhanced-stereochemistry), do you want this combination rejected for the moment?

Yes - but there is no way to annotated bonds with the rac/rel (and/or) groups in CXSMILES. In fact this is already an issue as I think OPSIN when we added that as (E/Z)-but-2-ene or (EZ)-but-2-ene also occur. Not Rac/Rel but still a mixture of isomers. We have it stored in the OPSIN internals I think but can't write it out. It's perhaps a place where CML becomes useful again to capture everything. BIOVIA molfiles now support bond rac/rel - not clear if it is just for atropisomers or cis/trans to. Alas I'm not sure if ChemAxon are really that active in adding new things. The data sgroups above is an option.

@dan2097
dan2097 merged commit ea9db83 into dan2097:master Nov 14, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants