NGLview won't display solvated system
stefdoerr opened this issue ยท 14 comments
- 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
import nglview
nglview.show_structure_file('mol.pdb')
nglview.show_structure_file('smol.pdb')
@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?
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.
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.
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?
no, don't recall. Not sure if worth investigating as it works in the more recent releases. What do you think?
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
NGL.Version
@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.
@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.