Hello,

Just additional question about roll command, I’ve tried to set it in the same way in the coordset: 

Roll x 360 1000 # turn around the object during 1000 frames 
Wait 1000

But did not understand how could I control the speed of the rotation ? 😏

Yours with thanks 

Enrico 

Le ven. 26 avr. 2024 à 17:49, Enrico Martinez <jmsstarlight@gmail.com> a écrit :
Okay thank you very much, this makes sense!

Yours sincerely

Enrico

Il giorno ven 26 apr 2024 alle ore 17:44 Elaine Meng <meng@cgl.ucsf.edu> ha scritto:
"cycle" does not change anything except the number of frames in a cycle of rocking.  It does not change the frame rate, it only changes the number of degrees rotation change between each frame and the next frame.  So the rotation will "look" faster with a lower number of frames per cycle, but that only means the rotation is faster, not the frame rate.  300 frames will take the same amount of time no matter what the cycle value is.  With cycle 10, the rocking will look fast because 30 complete rocking cycles will be included.  With cycle 100, the rocking will look slower because only 3 complete rocking cycles will be included.

And as mentioned before, if you want to end at the same position as the start, you want a complete number of cycles.  300/68 is not an integer so you will not have a complete number of cycles.

Elaine

> On Apr 26, 2024, at 8:35 AM, Enrico Martinez via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
>
> Okay, just to be sure that I am on the right path (I've done several tests but not sure that I am there).
> For instance, I have a 300 snapshot trajectory and would like to use Rock for these 300 frames in the same way
>
> coordset #1 17,317,1
> rock y 45 300 cycle 68
> wait 300
>
> Does it mean that the cycle 68 (tvisely less than the default value) makes the frequence of the rotations 2 times slower for the whole period of 300 frames (should be 12 secs) ?
>
> Many thanks in advance!
>
> Il giorno ven 26 apr 2024 alle ore 17:26 Elaine Meng <meng@cgl.ucsf.edu> ha scritto:
> I admit that "wait" often confuses me too.  I usually just do it by trial and error, changing the script until it does what I want, playing it over and over.  But "coordset" has the same isse as the movement commands, it generally also needs a wait unless you want it to happen at the same time as the commands after it, in this case rock.
>
> For "rock" I think you misunderstood "cycle" ... "cycle" is not the total number of image frames, it is the number of frames per cycle.  If you want 1000 frames of motion total you would use this command instead.
>
> rock x 30 1000
>
> Since one cycle has 136 frames by default, however, this does not end with the molecule in the same position as the start.  You would need to use a multiple of 136, or change the number of frames per cycle to something that goes evenly into 1000 (e.g. 250).
>
> See "rock" usage and explanation of its options
> <https://rbvi.ucsf.edu/chimerax/docs/user/commands/rock.html>
>
> Some commands are smart enough so that they only need "wait" afterwards to wait for the whole command to finish instead of "wait N", but it is not consistent for all commands.
>
> I hope this helps,
> Elaine
>
> > On Apr 26, 2024, at 8:10 AM, Enrico Martinez <jmsstarlight@gmail.com> wrote:
> >
> > Thank you very much Elaine !
> > Actually I've already looked at this page but without some examples it's a bit tricky to understand the proper syntax.
> > So, for example if I incorporate one of those commands in the context of my script, do I need to add WAIT after each , e.g.
> >
> > coordset #1 1,1000,1
> > rock x 30 cycle 1000
> > wait 1000
> >
> > Many thanks in advance
> >
> > Enrico
> >
> > Il giorno ven 26 apr 2024 alle ore 17:04 Elaine Meng <meng@cgl.ucsf.edu> ha scritto:
> > Yes. There are several movement commands "move" (translate), "roll" or "turn" (rotate), and "rock" (rotate back and forth) as well as "view" to save different views and gradually transition between them.  These all have "frame" options to do the motion over a specified number of image update frames and are commonly used in movie scripting.
> >
> > See "making movies" and the list of related commands with links to their help pages, as well as various other movie script examples also linked to the page.
> > <https://rbvi.ucsf.edu/chimerax/docs/user/movies.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 Apr 26, 2024, at 6:08 AM, Enrico Martinez via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
> > >
> > > Dear Chimera-X users !
> > >
> > > I would like to add some cinematographic effects such as changing the camera angle back and forth during a short recording time of MD movies.  Could you suggest some scripting tricks that I could add to the following coordset routine:
> > >
> > > # start recording
> > > movie record size 3840,2160 supersample 1
> > >
> > > ## play movie from beginning to the end
> > > coordset #1 1,1000,1
> > > wait 1000
> > >
> > > etc
> > >
> > > Would it be possible to bend the camera automatically e.g. during the first 250 steps of recording ? Any other possibilities ?
> > >
> > > Yours with thanks
> > >
> > > 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/