Cinematographic effects in MD movie recording

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

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

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

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

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

"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/

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/

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/

The "angle" value in the usage line is how fast the rotation appears. It is the amount of rotation for EACH frame. So your command "roll x 360 1000" is wrong, assuming you do not want a whole 360 degree rotation per each frame. In fact that will look like no rotation at all. Please read the help, because this is explained in the first sentence right under the usage: <https://rbvi.ucsf.edu/chimerax/docs/user/commands/roll.html> If you want a single rotation of 360 degrees over 1000 frames you would need an angle value of 360/1000 = 0.36 roll x 0.36 1000 I hope this helps, Elaine
On Apr 27, 2024, at 12:40 AM, Enrico Martinez <jmsstarlight@gmail.com> wrote:
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

Thank you very much Elaine !! So in this case roll x 0.36 1000 the second value (0.36) will corresponds to the rotation speed ? E.g. it will be two times faster (two rotations), if I set it to 0.72 with the same number of frames (1000), right ? Yours with thanks Enrico Il giorno dom 28 apr 2024 alle ore 18:28 Elaine Meng <meng@cgl.ucsf.edu> ha scritto:
The "angle" value in the usage line is how fast the rotation appears. It is the amount of rotation for EACH frame. So your command "roll x 360 1000" is wrong, assuming you do not want a whole 360 degree rotation per each frame. In fact that will look like no rotation at all.
Please read the help, because this is explained in the first sentence right under the usage:
<https://rbvi.ucsf.edu/chimerax/docs/user/commands/roll.html>
If you want a single rotation of 360 degrees over 1000 frames you would need an angle value of 360/1000 = 0.36
roll x 0.36 1000
I hope this helps, Elaine
On Apr 27, 2024, at 12:40 AM, Enrico Martinez <jmsstarlight@gmail.com> wrote:
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

Yes. But it is easy to put in the number and see for yourself, instead of asking me! Elaine
On May 16, 2024, at 8:20 AM, Enrico Martinez via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Thank you very much Elaine !! So in this case roll x 0.36 1000 the second value (0.36) will corresponds to the rotation speed ? E.g. it will be two times faster (two rotations), if I set it to 0.72 with the same number of frames (1000), right ? Yours with thanks Enrico
Il giorno dom 28 apr 2024 alle ore 18:28 Elaine Meng <meng@cgl.ucsf.edu> ha scritto: The "angle" value in the usage line is how fast the rotation appears. It is the amount of rotation for EACH frame. So your command "roll x 360 1000" is wrong, assuming you do not want a whole 360 degree rotation per each frame. In fact that will look like no rotation at all.
Please read the help, because this is explained in the first sentence right under the usage:
<https://rbvi.ucsf.edu/chimerax/docs/user/commands/roll.html>
If you want a single rotation of 360 degrees over 1000 frames you would need an angle value of 360/1000 = 0.36
roll x 0.36 1000
I hope this helps, Elaine
On Apr 27, 2024, at 12:40 AM, Enrico Martinez <jmsstarlight@gmail.com> wrote:
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/

Hello Elaine, Thank you very much for your reply ! in fact, I am working on a rather slow machine and the production of the animation will take 72 hours, so sometimes I ought to ask in order to make things more intuitive. I am very sorry for the confusion ! Yours sincerely Erico Il giorno gio 16 mag 2024 alle ore 18:06 Elaine Meng <meng@cgl.ucsf.edu> ha scritto:
Yes. But it is easy to put in the number and see for yourself, instead of asking me!
Elaine
On May 16, 2024, at 8:20 AM, Enrico Martinez via ChimeraX-users < chimerax-users@cgl.ucsf.edu> wrote:
Thank you very much Elaine !! So in this case roll x 0.36 1000 the second value (0.36) will corresponds to the rotation speed ? E.g. it will be two times faster (two rotations), if I set it to 0.72 with the same number of frames (1000), right ? Yours with thanks Enrico
Il giorno dom 28 apr 2024 alle ore 18:28 Elaine Meng <meng@cgl.ucsf.edu> ha scritto: The "angle" value in the usage line is how fast the rotation appears. It is the amount of rotation for EACH frame. So your command "roll x 360 1000" is wrong, assuming you do not want a whole 360 degree rotation per each frame. In fact that will look like no rotation at all.
Please read the help, because this is explained in the first sentence right under the usage:
<https://rbvi.ucsf.edu/chimerax/docs/user/commands/roll.html>
If you want a single rotation of 360 degrees over 1000 frames you would need an angle value of 360/1000 = 0.36
roll x 0.36 1000
I hope this helps, Elaine
On Apr 27, 2024, at 12:40 AM, Enrico Martinez <jmsstarlight@gmail.com> wrote:
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/

I have one more question that could fall in the category of cinematographic effects: assuming I operate with a very big structure keeping the camera in the fixed position with a big zoom. Would it be possible to translate the camera from this reference position towards some selected direction at a selected distance ? If so, what command should handle it ? Many thanks in advance Enrico Il giorno ven 17 mag 2024 alle ore 10:00 Enrico Martinez < jmsstarlight@gmail.com> ha scritto:
Hello Elaine,
Thank you very much for your reply ! in fact, I am working on a rather slow machine and the production of the animation will take 72 hours, so sometimes I ought to ask in order to make things more intuitive. I am very sorry for the confusion !
Yours sincerely
Erico
Il giorno gio 16 mag 2024 alle ore 18:06 Elaine Meng <meng@cgl.ucsf.edu> ha scritto:
Yes. But it is easy to put in the number and see for yourself, instead of asking me!
Elaine
On May 16, 2024, at 8:20 AM, Enrico Martinez via ChimeraX-users < chimerax-users@cgl.ucsf.edu> wrote:
Thank you very much Elaine !! So in this case roll x 0.36 1000 the second value (0.36) will corresponds to the rotation speed ? E.g. it will be two times faster (two rotations), if I set it to 0.72 with the same number of frames (1000), right ? Yours with thanks Enrico
Il giorno dom 28 apr 2024 alle ore 18:28 Elaine Meng <meng@cgl.ucsf.edu> ha scritto: The "angle" value in the usage line is how fast the rotation appears. It is the amount of rotation for EACH frame. So your command "roll x 360 1000" is wrong, assuming you do not want a whole 360 degree rotation per each frame. In fact that will look like no rotation at all.
Please read the help, because this is explained in the first sentence right under the usage:
<https://rbvi.ucsf.edu/chimerax/docs/user/commands/roll.html>
If you want a single rotation of 360 degrees over 1000 frames you would need an angle value of 360/1000 = 0.36
roll x 0.36 1000
I hope this helps, Elaine
On Apr 27, 2024, at 12:40 AM, Enrico Martinez <jmsstarlight@gmail.com> wrote:
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/

Yes, but you can easily just open any example structure in ChimeraX and enter the roll command interactively, instead of changing your movie file and waiting 72 hours. You should always just try the command interactively first instead of wasting your time on the slow process! Elaine
On May 17, 2024, at 1:00 AM, Enrico Martinez <jmsstarlight@gmail.com> wrote:
Hello Elaine,
Thank you very much for your reply ! in fact, I am working on a rather slow machine and the production of the animation will take 72 hours, so sometimes I ought to ask in order to make things more intuitive. I am very sorry for the confusion !
Yours sincerely
Erico
Il giorno gio 16 mag 2024 alle ore 18:06 Elaine Meng <meng@cgl.ucsf.edu> ha scritto: Yes. But it is easy to put in the number and see for yourself, instead of asking me!
Elaine
On May 16, 2024, at 8:20 AM, Enrico Martinez via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Thank you very much Elaine !! So in this case roll x 0.36 1000 the second value (0.36) will corresponds to the rotation speed ? E.g. it will be two times faster (two rotations), if I set it to 0.72 with the same number of frames (1000), right ? Yours with thanks Enrico
Il giorno dom 28 apr 2024 alle ore 18:28 Elaine Meng <meng@cgl.ucsf.edu> ha scritto: The "angle" value in the usage line is how fast the rotation appears. It is the amount of rotation for EACH frame. So your command "roll x 360 1000" is wrong, assuming you do not want a whole 360 degree rotation per each frame. In fact that will look like no rotation at all.
Please read the help, because this is explained in the first sentence right under the usage:
<https://rbvi.ucsf.edu/chimerax/docs/user/commands/roll.html>
If you want a single rotation of 360 degrees over 1000 frames you would need an angle value of 360/1000 = 0.36
roll x 0.36 1000
I hope this helps, Elaine
On Apr 27, 2024, at 12:40 AM, Enrico Martinez <jmsstarlight@gmail.com> wrote:
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/

With "view" you can save views (positions of everything) with specific names. Then you would save a session to keep them. Later when you restore the session you can use "view" again (or "fly") to transition gradually between those views. <https://rbvi.ucsf.edu/chimerax/docs/user/commands/view.html> <https://rbvi.ucsf.edu/chimerax/docs/user/commands/fly.html> To translate a specific distance you would use "move" but I personally don't think of it as the position of the camera, but instead the positions of the scene or the models in the scene. You could either do the "move" during your animation or you could use it to create your saved views as mentioned above. <https://rbvi.ucsf.edu/chimerax/docs/user/commands/move.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 May 17, 2024, at 6:53 AM, Enrico Martinez <jmsstarlight@gmail.com> wrote:
I have one more question that could fall in the category of cinematographic effects: assuming I operate with a very big structure keeping the camera in the fixed position with a big zoom. Would it be possible to translate the camera from this reference position towards some selected direction at a selected distance ? If so, what command should handle it ? Many thanks in advance Enrico

Okay, thank you very much, Elaine ! Actually, an outstanding idea to try it firstly on the static pdb ! In fact, I've been able to find the Fly command, which could jump among different positions identified using "view matrix". Well, it's a good starting point to try. I do not think that "move" might work, since I do not want to move any objects.. I need rather steer the camera along the selected XYZ indicating the number of frames, abit like we did it in the case of roll/rock ? Many thanks in advance Enrico Il giorno ven 17 mag 2024 alle ore 16:42 Elaine Meng <meng@cgl.ucsf.edu> ha scritto:
With "view" you can save views (positions of everything) with specific names. Then you would save a session to keep them. Later when you restore the session you can use "view" again (or "fly") to transition gradually between those views.
<https://rbvi.ucsf.edu/chimerax/docs/user/commands/view.html> <https://rbvi.ucsf.edu/chimerax/docs/user/commands/fly.html>
To translate a specific distance you would use "move" but I personally don't think of it as the position of the camera, but instead the positions of the scene or the models in the scene. You could either do the "move" during your animation or you could use it to create your saved views as mentioned above.
<https://rbvi.ucsf.edu/chimerax/docs/user/commands/move.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 May 17, 2024, at 6:53 AM, Enrico Martinez <jmsstarlight@gmail.com> wrote:
I have one more question that could fall in the category of cinematographic effects: assuming I operate with a very big structure keeping the camera in the fixed position with a big zoom. Would it be possible to translate the camera from this reference position towards some selected direction at a selected distance ? If so, what command should handle it ? Many thanks in advance Enrico

As I understand it, if you use "move" to move everything (not just specific models) it is the same thing as moving the camera. Elaine
On May 17, 2024, at 7:46 AM, Enrico Martinez <jmsstarlight@gmail.com> wrote:
Okay, thank you very much, Elaine ! Actually, an outstanding idea to try it firstly on the static pdb ! In fact, I've been able to find the Fly command, which could jump among different positions identified using "view matrix". Well, it's a good starting point to try. I do not think that "move" might work, since I do not want to move any objects.. I need rather steer the camera along the selected XYZ indicating the number of frames, abit like we did it in the case of roll/rock ? Many thanks in advance Enrico
Il giorno ven 17 mag 2024 alle ore 16:42 Elaine Meng <meng@cgl.ucsf.edu> ha scritto: With "view" you can save views (positions of everything) with specific names. Then you would save a session to keep them. Later when you restore the session you can use "view" again (or "fly") to transition gradually between those views.
<https://rbvi.ucsf.edu/chimerax/docs/user/commands/view.html> <https://rbvi.ucsf.edu/chimerax/docs/user/commands/fly.html>
To translate a specific distance you would use "move" but I personally don't think of it as the position of the camera, but instead the positions of the scene or the models in the scene. You could either do the "move" during your animation or you could use it to create your saved views as mentioned above.
<https://rbvi.ucsf.edu/chimerax/docs/user/commands/move.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 May 17, 2024, at 6:53 AM, Enrico Martinez <jmsstarlight@gmail.com> wrote:
I have one more question that could fall in the category of cinematographic effects: assuming I operate with a very big structure keeping the camera in the fixed position with a big zoom. Would it be possible to translate the camera from this reference position towards some selected direction at a selected distance ? If so, what command should handle it ? Many thanks in advance Enrico

ah yes indeed, actually the following command do the trick: move y -0.1 1000 # move gradually camera along the y (up) during 40 sec of movie recording Il giorno ven 17 mag 2024 alle ore 16:52 Elaine Meng <meng@cgl.ucsf.edu> ha scritto:
As I understand it, if you use "move" to move everything (not just specific models) it is the same thing as moving the camera.
Elaine
On May 17, 2024, at 7:46 AM, Enrico Martinez <jmsstarlight@gmail.com> wrote:
Okay, thank you very much, Elaine ! Actually, an outstanding idea to try it firstly on the static pdb ! In fact, I've been able to find the Fly command, which could jump among different positions identified using "view matrix". Well, it's a good starting point to try. I do not think that "move" might work, since I do not want to move any objects.. I need rather steer the camera along the selected XYZ indicating the number of frames, abit like we did it in the case of roll/rock ? Many thanks in advance Enrico
Il giorno ven 17 mag 2024 alle ore 16:42 Elaine Meng <meng@cgl.ucsf.edu> ha scritto: With "view" you can save views (positions of everything) with specific names. Then you would save a session to keep them. Later when you restore the session you can use "view" again (or "fly") to transition gradually between those views.
<https://rbvi.ucsf.edu/chimerax/docs/user/commands/view.html> <https://rbvi.ucsf.edu/chimerax/docs/user/commands/fly.html>
To translate a specific distance you would use "move" but I personally don't think of it as the position of the camera, but instead the positions of the scene or the models in the scene. You could either do the "move" during your animation or you could use it to create your saved views as mentioned above.
<https://rbvi.ucsf.edu/chimerax/docs/user/commands/move.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 May 17, 2024, at 6:53 AM, Enrico Martinez <jmsstarlight@gmail.com> wrote:
I have one more question that could fall in the category of cinematographic effects: assuming I operate with a very big structure keeping the camera in the fixed position with a big zoom. Would it be possible to translate the camera from this reference position towards some selected direction at a selected distance ? If so, what command should handle it ? Many thanks in advance Enrico
participants (2)
-
Elaine Meng
-
Enrico Martinez