nglviewer / nglview

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

write_html seems to be broken #1107

Closed wangenau closed 2 weeks ago

wangenau commented 2 months ago

Hi,

I am back with another bug report. It seems to me, that the write_html function is broken in the 3.1.* versions of nglview. This can simply be tested, e.g., with

import nglview
view = nglview.show_structure_file("test.pdb")
nglview.write_html("index.html", view)

While in version 3.0.8 a working HTML file is produced, starting with version 3.1.0 I only get two Click to show javascript error. messages in the produced HTML.

It seems that some models are missing from the new HTML file, but I have attached the files produced with both versions at the bottom. Maybe you can make more sense out of the diff.

Best wishes, Wanja

html_files.zip

hainm commented 2 months ago

hi @wangenau

It's a known issue with NGL, which is used by nglview: https://github.com/nglviewer/ngl/issues/1014

May be I can make a hack by replacing the latest version to 3.0.8 when writing html file, for now. Cheers