SMILE interpreter in python #2087
Answered
by
njzjz
BiocharModeling
asked this question in
Q&A
-
I hope you are doing well. I was wondering if you could clarify to me how the program read the SMILES. Based on the results, for example, the SMILE of the group OH ([H]O) is interpreted in Python as H2O when I post-process the data. But in the HTML file, this SMILE is drawn as OH. What interpretation are you using for the SMILE in Python? Thank you! |
Beta Was this translation helpful? Give feedback.
Answered by
njzjz
Dec 19, 2023
Replies: 1 comment 3 replies
-
The SMILES in Python is generated by RDKit. Sadly, per rdkit/rdkit#6613, RDKit fills all atoms with implicit Hs, and there's no option to disable it. The SMILES in HTML is converted by a regex rule |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
Eipgen
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The SMILES in Python is generated by RDKit. Sadly, per rdkit/rdkit#6613, RDKit fills all atoms with implicit Hs, and there's no option to disable it.
The SMILES in HTML is converted by a regex rule
https://github.com/tongzhugroup/reacnetgenerator/blob/b5a16eb90cdf1eca03738218eba5044d2f151fec/reacnetgenerator/_reachtml.py#L69-L99