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 does not work in Colab #11

Open
sef43 opened this issue Jul 18, 2023 · 3 comments
Open

nglview does not work in Colab #11

sef43 opened this issue Jul 18, 2023 · 3 comments

Comments

@sef43
Copy link
Contributor

sef43 commented Jul 18, 2023

The nglview package does not work when running the notebooks in Colab. It would be great to have it working so people can quickly visualize the molecules/trajectories directly in the jupyter notebook.

@jmichel80
Copy link
Collaborator

could py3Dmol be a viable alternative?

@sef43
Copy link
Contributor Author

sef43 commented Jul 26, 2023

Using a fix suggested by Toni from here: https://github.com/CCPBioSim/CCP5_Simulation_of_BioMolecules/blob/main/5_Analysis_DR_clustering/3_clustering.ipynb

mamba install ipywidgets=7.6.0 and

# enable third party jupyter widgets
from google.colab import output
output.enable_custom_widget_manager()

allows nglview to display molecules correctly.
However, the trajectory player does not work. It just shows the first frame and will not play the trajectory. This seems to be a know issue with colab and nglview. See here: nglviewer/nglview#995 and here: googlecolab/colabtools#2853

@sef43
Copy link
Contributor Author

sef43 commented Jul 27, 2023

py3Dmol looks like it is based around showing a single frame not a playable trajectory. It can be used to show a trajectory animation but it will not be interactive and the boilerplate code it somewhat substantial.

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