%%html
<table>
<tr>
<td id="left"></td><td>This is benzene</td>
</tr>
</table>
This is benzene |
cd build/lib
/home/dkoes/git/3Dmol.js/py3Dmol/build/lib
import py3Dmol
benz='''
RDKit 3D
6 6 0 0 0 0 0 0 0 0999 V2000
-0.9517 0.7811 -0.6622 C 0 0 0 0 0 0 0 0 0 0 0 0
0.2847 1.3329 -0.3121 C 0 0 0 0 0 0 0 0 0 0 0 0
1.2365 0.5518 0.3512 C 0 0 0 0 0 0 0 0 0 0 0 0
0.9517 -0.7811 0.6644 C 0 0 0 0 0 0 0 0 0 0 0 0
-0.2847 -1.3329 0.3144 C 0 0 0 0 0 0 0 0 0 0 0 0
-1.2365 -0.5518 -0.3489 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
$$$$'''
view = py3Dmol.view()
view.addModel(benz,'sdf')
view.setStyle({'stick':{}})
view.zoomTo()
view.insert('left')
You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
jupyter labextension install jupyterlab_3dmol
import py3Dmol
pwd
u'/home/dkoes/git/3Dmol.js/py3Dmol'