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 won't display solvated system #633

Closed
stefdoerr opened this issue Jul 12, 2017 · 14 comments
Closed

NGLview won't display solvated system #633

stefdoerr opened this issue Jul 12, 2017 · 14 comments

Comments

@stefdoerr
Copy link
Contributor

  • Version report
[sdoerr@loro Wed12:38 Downloads] python -c 'import nglview; print(nglview.__version__)'
0.6.5
[sdoerr@loro Wed12:40 Downloads] python -c 'import ipywidgets; print(ipywidgets.__version__)'
5.2.2

Hi, I'm trying to visualize a solvated system but it doesn't show anything. No protein, no ligand, no water. I tried deleting all configurations in .local/share/ and .jupyter and reinstalling conda from scratch and nglview as well and it still won't show anything.

I attach the two files. mol.pdb works fine. smol.pdb doesnt show anything

files.zip

import nglview
nglview.show_structure_file('mol.pdb')
nglview.show_structure_file('smol.pdb')
@hainm
Copy link
Collaborator

hainm commented Jul 12, 2017

@arose The current NGL version in nglview is 0.10.3. I tested smol.pdb in v0.10.4 here: http://nglviewer.org/ngl/ and work fine. Do you still keep 0.10.3 online?

@arose
Copy link
Collaborator

arose commented Jul 13, 2017

I will have a look.

I don't keep older version of the webapp running. However you can create a CodePen and load an older release of NGL.

@arose
Copy link
Collaborator

arose commented Jul 13, 2017

Works fine with the current dev version as well. I suspect this is an issue with the default representation in 0.10.3, I made some changes for 0.10.4 regarding that.

@hainm
Copy link
Collaborator

hainm commented Jul 13, 2017

it's not representation issue (try to clear and add lines/licorices but does not work). may be due to unsuccessful creation of Structure (or Component). Recal any of this?

@arose
Copy link
Collaborator

arose commented Jul 13, 2017

no, don't recall. Not sure if worth investigating as it works in the more recent releases. What do you think?

@hainm
Copy link
Collaborator

hainm commented Jul 13, 2017

I asked because I tried with latest version in npm (v0.10.4) but still can not resolve the issue.

Or may be because of caching in web browser when I built JS. What syntax to know NGL version?

NGL.__version__

?
:d

@arose
Copy link
Collaborator

arose commented Jul 13, 2017

NGL.Version

@hainm
Copy link
Collaborator

hainm commented Jul 14, 2017

@arose I dig deeper and here is the different

NOT work

nglview.show_structure_file('smol.pdb')

Work

view = nglview.NGLWidget()
view

view.add_component('./smol.pdb')

The 1st used blob while the 2nd load from filename.

@hainm
Copy link
Collaborator

hainm commented Jul 14, 2017

blob

@hainm
Copy link
Collaborator

hainm commented Jul 14, 2017

@hainm
Copy link
Collaborator

hainm commented Jul 23, 2017

@stefdoerr which notebook version you are using?

I think the v5 version restricts how much data will be sent from Python to frontend (JS).

[I 23:30:42.996 NotebookApp] Adapting to protocol v5.1 for kernel a100ee13-f7eb-4e2a-9bbe-e400bdcfd828
[W 23:31:10.938 NotebookApp] IOPub data rate exceeded.
    The notebook server will temporarily stop sending output
    to the client in order to avoid crashing it.
    To change this limit, set the config variable
    `--NotebookApp.iopub_data_rate_limit`.

I think your solvated system (4 MB) is pretty big for notebook v5. I am not sure what we can do. uhm.

@hainm
Copy link
Collaborator

hainm commented Jul 23, 2017

@hainm
Copy link
Collaborator

hainm commented Jul 23, 2017

Here is dirty solution

jupyter notebook --NotebookApp.iopub_data_rate_limit=10000000

hey

@hainm
Copy link
Collaborator

hainm commented Jul 23, 2017

Just tried with notebook v 5.1.0.dev. Works fine without doing above trick.

nb5 1 0

Close the issue now.

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

3 participants