Replies: 2 comments 1 reply
-
There's not currently support to get individual tokens from SMILES (or reaction SMILES, your example is a reaction SMILES). |
Beta Was this translation helpful? Give feedback.
-
I'd suggest using the atom highlighting functionality that the RDKit provides. There's a post here with some examples of how to use that: https://rdkit.blogspot.com/2020/10/molecule-highlighting-and-r-group.html |
Beta Was this translation helpful? Give feedback.
-
Hi,
I tried posting on the mailing list but it seems that my message has not yet received an approval yet.
I'm a new user of rdkit and I'm trying to draw molecules from SMILES in a special way which would contain different level of highlighting for "important" parts of the SMILES. Let me explain. Let's say I have this SMILES: CCCO>>CCC=O. I have a predictive algorithm that gives me weights for each symbol, either individual characters (C, C, C, O, >, >, etc.) or tokens (C, C, C, O,>>, etc.). I then would like to highlight a drawing of the given molecule such that the atoms and bonds are highlighted according to their given weights (for instance, weights could be C -> 0.1, C -> 0, C -> 0.3, ">>" -> 0.4, etc.). I saw in the cookbook there was a way to highlight specifc atoms but I have no way to associate the atoms of the SMILES with the associated characters/tokens and even less associate the bonds with the associated characters. So, I try to look at the code but there seems to be no way to insert steps in the parser that would allow me to do this kind of things. Am I wrong?
I hope that I was clear.
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions