Dear all,
Earlier this year there was a thread that had some suggestions on adding
basic 3D molecular visualization to the RDKit IPython notebook
visualization:
http://www.mail-archive.com/rdkit-discuss%40lists.sourceforge.net/msg03786.html
Yesterday I created a branch in github and did a quick first-pass
implementation of this, borrowing heavily from the openbabel implementation
and also uses Patrick Fuller's imolecule code (
http://patrick-fuller.com/imolecule/)
The code is on the ipython_3dnotebook branch:
https://github.com/rdkit/rdkit/tree/ipython_3dnotebook
At the moment it's pretty simple: if the molecule has a 3D conformer and
the variable IPythonConsole.ipython_3d is True, then a 3D rendering will be
used. Otherwise it uses the standard RDKit 2D rendering. I've attached a
screenshot showing an example.
I'm not particularly happy with the fact that this has to pull the
javascript from github once per session and that it duplicates the actual
rendering code for every molecule. It will probably stay on the branch
until I either find a solution for that or get more comfortable with it.
Feedback and suggestions are definitely welcome, if you want to give the
code a try now, you don't actually need to install the branch: you can just
copy the file:
https://github.com/rdkit/rdkit/blob/ipython_3dnotebook/rdkit/Chem/Draw/IPythonConsole.py
over your existing copy of IPythonConsole.py
Best,
-greg
------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos. Get
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss