nglviewer/nglview

Unable to run nglview in my browsers

Ash100 opened this issue · 7 comments

Ash100 commented

Hello, I am sorry for asking such a basic question here. I am trying to run nglview in Jupyter Notebook using Chrome. I am able to run all the scripts successfully without an error, but still unable to visualize anything. Below are the scripts, I tried.
!pip install Bio
!pip install nglview
!pip install "ipywidgets>=7,<8"
`from google.colab import output
output.enable_custom_widget_manager()

import ipywidgets as widgets
from IPython.display import display
import os
import sys
from urllib.request import urlretrieve
import Bio
from Bio import PDB
from Bio import SeqIO, SearchIO, Entrez
from Bio.Seq import Seq
import pylab
import urllib
import pandas as pd
import nglview as nv
from collections import Counter
from Bio.PDB import PDBParser,MMCIFParser urllib.request.urlretrieve('https://files.rcsb.org/download/4I5S.pdb','4I5S.pdb')`
structure = PDB.PDBParser().get_structure("4I5S", "4I5S.pdb")
view=nv.show_biopython(structure) view

I think I am so how unable to successfully enable the third part widgets in chrome, but it is what i am thinking.
I would be thankful, if someone can help fix my issue- i suppose won't be that bigger.
Best Regards,
Ash

hainm commented

hi @Ash100, can you try to use nglview v3.0.6 instead?
There is something wrong with the latest v3.0.7.

hainm commented

I've released 3.0.8. Please try again.

Ash100 commented

Thank you so much. At least I am able now to call nglview but still, I am unable to turn on the gui = True. At times it stays silent while other times, it is asking to enable widgets, though they are enabled and I am not seeing that warning on importing nglview as nv.

hainm commented
Ash100 commented

view.gui_style = 'ngl' --- it works fine and generates GUI controls
view = nv.demo() ---- generates warning message from code snipet "enable_custome_widget_manager
nv.show_biopython(structure, gui=True) ---- visualize structure with out GUI controls

I am trying to drop these three screenshots from the same notebook below
1
2
3

hainm commented
Ash100 commented

Sure. Thank you @hainm for your support. In fact, the problem is solved. You can close the issue.