r***@gmail.com
2009-12-31 14:37:00 UTC
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
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
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
from rdkit import Chem
from rdkit.Chem import Draw
mol = Chem.MolFromSmiles('c1ccncc1CC(=O)O')
Draw.MolToImageFile(mol,'test.png')
I get this:from rdkit.Chem import Draw
mol = Chem.MolFromSmiles('c1ccncc1CC(=O)O')
Draw.MolToImageFile(mol,'test.png')
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