title: How to run interactive jmol or jsmol object in ipython notebook
body: <p>I want to make a presentation for a seminar and I would like to show a protein structure interactively (3D rotation, maybe even changing the model it is shown in, like cartoon, wireframe, ball &amp; stick, ...)</p>
  
  <p>I want this to be inline, not in separate window or file.</p>
  
  <p>I can think about two possible solutions.</p>
  
  <p>One would be to just call a software that outputs inline to the notebook, so let's say I run Jmol with my input file through bash and then manipulate the whole thing from the notebook (Note that I'm using ipython notebook, but I'm willing to install jupyter or any other stuff if that's needed for the solution). This would be awsome especially if I could use it with any other software, but I don't think it easy and it might not even be possible.</p>
  
  <p>The other way would be to link to an already running jmol or jsmol object in the same browser, different tab, and show the same thing in notebook inline and rotate it from there as I present. 
  I'm thinking that this is more likely to be possible, since both are running in the same browser and both know html and javascript so there is a common language. (I don't know too much about HTML, javascript or php, but I think it is possible to do it)</p>
  
  <p>If you open this link:</p>
  
  <p><a href="http://www.rcsb.org/pdb/explore/jmol.do?structureId=1A0K&amp;bionumber=1" rel="nofollow noreferrer">http://www.rcsb.org/pdb/explore/jmol.do?structureId=1A0K&amp;bionumber=1</a></p>
  
  <p>You will see the rotatable object. If I run Firebug to examine this object it gives me:</p>
  
  <p>canvas id="jmolApplet0_canvas2d" style="width: 100%; height: 100%; z-index: 9002; cursor: default;" width="600" height="600"</p>
  
  <p>but this is not much of use for me, because I don't understand it. It looks like XML code and like input to a function or a class, but I have no idea how I could run this inside my notebook presentation.</p>
  
  <p>I was also trying to save the object and then parse it using python, but that only gives me the points of the 3D object, and will not colour it or give surface to the objects, or at least I don't know how to that. (I'm talking about VRML)</p>
  
  <p>For running inline things in ipython notebook, I've found:</p>
  
  <p>%matplotlib nbagg</p>
  
  <p>to be working, but nothing else.</p>
  
  <p>Any help is appreciated.</p>
  
  <p>I'm using python3, ipython3 notebook, ubuntu 16.04, firefox but I can install anything that would solve my problem, even use windows in virtualbox if I have to.</p>