Created
May 19, 2021 07:05
-
-
Save greglandrum/ad6ec0e9bc3272cd891319f1d81b2686 to your computer and use it in GitHub Desktop.
SMILES atom regex.ipynb
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This regex doesn't handle
*
terms, and it interprets 'Cc' as a single atom term, rather than the two atoms terms 'C' and 'c'.Here's an alternative version which handles both these cases, written using re's "verbose" notation: