Happy new year, RDKit-ers!
I've installed the latest RDKit on a Fedora 10 system and it seems to be
functioning will except for drawing 2D images of molecules. I have PIL and
aggdraw installed, however when I execute the following:
from rdkit import Chem
from rdkit.Chem import Draw
mol = Chem.MolFromSmiles('c1ccncc1CC(=O)O')
Draw.MolToImageFile(mol,'test.png')
I get this:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/opt/RDKit_Q32009_1/rdkit/Chem/Draw/__init__.py", line 104, in
MolToImageFile
img =
MolToImage(mol,size=size,kekulize=kekulize,wedgeBonds=wedgeBonds,highlightAtoms=highlightAtoms)
File "/opt/RDKit_Q32009_1/rdkit/Chem/Draw/__init__.py", line 50, in
MolToImage
drawer.AddMol(mol,highlightAtoms=highlightAtoms)
File "/opt/RDKit_Q32009_1/rdkit/Chem/Draw/MolDrawing.py", line 398, in
AddMol
highlightIt=(highlightAtoms and idx in highlightAtoms))
File "/opt/RDKit_Q32009_1/rdkit/Chem/Draw/MolDrawing.py", line 270, in
_drawLabel
addCanvasText(canvas,label,(x1,y1),font,color)
File "/opt/RDKit_Q32009_1/rdkit/Chem/Draw/aggCanvas.py", line 75, in
addCanvasText
font = Font(color,faceMap[font.face],size=font.size)
IOError: cannot load font (no text renderer)
I've seen this before on a Red Hat 5 system but it resolved itself after
rebooting the system. Not so in this particular case. I've also googled for
the error messages but haven't found anything useful.
Any ideas?
-Kirk
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss