nglviewer / nglview

Jupyter widget to interactively view molecular structures and trajectories
http://nglviewer.org/nglview/latest/
Other
824 stars 134 forks source link

A problem when running html result #1115

Closed lvs0622 closed 1 day ago

lvs0622 commented 4 months ago

image

The result of my visualization on jupyter notebook is that I can play dynamic motion views, however, when I open the html file with nv.write_html, the image becomes static. image

(the html file) image Nothing happens to the image when I press the play button.

hainm commented 4 months ago

Thanks @lvs0622 for reporting.

hainm commented 1 day ago

wow, it turns out user has to explicitly provide frame_range args. nglview doesn't want to write all frames since the data might be big.

nv.write_html('index.html', view, frame_range=(0, 4))