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

Javascript error with show_mdtraj #1124

Open
VittoriaOssanna opened this issue Nov 7, 2024 · 0 comments
Open

Javascript error with show_mdtraj #1124

VittoriaOssanna opened this issue Nov 7, 2024 · 0 comments

Comments

@VittoriaOssanna
Copy link

Hello everyone,

I am having troubles in visualizing an mdtraj object with nglview.
The code is very short, I was just running a small experiment:

import nglview
import mdtraj

trr = pathlib.Path('./test00/shots0/path000129.trr')
gro = pathlib.Path('./run.gro')

traj = mdtraj.load(str(trr), top=str(gro))
nglview.show_mdtraj(traj)

But shows me a javascript error that I can not define better

 at ph.loadClass (https://file+.vscode-resource.vscode-cdn.net/home/vittoria/.vscode/extensions/ms-toolsai.jupyter-renderers-1.0.19/out/node_modules/%40vscode/jupyter-ipywidgets8/dist/ipywidgets.js:2:4099813)
    at ph.loadClass (https://file+.vscode-resource.vscode-cdn.net/home/vittoria/.vscode/extensions/ms-toolsai.jupyter-renderers-1.0.19/out/node_modules/%40vscode/jupyter-ipywidgets8/dist/ipywidgets.js:2:4403287)
    at ph.loadModelClass (https://file+.vscode-resource.vscode-cdn.net/home/vittoria/.vscode/extensions/ms-toolsai.jupyter-renderers-1.0.19/out/node_modules/%40vscode/jupyter-ipywidgets8/dist/ipywidgets.js:2:4097773)
    at ph._make_model (https://file+.vscode-resource.vscode-cdn.net/home/vittoria/.vscode/extensions/ms-toolsai.jupyter-renderers-1.0.19/out/node_modules/%40vscode/jupyter-ipywidgets8/dist/ipywidgets.js:2:4094616)
    at ph.new_model (https://file+.vscode-resource.vscode-cdn.net/home/vittoria/.vscode/extensions/ms-toolsai.jupyter-renderers-1.0.19/out/node_modules/%40vscode/jupyter-ipywidgets8/dist/ipywidgets.js:2:4092246)
    at ph.handle_comm_open (https://file+.vscode-resource.vscode-cdn.net/home/vittoria/.vscode/extensions/ms-toolsai.jupyter-renderers-1.0.19/out/node_modules/%40vscode/jupyter-ipywidgets8/dist/ipywidgets.js:2:4091039)
    at https://file+.vscode-resource.vscode-cdn.net/home/vittoria/.vscode/extensions/ms-toolsai.jupyter-renderers-1.0.19/out/node_modules/%40vscode/jupyter-ipywidgets8/dist/ipywidgets.js:2:4402511
    at n._handleCommOpen (https://file+.vscode-resource.vscode-cdn.net/home/vittoria/.vscode/extensions/ms-toolsai.jupyter-2024.9.1-linux-x64/dist/webviews/webview-side/ipywidgetsKernel/ipywidgetsKernel.js:3:80955)
    at async n._handleMessage (https://file+.vscode-resource.vscode-cdn.net/home/vittoria/.vscode/extensions/ms-toolsai.jupyter-2024.9.1-linux-x64/dist/webviews/webview-side/ipywidgetsKernel/ipywidgetsKernel.js:3:82830)

I am using

  • nglview version 3.1.2
  • if relevant, the trajectory file is a .trr file produced with gromacs.

Thank you for your support

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

1 participant