This tutorial shows how to render the unit cell. The asymmetric unit is the smallest portion of a crystal structure to which symmetry operations can be applied in order to generate the complete unit cell (the crystal repeating unit). See PDB-101 tutorial.
import py3Dmol
viewer = py3Dmol.view(query='pdb:4HHB')
viewer.setStyle({'cartoon': {'color': 'spectrum'}})
viewer.show()
You appear to be running in JupyterLab. You need to install the 3dmol extension:
jupyter labextension install jupyterlab_3dmol
Note, this option only shows the boundaries of the unit cell. It does not fill the unit cell.
viewer.addUnitCell()
viewer.zoomTo()
viewer.show()
You appear to be running in JupyterLab. You need to install the 3dmol extension:
jupyter labextension install jupyterlab_3dmol