old_contents: import py3Dmol
  
  def _view3d(mol):
      """
      draft of function to visualize a molecule embedded in a notebook
      """
      pdb_str = mol.dump_pdb('prot', to_file=False)
      view = py3Dmol.view()
      view.addModel(pdb_str,'pdb')
      view.setStyle({'cartoon':{'color':'orange'}})
      view.zoomTo()
      return view.show()
  
  
new_contents: import nglview as nv
  
  def _view3d(mol):
      """
      Draft of a function to visualize a molecule embedded in a notebook using nlgview
      """
      pdb_str = mol.dump_pdb('prot', to_file=False)
      view = nv.show_text(pdb_str)
      view.update_cartoon(color='#ed7300')
      return view
  
  
subject: use nglview instead of py3d