I am so sorry that my question was unclear and (twisely!) very sorry that I could not understand the syntax  !

My aim is to introduce a crossfade effect between each frame in the ensemble that I iterate using coordset and then save as the movie with the 2 frames per second (so I show every docking pose each half second). So the movie should look like the slow transition between docking poses with this transparency crossfade effect

 And here is my script that I have already tried

movie record

## play DOCKING movie from end to beginning
coordset #1 149,1,-1
perframe "crossfade 2"
wait 149

movie encode format h264 framerate 2 output ./test.mp4

This produces a static image of the first frame with very strange resolution .. do I need to add some option to crossfade to automatically process the current frame and the next one ?

Il giorno lun 27 gen 2025 alle ore 22:33 Elaine Meng <meng@cgl.ucsf.edu> ha scritto:
Hi Enrico,
Why don't you try it??-- movie-making is always a long process of trial and error, we can't always give you the exact commands because situations are different.  Usually I don't know the specifics until I spend an hour actually putting it into an example script myself.  As far as I know, it is possible just like I already explained, except you would do it for every docking position.  So you could make a long script that has a line for each transition (like my previous example), or you might be able to do it in a more compact way using "perframe"

See "making movies" page and detailed help links therein, including "perframe" (which in turn includes several example commands):

<https://rbvi.ucsf.edu/chimerax/docs/user/movies.html>
<https://rbvi.ucsf.edu/chimerax/docs/user/commands/perframe.html>

Elaine
-----
Elaine C. Meng, Ph.D.                       
UCSF Chimera(X) team
Resource for Biocomputing, Visualization, and Informatics
Department of Pharmaceutical Chemistry
University of California, San Francisco


> On Jan 27, 2025, at 12:33 PM, Enrico Martinez via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
>
> And finally is it possible to apply this crossfade effect for each frame on a selection (e g ligand ) in my multi frame ensemble that I record using movie record  ?  This could be useful for visualisation of docking ensembles ( where receptor is the same in all frames ) ..
>
> Le lun. 27 janv. 2025 à 21:29, Enrico Martinez <jmsstarlight@gmail.com> a écrit :
> Hi Elaine !
>
> Today I tried to play with movie crossfade to include this transparency effect between frames but it did not work . Where the command should be actually added ( e.g. inside the movie record … wait x or alternatively after recording and before recording)?
>
> Should I add it for each frame in a loop or there is a more automatic solution e.g to apply it like a filter effect when I record movie using coordset ?
>
> Thank you very much in advance!
>
> Enrico
>
> Le lun. 27 janv. 2025 à 18:21, Elaine Meng <meng@cgl.ucsf.edu> a écrit :
> Hi Enrico,
> Crossfade does not do any movements, it is only like making one image fade (gets more and more transparent) when the next one fades in (gets more and more opaque).
>
> coordset #1 96
> crossfade 60; coordset #1 95; wait 60
>
> The "crossfade" help has more examples
> <https://rbvi.ucsf.edu/chimerax/docs/user/commands/crossfade.html>
>
> There is another command "movie crossfade" that gives basically the same result but is only for when you are recording a movie, since it does not show the crossfade in the graphics window.  So you can use that if you want, you just can't see it "live"
> <https://rbvi.ucsf.edu/chimerax/docs/user/commands/movie.html#crossfade>
>
> If you meant actually moving the atoms gradually, you could try morphing from each position to the next position.  However, you cannot do it with the trajectory, you would need to save the ligand docking ensemble as a multi-model pdb if you don't already have it, then reopen it (then you'd have something like #1.1, #1.2 .... #1.96), and then morph from each one to the next, something like
>
> morph #1.1-96
>
> .... of course there are adjustable parameters to morph, see options in the help
> <https://rbvi.ucsf.edu/chimerax/docs/user/commands/morph.html>
>
> I hope this helps,
> Elaine
> -----
> Elaine C. Meng, Ph.D.                       
> UCSF Chimera(X) team
> Resource for Biocomputing, Visualization, and Informatics
> Department of Pharmaceutical Chemistry
> University of California, San Francisco
>
> > On Jan 27, 2025, at 5:03 AM, Enrico Martinez via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
> >
> > Dear ChimeraX users!
> >
> > I am recording a short animation demonstrating my docking ensemble
> >
> > # start recording
> > movie record
> >
> > ## play DOCKING movie from end to begining
> > coordset #1 96,1,-1
> > wait 96
> >
> > Would it be possible to add a smooth transition between each frame (docking pose) using the movie crossfade command ? If so, how should this command be placed in the script ?
> >
> > Many thanks in advance !
> >
> > Enrico
> > _______________________________________________
> > ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu
> > To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu
> > Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/
>
> _______________________________________________
> ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu
> To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu
> Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/