5
$\begingroup$

I'm trying to display some molecules in rdkit and save them as png files. Simple enough. However, when I display them, most of them are drawn at a weird angle (shown below) or even completely upside down. I tried using this section to correct this but no luck. I've looked through similar issues people had but none of them have been properly resolved as far as I can tell.

enter image description here

Does anybody have a solution to this?

Thank you !

$\endgroup$

1 Answer 1

12
$\begingroup$

You can use SetPreferCoordGen(True)

from rdkit import Chem
from rdkit.Chem import rdDepictor
rdDepictor.SetPreferCoordGen(True)

mol = Chem.MolFromSmiles('Fc1ccc2ncccc2c1')
mol

Mol

$\endgroup$
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.