
You would need to use options for the coordset command and the perframe command to pause for enough frames to let each crossfade complete. The documentation explains these options ("pauseFrames" and "interval"). Here is an example open 8rxe coordset #1 1,10 pause 30 ; perframe crossfade frames 9 interval 29 Tom
On Jan 27, 2025, at 2:22 PM, Elaine Meng via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
It doesn't really make sense to crossfade for 2 frames when you are showing a different docking position every 1 frame. Also 2 frames is so short you wouldn't even be able to see any transition. Keep in mind that the perframe and crossfade frame amounts are the graphics frames (which are something like 60 per second), not the trajectory frames.
My advice is you would not even add the movie record/encode commands until the script shows what you want -- otherwise you are wasting your time.
The long way that I told you would be to repeat the coordset and crossfade commands once for every trajectory frame (not graphics frame). You need the waits so that it won't jump ahead to the other parts until it is done with each transition. This example does 30-frame crossfades.
coordset #1 149 crossfade 30 coordset #1 148; wait 30 crossfade 30 coordset #1 147; wait 30 crossfade 30 coordset #1 146; wait 30 [etc.]
That's the way I know how to do it. It may not be possible to use the perframe command which is per-graphics-frame since you want to have multiple graphics frames for each trajectory frame. In your example there is no room for transitions when the whole script is only 149 graphics frames long.
The long way may be tedious to create the script for, but you can probably write a script to write your script (ha ha). Whichever way seems like the most convenient to you.
Elaine
On Jan 27, 2025, at 1:48 PM, Enrico Martinez via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
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/
_______________________________________________ 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/