<jupyter_start><jupyter_text>Trying with py3Dmolto install: pip install py3Dmolsee [here](http://nbviewer.jupyter.org/github/3dmol/3Dmol.js/blob/9050b97144e81f065df7eecc87ba9a16723ab14b/py3Dmol/examples.ipynb) for some examples:<jupyter_code>import py3Dmol
view = py3Dmol.view(query='pdb:2POR')
#view.setStyle({'cartoon':{'color':'spectrum'}})
view.setStyle({'stick':{'color':'spectrum'}})
view<jupyter_output><empty_output><jupyter_text>This notebook can be easily viewed with nbviewer [here](http://nbviewer.jupyter.org/github/ageller/EmeryInteractive/blob/master/test3Dmol.ipynb?flush_cache=true)  3Dmol is also easily embedded in htmlhttp://3dmol.csb.pitt.edu/doc/tutorial-url.html(It's not necessary to do this through python, but I'm including it here as a complete example)This is hosted on GitHub [here](https://ageller.github.io/EmeryInteractive/).<jupyter_code>text = """<html>
<head>
    <script src="https://3Dmol.csb.pitt.edu/build/3Dmol-min.js"></script>
</head>
<body>
    <div style="height: 400px; width: 400px; position: relative;" class='viewer_3Dmoljs' data-pdb='2POR' data-backgroundcolor='0xffffff' data-style='stick'></div>
</body>
</html>
"""

file =open("index.html", "w")
file.write(text)
file.close()


!open index.html<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.16300940438871472, 'fraction_numerical': 0.03683385579937304, 'mean_word_length': 7.082278481012659, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '295740', 'license': 'MIT', 'n_tokens_mistral': 530, 'n_tokens_neox': 485, 'n_words': 79, 'path': 'test/test3Dmol.ipynb', 'repo_name': 'ageller/EmeryInteractive', 'size': '1276'}