-
Notifications
You must be signed in to change notification settings - Fork 845
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
drawing mol with a non zero confID results in bad confID error #7409
Comments
Confirmed. Thanks for the bug report @kekulai-fredchang
|
FWIW: this doesn't happen with the SVG molecule renderer. It seems to be specific to I'll fix the bug in the Cairo rendering code too. |
Fixes rdkit#7409
@greglandrum |
Yes. There is a |
* Fixes rdkit#7414 Fixes rdkit#7409 * skip that test if cairo is not enabled
Describe the bug
Goal is to make a new Chem.Mol of a given conformer in the application of using o3a align to get the best scoring conformer. I followed the description outlined in the rdkit blog post https://greglandrum.github.io/rdkit-blog/posts/2023-02-04-working-with-conformers.html and encountered a bug (or misunderstanding) in the visualization of the mol for the different conformers that do not have id=0.
To Reproduce
notebook as done in and go to last line to render a new molecule with the conformer of interest:
https://greglandrum.github.io/rdkit-blog/posts/2023-02-04-working-with-conformers.html
cp = Chem.Mol(esomeprazole,confId=5)
cp
results in
ValueError: Bad Conformer Id in Chem.Draw
Expected behavior
The draw mol function does a hard assumption that it must be confId=0, but when plucking conformers out of a set, it would be nice to keep its ID so as to maintain its id origin. Could the drawing function take the first conformer to draw?
Alternative drawing tools such as py3dmol will render the conformer correctly since the confId does not seem to be referenced,
The text was updated successfully, but these errors were encountered: