Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nglview not showing #1082

Closed
samuelmurail opened this issue Nov 13, 2023 · 9 comments
Closed

Nglview not showing #1082

samuelmurail opened this issue Nov 13, 2023 · 9 comments

Comments

@samuelmurail
Copy link

Hello,

I have issue with nglview widget not showing with show_pdbid or show_file as the demo works well:

Screenshot from 2023-11-13 13-35-07

Cheers,
Samuel

@hainm
Copy link
Collaborator

hainm commented Nov 13, 2023

@samuelmurail Hi, is this is lab or notebook?

@samuelmurail
Copy link
Author

@hainm Hi, this is notebook but I just test it with jupyter-lab and I have the same issue.

Here a list of the conda package I use that might be related to the issue:

ipykernel                 6.26.0             pyhf8b6a83_0    conda-forge
ipympl                    0.9.3              pyhd8ed1ab_0    conda-forge
ipython                   8.16.1             pyh0d859eb_0    conda-forge
ipython_genutils          0.2.0                      py_1    conda-forge
ipywidgets                8.1.1              pyhd8ed1ab_0    conda-forge
jupyter                   1.0.0             pyhd8ed1ab_10    conda-forge
jupyter-lsp               2.2.0              pyhd8ed1ab_0    conda-forge
jupyter_client            8.5.0              pyhd8ed1ab_0    conda-forge
jupyter_console           6.6.3              pyhd8ed1ab_0    conda-forge
jupyter_core              5.5.0           py310hff52083_0    conda-forge
jupyter_events            0.8.0              pyhd8ed1ab_0    conda-forge
jupyter_server            2.9.1              pyhd8ed1ab_0    conda-forge
jupyter_server_terminals  0.4.4              pyhd8ed1ab_1    conda-forge
jupyterlab                4.0.8              pyhd8ed1ab_0    conda-forge
jupyterlab_pygments       0.2.2              pyhd8ed1ab_0    conda-forge
jupyterlab_server         2.25.0             pyhd8ed1ab_0    conda-forge
jupyterlab_widgets        3.0.9              pyhd8ed1ab_0    conda-forge
nglview                   3.0.8              pyh1da8cd4_0    conda-forge
nodejs                    20.8.1               h1990674_0    conda-forge
notebook                  7.0.6              pyhd8ed1ab_0    conda-forge
notebook-shim             0.2.3              pyhd8ed1ab_0    conda-forge
numpy                     1.26.0          py310hb13e2d6_0    conda-forge
python                    3.10.13         hd12c33a_0_cpython    conda-forge
python-dateutil           2.8.2              pyhd8ed1ab_0    conda-forge
python-fastjsonschema     2.18.1             pyhd8ed1ab_0    conda-forge
python-json-logger        2.0.7              pyhd8ed1ab_0    conda-forge
python-tzdata             2023.3             pyhd8ed1ab_0    conda-forge
python_abi                3.10                    4_cp310    conda-forge

@samuelmurail
Copy link
Author

I create a minimal conda env :

mamba create -n tmp nglview jupyter -c conda-forge
 Package                               Version  Build                Channel                    Size
───────────────────────────────────────────────────────────────────────────────────────────────────────
  Install:
