-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhanced stereochemistry support #140
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…Rac(emic) or Rel(ative). We don't need numbered groups (e.g. &1, &2) because IUPAC doesn't currently have away to specify this (to my knowledge). SMILES output does what it always did, CXSMILES includes the extra information. SRac/SRel flags could be activated to generate a non-standard InChI.
…h a tab then has some spaces.
…the element we can just store RS as R (group=Rac) and S (group=Rac). This also then mirros the relative case where "R*" was stemmed to "R".
…and (S)-" is worth supporting via OPSIN.
Thanks looks good, as discussed a few small changes would be good:
|
…maybe should have a warning?
…can specify these in standard InChIs.
…up descriptors and apply them last.
…e information wasn't really there in the first place. Also detect and avoid the issue with cyclo-propane.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds a new "stereo group" field to stereogenic atoms, the group can either be Rac(emic), Rel(ative), or Abs(olute). Normally enhanced stereo support has sub-groups, e.g. Rac1/&1, Rac2/&2, etc however to my knowledge there is no official way to represent these in IUPAC - maybe one could infer it with bracket nesting. I think more likely is the most common use cases would be mixing the different groups rather than different sub-groups and that is supported by IUPAC. For example it makes sense you can have some atoms with absolute stereo and some as racemic and/or relative.
|r|
as the "relative flag", however it's interpretation is to be as though the MOLfile chiral flag is 0. BIOVIA document that these cases should be read as racemic (see Page 251). So I think ChemAxon just goofed it up - note they also distinguish ABS from normal SMILES stereo when matching which doesn't make sense - oh well. Anyways as you can see if all atoms end up being&1
we emit ar
as it is cleaner but perhaps given the possibly ambiguity may be confusing.Examples
Here are some generated outputs (running live on CDK depict).
(rac)-1-phenylethan-1-ol
(1R*,2S*)-2-(methylamino)-1-phenylpropan-1-ol
(1RS,2S)-2-(methylamino)-1-phenylpropan-1-ol
(1R and S)-1-(1-pentyl-1H-pyrazol-5-yl)ethanol