nglviewer / nglview

Jupyter widget to interactively view molecular structures and trajectories

Home Page:http://nglviewer.org/nglview/latest/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Display NGLViewer when kernel is running

GregorySchwing opened this issue · comments

  • Question about usage? I am unable to see the view unless I stop the kernel. It simple says "nothing" and a blank white screen. then when I stop the kernel, it shows. I can bypass this by running each cell individually, but I'd rather not.

  • Version report

print(nglview.__version__)'
3.0.8
print(ipywidgets.__version__)'
7.7.2

Thanks for reporting. It's weird. Noted.

#901 (comment)

I guess this is the full description?

GregorySchwing
I have a working installation of nglview using jupyter lab. My problem is i'd like to be able to "Restart Kernel and Run all Cells" and see the nglview as the cells are run, however, the views aren't displayed until after all the kernels finish or I stop the kernel. Is there anyway to get my desired behavior?

GregorySchwing I have a working installation of nglview using jupyter lab. My problem is i'd like to be able to "Restart Kernel and Run all Cells" and see the nglview as the cells are run, however, the views aren't displayed until after all the kernels finish or I stop the kernel. Is there anyway to get my desired behavior?

yes that is the full description

although this was actually done in notebook not lab

@GregorySchwing I have been thinking about this and I think it's not about nglview but about Python in general. When clicking "Restart Kernel and Run all Cells" , the python codes will be run in a single thread and blocks other threads to run. So the run must be finished to display anything.

(My educated guess).