───────────────────────────────────────────────────────────────────────────────────────────────────────

  + _libgcc_mutex                           0.1  conda_forge          conda-forge/linux-64     Cached
  + _openmp_mutex                           4.5  2_gnu                conda-forge/linux-64     Cached
  + anyio                                 4.0.0  pyhd8ed1ab_0         conda-forge/noarch       Cached
  + argon2-cffi                          23.1.0  pyhd8ed1ab_0         conda-forge/noarch       Cached
  + argon2-cffi-bindings                 21.2.0  py312h98912ed_4      conda-forge/linux-64       35kB
  + arrow                                 1.3.0  pyhd8ed1ab_0         conda-forge/noarch       Cached
  + asttokens                             2.4.1  pyhd8ed1ab_0         conda-forge/noarch       Cached
  + async-lru                             2.0.4  pyhd8ed1ab_0         conda-forge/noarch       Cached
  + attrs                                23.1.0  pyh71513ae_1         conda-forge/noarch       Cached
  + babel                                2.13.1  pyhd8ed1ab_0         conda-forge/noarch       Cached
  + backports                               1.0  pyhd8ed1ab_3         conda-forge/noarch       Cached
  + backports.functools_lru_cache         1.6.5  pyhd8ed1ab_0         conda-forge/noarch       Cached
  + beautifulsoup4                       4.12.2  pyha770c72_0         conda-forge/noarch       Cached
  + bleach                                6.1.0  pyhd8ed1ab_0         conda-forge/noarch       Cached
  + brotli-python                         1.1.0  py312h30efb56_1      conda-forge/linux-64      351kB
  + bzip2                                 1.0.8  hd590300_5           conda-forge/linux-64     Cached
  + ca-certificates                   2023.7.22  hbcca054_0           conda-forge/linux-64     Cached
  + cached-property                       1.5.2  hd8ed1ab_1           conda-forge/noarch       Cached
  + cached_property                       1.5.2  pyha770c72_1         conda-forge/noarch       Cached
  + certifi                           2023.7.22  pyhd8ed1ab_0         conda-forge/noarch       Cached
  + cffi                                 1.16.0  py312hf06ca03_0      conda-forge/linux-64      295kB
  + charset-normalizer                    3.3.2  pyhd8ed1ab_0         conda-forge/noarch       Cached
  + comm                                  0.1.4  pyhd8ed1ab_0         conda-forge/noarch       Cached
  + debugpy                               1.8.0  py312h30efb56_1      conda-forge/linux-64        3MB
  + decorator                             5.1.1  pyhd8ed1ab_0         conda-forge/noarch       Cached
  + defusedxml                            0.7.1  pyhd8ed1ab_0         conda-forge/noarch       Cached
  + entrypoints                             0.4  pyhd8ed1ab_0         conda-forge/noarch       Cached
  + exceptiongroup                        1.1.3  pyhd8ed1ab_0         conda-forge/noarch       Cached
  + executing                             2.0.1  pyhd8ed1ab_0         conda-forge/noarch       Cached
  + fqdn                                  1.5.1  pyhd8ed1ab_0         conda-forge/noarch       Cached
  + gmp                                   6.3.0  h59595ed_0           conda-forge/linux-64      563kB
  + idna                                    3.4  pyhd8ed1ab_0         conda-forge/noarch       Cached
  + importlib-metadata                    6.8.0  pyha770c72_0         conda-forge/noarch       Cached
  + importlib_metadata                    6.8.0  hd8ed1ab_0           conda-forge/noarch       Cached
  + importlib_resources                   6.1.1  pyhd8ed1ab_0         conda-forge/noarch         30kB
  + ipykernel                            6.26.0  pyhf8b6a83_0         conda-forge/noarch       Cached
  + ipython                              8.17.2  pyh41d4057_0         conda-forge/noarch       Cached
  + ipywidgets                            8.1.1  pyhd8ed1ab_0         conda-forge/noarch       Cached
  + isoduration                         20.11.0  pyhd8ed1ab_0         conda-forge/noarch       Cached
  + jedi                                 0.19.1  pyhd8ed1ab_0         conda-forge/noarch       Cached
  + jinja2                                3.1.2  pyhd8ed1ab_1         conda-forge/noarch       Cached
  + json5                                0.9.14  pyhd8ed1ab_0         conda-forge/noarch       Cached
  + jsonpointer                             2.4  py312h7900ff3_3      conda-forge/linux-64       18kB
  + jsonschema                           4.19.2  pyhd8ed1ab_0         conda-forge/noarch       Cached
  + jsonschema-specifications          2023.7.1  pyhd8ed1ab_0         conda-forge/noarch       Cached
  + jsonschema-with-format-nongpl        4.19.2  pyhd8ed1ab_0         conda-forge/noarch       Cached
  + jupyter                               1.0.0  pyhd8ed1ab_10        conda-forge/noarch       Cached
  + jupyter-lsp                           2.2.0  pyhd8ed1ab_0         conda-forge/noarch       Cached
  + jupyter_client                        8.6.0  pyhd8ed1ab_0         conda-forge/noarch        106kB
  + jupyter_console                       6.6.3  pyhd8ed1ab_0         conda-forge/noarch       Cached
  + jupyter_core                          5.5.0  py312h7900ff3_0      conda-forge/linux-64       92kB
  + jupyter_events                        0.9.0  pyhd8ed1ab_0         conda-forge/noarch         21kB
  + jupyter_server                       2.10.0  pyhd8ed1ab_0         conda-forge/noarch        317kB
  + jupyter_server_terminals              0.4.4  pyhd8ed1ab_1         conda-forge/noarch       Cached
  + jupyterlab                            4.0.8  pyhd8ed1ab_0         conda-forge/noarch       Cached
  + jupyterlab_pygments                   0.2.2  pyhd8ed1ab_0         conda-forge/noarch       Cached
  + jupyterlab_server                    2.25.1  pyhd8ed1ab_0         conda-forge/noarch         49kB
  + jupyterlab_widgets                    3.0.9  pyhd8ed1ab_0         conda-forge/noarch       Cached
  + ld_impl_linux-64                       2.40  h41732ed_0           conda-forge/linux-64     Cached
  + libblas                               3.9.0  19_linux64_openblas  conda-forge/linux-64     Cached
  + libcblas                              3.9.0  19_linux64_openblas  conda-forge/linux-64     Cached
  + libexpat                              2.5.0  hcb278e6_1           conda-forge/linux-64     Cached
  + libffi                                3.4.2  h7f98852_5           conda-forge/linux-64     Cached
  + libgcc-ng                            13.2.0  h807b86a_3           conda-forge/linux-64     Cached
  + libgfortran-ng                       13.2.0  h69a702a_3           conda-forge/linux-64     Cached
  + libgfortran5                         13.2.0  ha4646dd_3           conda-forge/linux-64     Cached
  + libgomp                              13.2.0  h807b86a_3           conda-forge/linux-64     Cached
  + liblapack                             3.9.0  19_linux64_openblas  conda-forge/linux-64     Cached
  + libnsl                                2.0.1  hd590300_0           conda-forge/linux-64     Cached
  + libopenblas                          0.3.24  pthreads_h413a1c8_0  conda-forge/linux-64     Cached
  + libsodium                            1.0.18  h36c2ea0_1           conda-forge/linux-64     Cached
  + libsqlite                            3.44.0  h2797004_0           conda-forge/linux-64     Cached
  + libstdcxx-ng                         13.2.0  h7e041cc_3           conda-forge/linux-64     Cached
  + libuuid                              2.38.1  h0b41bf4_0           conda-forge/linux-64     Cached
  + libzlib                              1.2.13  hd590300_5           conda-forge/linux-64     Cached
  + markupsafe                            2.1.3  py312h98912ed_1      conda-forge/linux-64       27kB
  + matplotlib-inline                     0.1.6  pyhd8ed1ab_0         conda-forge/noarch       Cached
  + mistune                               3.0.2  pyhd8ed1ab_0         conda-forge/noarch       Cached
  + nbclient                              0.8.0  pyhd8ed1ab_0         conda-forge/noarch       Cached
  + nbconvert                            7.11.0  pyhd8ed1ab_0         conda-forge/noarch          8kB
  + nbconvert-core                       7.11.0  pyhd8ed1ab_0         conda-forge/noarch        188kB
  + nbconvert-pandoc                     7.11.0  pyhd8ed1ab_0         conda-forge/noarch          7kB
  + nbformat                              5.9.2  pyhd8ed1ab_0         conda-forge/noarch       Cached
  + ncurses                                 6.4  h59595ed_2           conda-forge/linux-64     Cached
  + nest-asyncio                          1.5.8  pyhd8ed1ab_0         conda-forge/noarch       Cached
  + nglview                               3.0.8  pyh1da8cd4_0         conda-forge/noarch       Cached
  + notebook                              7.0.6  pyhd8ed1ab_0         conda-forge/noarch       Cached
  + notebook-shim                         0.2.3  pyhd8ed1ab_0         conda-forge/noarch       Cached
  + numpy                                1.26.0  py312heda63a1_0      conda-forge/linux-64     Cached
  + openssl                               3.1.4  hd590300_0           conda-forge/linux-64     Cached
  + overrides                             7.4.0  pyhd8ed1ab_0         conda-forge/noarch       Cached
  + packaging                              23.2  pyhd8ed1ab_0         conda-forge/noarch       Cached
  + pandoc                                3.1.3  h32600fe_0           conda-forge/linux-64     Cached
  + pandocfilters                         1.5.0  pyhd8ed1ab_0         conda-forge/noarch       Cached
  + parso                                 0.8.3  pyhd8ed1ab_0         conda-forge/noarch       Cached
  + pexpect                               4.8.0  pyh1a96a4e_2         conda-forge/noarch       Cached
  + pickleshare                           0.7.5  py_1003              conda-forge/noarch       Cached
  + pip                                  23.3.1  pyhd8ed1ab_0         conda-forge/noarch       Cached
  + pkgutil-resolve-name                 1.3.10  pyhd8ed1ab_1         conda-forge/noarch       Cached
  + platformdirs                          4.0.0  pyhd8ed1ab_0         conda-forge/noarch         20kB
  + prometheus_client                    0.18.0  pyhd8ed1ab_0         conda-forge/noarch       Cached
  + prompt-toolkit                       3.0.40  pyha770c72_0         conda-forge/noarch       Cached
  + prompt_toolkit                       3.0.40  hd8ed1ab_0           conda-forge/noarch       Cached
  + psutil                                5.9.5  py312h98912ed_1      conda-forge/linux-64      481kB
  + ptyprocess                            0.7.0  pyhd3deb0d_0         conda-forge/noarch       Cached
  + pure_eval                             0.2.2  pyhd8ed1ab_0         conda-forge/noarch       Cached
  + pycparser                              2.21  pyhd8ed1ab_0         conda-forge/noarch       Cached
  + pygments                             2.16.1  pyhd8ed1ab_0         conda-forge/noarch       Cached
  + pysocks                               1.7.1  pyha2e5f31_6         conda-forge/noarch       Cached
  + python                               3.12.0  hab00c5b_0_cpython   conda-forge/linux-64     Cached
  + python-dateutil                       2.8.2  pyhd8ed1ab_0         conda-forge/noarch       Cached
  + python-fastjsonschema                2.18.1  pyhd8ed1ab_0         conda-forge/noarch       Cached
  + python-json-logger                    2.0.7  pyhd8ed1ab_0         conda-forge/noarch       Cached
  + python_abi                             3.12  4_cp312              conda-forge/linux-64     Cached
  + pytz                           2023.3.post1  pyhd8ed1ab_0         conda-forge/noarch       Cached
  + pyyaml                                6.0.1  py312h98912ed_1      conda-forge/linux-64      197kB
  + pyzmq                                25.1.1  py312h886d080_2      conda-forge/linux-64      529kB
  + qtconsole-base                        5.5.0  pyha770c72_0         conda-forge/noarch        100kB
  + qtpy                                  2.4.1  pyhd8ed1ab_0         conda-forge/noarch       Cached
  + readline                                8.2  h8228510_1           conda-forge/linux-64     Cached
  + referencing                          0.30.2  pyhd8ed1ab_0         conda-forge/noarch       Cached
  + requests                             2.31.0  pyhd8ed1ab_0         conda-forge/noarch       Cached
  + rfc3339-validator                     0.1.4  pyhd8ed1ab_0         conda-forge/noarch       Cached
  + rfc3986-validator                     0.1.1  pyh9f0ad1d_0         conda-forge/noarch       Cached
  + rpds-py                              0.12.0  py312h4b3b743_0      conda-forge/linux-64      985kB
  + send2trash                            1.8.2  pyh41d4057_0         conda-forge/noarch       Cached
  + setuptools                           68.2.2  pyhd8ed1ab_0         conda-forge/noarch       Cached
  + six                                  1.16.0  pyh6c4a22f_0         conda-forge/noarch       Cached
  + sniffio                               1.3.0  pyhd8ed1ab_0         conda-forge/noarch       Cached
  + soupsieve                               2.5  pyhd8ed1ab_1         conda-forge/noarch       Cached
  + stack_data                            0.6.2  pyhd8ed1ab_0         conda-forge/noarch       Cached
  + terminado                            0.18.0  pyh0d859eb_0         conda-forge/noarch         22kB
  + tinycss2                              1.2.1  pyhd8ed1ab_0         conda-forge/noarch       Cached
  + tk                                   8.6.13  noxft_h4845f30_101   conda-forge/linux-64     Cached
  + tomli                                 2.0.1  pyhd8ed1ab_0         conda-forge/noarch       Cached
  + tornado                               6.3.3  py312h98912ed_1      conda-forge/linux-64      830kB
  + traitlets                            5.13.0  pyhd8ed1ab_0         conda-forge/noarch       Cached
  + types-python-dateutil             2.8.19.14  pyhd8ed1ab_0         conda-forge/noarch       Cached
  + typing-extensions                     4.8.0  hd8ed1ab_0           conda-forge/noarch       Cached
  + typing_extensions                     4.8.0  pyha770c72_0         conda-forge/noarch       Cached
  + typing_utils                          0.1.0  pyhd8ed1ab_0         conda-forge/noarch       Cached
  + tzdata                                2023c  h71feb2d_0           conda-forge/noarch       Cached
  + uri-template                          1.3.0  pyhd8ed1ab_0         conda-forge/noarch       Cached
  + urllib3                               2.1.0  pyhd8ed1ab_0         conda-forge/noarch         85kB
  + wcwidth                               0.2.9  pyhd8ed1ab_0         conda-forge/noarch       Cached
  + webcolors                              1.13  pyhd8ed1ab_0         conda-forge/noarch       Cached
  + webencodings                          0.5.1  pyhd8ed1ab_2         conda-forge/noarch       Cached
  + websocket-client                      1.6.4  pyhd8ed1ab_0         conda-forge/noarch       Cached
  + wheel                                0.41.3  pyhd8ed1ab_0         conda-forge/noarch       Cached
  + widgetsnbextension                    4.0.9  pyhd8ed1ab_0         conda-forge/noarch       Cached
  + xz                                    5.2.6  h166bdaf_0           conda-forge/linux-64     Cached
  + yaml                                  0.2.5  h7f98852_2           conda-forge/linux-64     Cached
  + zeromq                                4.3.5  h59595ed_0           conda-forge/linux-64     Cached
  + zipp                                 3.17.0  pyhd8ed1ab_0         conda-forge/noarch       Cached
  + zlib                                 1.2.13  hd590300_5           conda-forge/linux-64     Cached

I still have the same issue with firefox and chromium-browser, I am running ubuntu 22.04. I hope that could help.

Cheers,
Samuel

@hainm
Copy link
Collaborator

hainm commented Nov 14, 2023

@samuelmurail I could reproduce the issue. Let me investigate.

@hainm
Copy link
Collaborator

hainm commented Nov 14, 2023

if I download the 3pqr.pdb to local disk

nv.show_file('./3pqr.pdb') does NOT work
nv.show_structure_file('./3pqr.pdb') work

um

@hainm
Copy link
Collaborator

hainm commented Nov 14, 2023

image

um, does the CIF format has change that NGL (nglview uses it) doesn't know how to parse it?

@samuelmurail
Copy link
Author

Yes I confirm that using show_structure_file() fix the issue.

Cheers,
Samuel

@hainm
Copy link
Collaborator

hainm commented Nov 15, 2023

<deleted. wrong thread>

@hainm
Copy link
Collaborator

hainm commented Jan 14, 2024

nglview.show_file should work properly in 3.1.0 now. If not, please file a new case. Thanks.

@hainm hainm closed this as completed Jan 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants