Wiki‎ > ‎

Rdkit Cairo Fix for Drawing Molecules

posted Apr 18, 2017, 5:00 PM by Dong Xu

from rdkit import Chem
from rdkit.Chem import AllChem
from rdkit.Chem import Draw
AllChem.Compute2DCoords(m)
m = Chem.MolFromSmiles('c1nccc2n1ccc2')
Draw.MolToFile(m,'/tmp/test.png')

Errors pops up for normal users

Go to /garlic/apps/anaconda2/envs/py27_env/lib/python2.7/site-packages/cairo

sudo chmod 644 __init__.py  
sudo chmod 644 __init__.pyc
Comments