Skip to content
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

SMILES: add support for chirality specifiers and E-Z specifiers. #12

Closed
electronicsbyjulie opened this issue May 24, 2022 · 3 comments
Closed
Assignees
Labels
medium priority This should be made working as soon as time permits.

Comments

@electronicsbyjulie
Copy link
Contributor

Chirality is specified using @ or @@ inside a bracketed expression. For example, a SMILES string for l-alanine would be:

N[C@@H](C)C(=O)O

Whereas d-alanine has only one @ and is otherwise the same.

E-Z isomerism is self explanatory; CC/C=C\CCO or CC\C=C/CCO is cis-3-hexen-1-ol or leaf alcohol; the trans isomer could be written either CC/C=C/CCO or CC\C=C\CCO.

@electronicsbyjulie electronicsbyjulie added the medium priority This should be made working as soon as time permits. label May 24, 2022
@electronicsbyjulie
Copy link
Contributor Author

One thing that will help:

Atom::swap_chirality is a public member variable that will be useful in interpreting @ and @@ symbols in SMILES.

@electronicsbyjulie
Copy link
Contributor Author

mol_assem_test 'NC(C)C(=O)O'

...gives l-alanine.

mol_assem_test 'N[C@H](C)C(=O)O'

...currently throws an exception.

electronicsbyjulie pushed a commit that referenced this issue May 26, 2022
electronicsbyjulie pushed a commit that referenced this issue May 26, 2022
@electronicsbyjulie
Copy link
Contributor Author

All of these work now:

mol_assem_test 'N[C@@H](C)C(=O)O'
mol_assem_test 'N[C@H](C)C(=O)O'
mol_assem_test 'CC/C=C/CCO'
mol_assem_test 'CC/C=C\CCO'
mol_assem_test 'CC\C=C\CCO'
mol_assem_test 'CC\C=C/CCO'
mol_assem_test 'CC/C=C\CCOC(=O)c1ccccc(O)1'

c3hexsal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
medium priority This should be made working as soon as time permits.
Projects
None yet
Development

No branches or pull requests

1 participant