We provide a new Python script to visualize a chemical structure using Py3Dmol [1]. You can use this script to visualize protein structures as well. It is explained below.
Contents
Since it is an interactive Python notebook, you can run it in Jupyter Notebook or any other similar software, such as VS Code. The script is simple; you can replace the compound coordinates to visualize your compound under “view.addModel”.
Similarly, to visualize the protein structure, you can load a pdb file from your directory as shown in the script.
Availability
The script is available on GitHub under the package ‘cheminformatics‘. The input is also available, namely, “protein.pdb“.
References
- Avirshup, A. py3Dmol: Python wrapper for 3Dmol.js. https://github.com/avirshup/py3dmol

