2

I am generating an image of a molecule using rdkit in Python. Using from IPython.display import display and display(mol) produces the output image I need. However, when I try saving it using Draw.MolToFile(mol, 'mol.png'), I get an image with incorrect bonds and missing elements.

Is there a way to save the displayed image from Jupyter into a file? I have a few hundred elements, so using 'Save as...' would take too long.

themennice
  • 177
  • 1
  • 9
  • I tried it with a bunch of molecules and the saved images are correct. What version of RDKit do you use? What is your input (e.g. SMILES or Molfile)? Could you provide some code with a sample molecule? – rapelpy Sep 22 '20 at 06:15

0 Answers0