Thanks for that. Now I understand what's going on. The short-term solution is to do: from rdkit.Chem.Draw import IPythonConsole IPythonConsole.ipython_useSVG=True
Explanation of what's going on: The new RDKit drawing code can optionally use cairo natively (does not require pycairo). This is what is used by default in Jupyter. However, if the RDKit was not built with cairo support, this falls back to the old drawing code, which gives those horrible jagged renderings. If you set IPythonConsole.ipython_useSVG=True then it will always use the new drawing code and the better (non-jagged) drawings. The current RDKit windows conda builds do not (due to technical reasons that I think are no longer valid) have the cairo support. I should hopefully be able to fix this with the next release. I will also look into making IPythonConsole.ipython_useSVG=True the default for the next release, so even if the cairo thing doesn't work you will get good drawings by default. Thanks for the help here! -greg On Tue, Oct 9, 2018 at 1:42 PM MARIA BRANDL <m.bra...@btinternet.com> wrote: > Hello Greg, > > To simplify things, I was using your UGM talk: > > https://github.com/rdkit/UGM_2018/blob/master/Notebooks/Landrum_Whats_New.ipynb > Without pycairo, executing: > > from rdkit import Chemfrom rdkit.Chem import rdDepictorfrom rdkit.Chem.Draw > import IPythonConsole > > In [2]: > > epinephrine = Chem.MolFromSmiles('CNC[C@H](O)c1ccc(O)c(O)c1')epinephrine > > > > results in: > > Warning: unable to load font metrics from dir > C:\Users\Maria\Anaconda3\envs\rdkit-env\lib\site-packages\rdkit\sping\PIL\pilfonts > > and low resolution rendering > > > "conda list" produces: > > > # packages in environment at C:\Users\Maria\Anaconda3\envs\rdkit-env: > # > # Name Version Build Channel > backcall 0.1.0 py36_0 > blas 1.0 mkl > cairo 1.14.12 hf171d8a_3 > certifi 2018.8.24 py36_1 > colorama 0.3.9 py36h029ae33_0 > decorator 4.3.0 py36_0 > freetype 2.9.1 ha9979f8_1 > icc_rt 2017.0.4 h97af966_0 > icu 58.2 ha66f8fd_1 > intel-openmp 2019.0 118 > ipykernel 5.0.0 py36h39e3cac_0 > ipython 7.0.1 py36h39e3cac_0 > ipython_genutils 0.2.0 py36h3c5d0ee_0 > jedi 0.12.1 py36_0 > jpeg 9b hb83a4c4_2 > jupyter_client 5.2.3 py36_0 > jupyter_core 4.4.0 py36_0 > libboost 1.65.1 he51fdeb_4 > libpng 1.6.34 h79bbb47_0 > libsodium 1.0.16 h9d3ae62_0 > libtiff 4.0.9 h36446d0_2 > mkl 2019.0 118 > mkl_fft 1.0.6 py36hdbbee80_0 > mkl_random 1.0.1 py36h77b88f5_1 > numpy 1.15.2 py36ha559c80_0 > numpy-base 1.15.2 py36h8128ebf_0 > olefile 0.46 py36_0 > pandas 0.23.4 py36h830ac7b_0 > parso 0.3.1 py36_0 > pickleshare 0.7.5 py36_0 > pillow 5.3.0 py36hdc69c19_0 > pip 10.0.1 py36_0 > pixman 0.34.0 hcef7cb0_3 > prompt_toolkit 2.0.5 py36_0 > py-boost 1.65.1 py36h6538335_4 > pygments 2.2.0 py36hb010967_0 > python 3.6.6 hea74fb7_0 > python-dateutil 2.7.3 py36_0 > pytz 2018.5 py36_0 > pyzmq 17.1.2 py36hfa6e2cd_0 > rdkit 2018.03.4.0 py36hc0590b6_1 rdkit > setuptools 40.4.3 py36_0 > simplegeneric 0.8.1 py36_2 > six 1.11.0 py36_1 > tk 8.6.8 hfa6e2cd_0 > tornado 5.1.1 py36hfa6e2cd_0 > traitlets 4.3.2 py36h096827d_0 > vc 14.1 h0510ff6_4 > vs2015_runtime 14.15.26706 h3a45250_0 > wcwidth 0.1.7 py36h3d5aa90_0 > wheel 0.32.0 py36_0 > wincertstore 0.2 py36h7fe50ca_0 > zeromq 4.2.5 he025d50_1 > zlib 1.2.11 h8395fce_2 > > > Re-installing pycairo sorts out the problem, nice render - no warning. > > I do not mind the issue going back to the mailing list or github. > > Many thanks, > Maria > >
_______________________________________________ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss