Hello,
I just installed RDKit on Windows7, with the intention of
using it from IPython.
I installed python 2.7 for AMD64 (the one distributed by ActiveState).
I ran"ipython notebook", opened a new notebook and typed the following
commands
/from// //rdkit// //import// //Chem//
//from// //rdkit.Chem.Draw// //import// //IPythonConsole//
//from// //rdkit.Chem// //import// //AllChem//
//from// //rdkit.Chem// //import// //Draw//
//
//m = Chem.MolFromSmiles('c1ccccc1')//
//AllChem.Compute2DCoords(m)//
/
then
/print Chem.MolToMolBlock(m) gives//
/
RDKit 2D
6 6 0 0 0 0 0 0 0 0999 V2000
1.5000 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
0.7500 -1.2990 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
-0.7500 -1.2990 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
-1.5000 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
-0.7500 1.2990 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
0.7500 1.2990 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
1 2 2 0
2 3 1 0
3 4 2 0
4 5 1 0
5 6 2 0
6 1 1 0
M END
that looks good.
But I hoped that
/m//
/
would draw a depiction. I got
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
C:\Python27\lib\site-packages\IPython\core\formatters.pyc in__call__(self, obj)
332 method= _safe_get_formatter_method(obj,
self.print_method)
333 if methodis not None:
--> 334 return method()
335 return None
336 else:
C:\RDKit_2015_03_1\rdkit\Chem\Draw\IPythonConsole.pyc in_toPNG(mol)
98 highlightAtoms=highlightAtoms)
99 bio= BytesIO()
--> 100 img.save(bio,format='PNG')
101 return bio.getvalue()
102
C:\Python27\lib\site-packages\PIL\Image.pyc insave(self, fp, format, **params)
1682 except KeyError:
1683 init()
-> 1684 save_handler= SAVE[format.upper()] # unknown format
1685
1686 if isPath(fp):
KeyError: 'PNG'
Out[4]:
<rdkit.Chem.rdchem.Mol at 0x457ba70>
I installed a lot of python modules recently :-)
Any idea about the one I missed?
Many thanks in advance,
Jean-Marc
--
Dr. Jean-Marc Nuzillard
Institute of Molecular Chemistry
CNRS UMR 7312
Moulin de la Housse
CPCBAI, Bâtiment 18
BP 1039
51687 REIMS Cedex 2
France
Tel : 33 3 26 91 82 10
Fax :33 3 26 91 31 66
http://www.univ-reims.fr/ICMR
http://eos.univ-reims.fr/LSD/
http://eos.univ-reims.fr/LSD/JmnSoft/
------------------------------------------------------------------------------
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss