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

Issue during rendering when using MovieMaker on NGLView #1102

Closed
PieuvreRouge opened this issue Feb 28, 2024 · 6 comments
Closed

Issue during rendering when using MovieMaker on NGLView #1102

PieuvreRouge opened this issue Feb 28, 2024 · 6 comments
Assignees
Labels

Comments

@PieuvreRouge
Copy link

Hello,

I simply tried to reproduce a film from a page of MDAnalysis website in jupyterlab : "https://userguide.mdanalysis.org/stable/examples/analysis/volumetric/density_analysis.html#Analysing-the-density-of-water-around-the-protein"

import MDAnalysis as mda
from MDAnalysis.tests.datafiles import TPR, XTC
from MDAnalysis.analysis import density

import numpy as np
import matplotlib.pyplot as plt
import nglview as nv
%matplotlib inline

u = mda.Universe(TPR, XTC)
view1 = nv.show_mdanalysis(u)
view1.add_representation(
    'licorice',
    selection='resname SOL',
)
view1
from nglview.contrib.movie import MovieMaker
movie = MovieMaker(
    view1,
    step=4,  # keep every 4th step
    render_params={"factor": 3},  # average quality render
    output='density_analysis_images/density_analysis-view1.gif',
)
movie.make()

But after trying to do that, I have the following output :
Rendering ...
without any other indications or error codes.
It sounds like it freezes

Here are the versions of the modules that I use :
numpy 1.26.4 py312heda63a1_0 conda-forge
nglview 3.0.8 pyh1da8cd4_0 conda-forge

I don't think my problem is very complicated to solve. I apologise if this problem has already been discussed elsewhere, but I haven't found a satisfactory answer.

Thank you for any help you can provide.

@hainm
Copy link
Collaborator

hainm commented Mar 2, 2024

Dear @PieuvreRouge
I think I see this issue before (recently) too. I will investigate (no timeline yet).

@hainm
Copy link
Collaborator

hainm commented Mar 3, 2024

@PieuvreRouge please pip install nglview==3.1.2 (latest) and try again. Fixed in #1103.

@qzchen2022
Copy link

Hi,

I encountered the same problem while try to create movie in jupyter lab, even if I have installed the new version. Here is my code environment:

view=nv.show_mdanalysis(u)
movie = MovieMaker(view, fps=24, output='movie.gif', in_memory=True)
movie.make()

nglview.version : 3.1.2
moviepy.version : 1.0.3
imageio.version : 2.34.0
ffmpeg version 6.1.1 Copyright (c) 2000-2023 the FFmpeg developers

@hainm
Copy link
Collaborator

hainm commented Mar 6, 2024 via email

@qzchen2022
Copy link

It works, thank you!

@hainm
Copy link
Collaborator

hainm commented Mar 6, 2024

cheers

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

No branches or pull requests

3 participants