How to estimate 2dlabels fading?

Hi, Could you please explain more how the frames option works when changing 2dlabels? Let’s say I have 100 frames and I wish to have an arrow to appear at frame 10 for 5 frames? Many thanks in advance, Edoardo ------------------------------------------------------ Dr. Edoardo D'Imprima Postdoctoral fellow Structural and Computational Biology Unit EMBL Heidelberg - Mahamid Group Meyerhofstraße 1 69117 Heidelberg Germany Phone: +49 6221 387-8531

Hi Edoardo, The frames argument of 2d label is used for gradually changing the label (e.g. fade in, fade out, change color, and/or change position). It is not used to specify the time point within an existing script where the change starts to happen. Instead you just have to put the command(s) in the right places within your script to get the timing that you would want. So you would use a setup command to create and hide the label ahead of time, for example (let's say that arrow is created as model #5.1): 2dlab arrow start .1,.1 end .28,.33 color orange 2dlab arrow #5.1 visibility false (you could have many setup commands like this if you are going to make different labels and arrows appear later) ... then in the part of the script where it would be frame 10 in your movie, insert the command to start fade-in, specifying the model number of the label: 2dlab arrow #5.1 visibility true frames 5 If you want to finish fading in before any later actions start, then put a "wait 5" after it. Actually, a fade-in of 5 frames is really fast, maybe try using a bigger number so that you can see it happening gradually! I see there is an error in the "2dlabels arrow" documentation where it says "visibility hide | show" ... it should be "visibility true | false" instead, as in the example above. I will fix the documentation. <https://rbvi.ucsf.edu/chimerax/docs/user/commands/2dlabels.html#acreate> I hope this helps, Elaine ----- Elaine C. Meng, Ph.D. UCSF Chimera(X) team Department of Pharmaceutical Chemistry University of California, San Francisco
On Jul 28, 2022, at 2:25 AM, Edoardo D Imprima via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Hi,
Could you please explain more how the frames option works when changing 2dlabels? Let’s say I have 100 frames and I wish to have an arrow to appear at frame 10 for 5 frames?
Many thanks in advance,
Edoardo ------------------------------------------------------ Dr. Edoardo D'Imprima Postdoctoral fellow Structural and Computational Biology Unit EMBL Heidelberg - Mahamid Group Meyerhofstraße 1 69117 Heidelberg Germany
Phone: +49 6221 387-8531
<image.jpeg>

Hi Elaine, Thank you for your prompt reply. When I use this code the arrows are always shown. I tried either visibility 0-1 or hide|show but they are still there since the beginning. 2dlabels text "Test 01" size 18 xpos .03 ypos .92 bold true bgColor black margin 5 visibility false; #2dlabels arrow start 0.112,0.916 end 0.442,0.807 color white weight 0.5 visibility false; #2dlabels arrow start 0.112,0.819 end 0.331,0.561 color white weight 0.5 visibility false; volume #1 planes z,1349,1300; wait 50; show #2.1 models; show #3.1-2 models; wait 200; hide #2.1 models; hide #3.1-2 models; volume #1 planes z,1300,1000; wait 301; What am I doing wrong? Many thanks in advance, Edoardo On Thu, Jul 28, 2022 at 18:39, Elaine Meng wrote: Hi Edoardo, The frames argument of 2d label is used for gradually changing the label (e.g. fade in, fade out, change color, and/or change position). It is not used to specify the time point within an existing script where the change starts to happen. Instead you just have to put the command(s) in the right places within your script to get the timing that you would want. So you would use a setup command to create and hide the label ahead of time, for example (let's say that arrow is created as model #5.1): 2dlab arrow start .1,.1 end .28,.33 color orange 2dlab arrow #5.1 visibility false (you could have many setup commands like this if you are going to make different labels and arrows appear later) ... then in the part of the script where it would be frame 10 in your movie, insert the command to start fade-in, specifying the model number of the label: 2dlab arrow #5.1 visibility true frames 5 If you want to finish fading in before any later actions start, then put a "wait 5" after it. Actually, a fade-in of 5 frames is really fast, maybe try using a bigger number so that you can see it happening gradually! I see there is an error in the "2dlabels arrow" documentation where it says "visibility hide | show" ... it should be "visibility true | false" instead, as in the example above. I will fix the documentation. I hope this helps, Elaine ----- Elaine C. Meng, Ph.D. UCSF Chimera(X) team Department of Pharmaceutical Chemistry University of California, San Francisco On Jul 28, 2022, at 2:25 AM, Edoardo D Imprima via ChimeraX-users wrote: Hi, Could you please explain more how the frames option works when changing 2dlabels? Let’s say I have 100 frames and I wish to have an arrow to appear at frame 10 for 5 frames? Many thanks in advance, Edoardo ------------------------------------------------------ Dr. Edoardo D'Imprima Postdoctoral fellow Structural and Computational Biology Unit EMBL Heidelberg - Mahamid Group Meyerhofstraße 1 69117 Heidelberg Germany Phone: +49 6221 387-8531

HI Edoardo, When you do it in two separate commands (first create the arrow and then in second command hide it) it works, as in the example I sent:
2dlab arrow start .1,.1 end .28,.33 color orange 2dlab arrow #5.1 visibility false
However, you were not doing anything wrong -- in fact, there was a bug so that if you tried to do it all in one command, the arrow would still be shown. This was just fixed yesterday, so if you get the new daily build it should work correctly. Or, you can just do it in two commands as in the workaround above. I hope this helps, Elaine ----- Elaine C. Meng, Ph.D. UCSF Chimera(X) team Department of Pharmaceutical Chemistry University of California, San Francisco
On Jul 29, 2022, at 7:45 AM, Edoardo D Imprima via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Hi Elaine,
Thank you for your prompt reply. When I use this code the arrows are always shown. I tried either visibility 0-1 or hide|show but they are still there since the beginning.
2dlabels text "Test 01" size 18 xpos .03 ypos .92 bold true bgColor black margin 5 visibility false; #2dlabels arrow start 0.112,0.916 end 0.442,0.807 color white weight 0.5 visibility false; #2dlabels arrow start 0.112,0.819 end 0.331,0.561 color white weight 0.5 visibility false;
volume #1 planes z,1349,1300; wait 50;
show #2.1 models; show #3.1-2 models;
wait 200; hide #2.1 models; hide #3.1-2 models;
volume #1 planes z,1300,1000; wait 301;
What am I doing wrong?
Many thanks in advance,
Edoardo
On Thu, Jul 28, 2022 at 18:39, Elaine Meng <meng@cgl.ucsf.edu> wrote: Hi Edoardo, The frames argument of 2d label is used for gradually changing the label (e.g. fade in, fade out, change color, and/or change position).
It is not used to specify the time point within an existing script where the change starts to happen. Instead you just have to put the command(s) in the right places within your script to get the timing that you would want.
So you would use a setup command to create and hide the label ahead of time, for example (let's say that arrow is created as model #5.1):
2dlab arrow start .1,.1 end .28,.33 color orange 2dlab arrow #5.1 visibility false
(you could have many setup commands like this if you are going to make different labels and arrows appear later)
... then in the part of the script where it would be frame 10 in your movie, insert the command to start fade-in, specifying the model number of the label:
2dlab arrow #5.1 visibility true frames 5
If you want to finish fading in before any later actions start, then put a "wait 5" after it. Actually, a fade-in of 5 frames is really fast, maybe try using a bigger number so that you can see it happening gradually!
I see there is an error in the "2dlabels arrow" documentation where it says "visibility hide | show" ... it should be "visibility true | false" instead, as in the example above. I will fix the documentation.
<https://rbvi.ucsf.edu/chimerax/docs/user/commands/2dlabels.html#acreate>
I hope this helps, Elaine ----- Elaine C. Meng, Ph.D. UCSF Chimera(X) team Department of Pharmaceutical Chemistry University of California, San Francisco
On Jul 28, 2022, at 2:25 AM, Edoardo D Imprima via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Hi,
Could you please explain more how the frames option works when changing 2dlabels? Let’s say I have 100 frames and I wish to have an arrow to appear at frame 10 for 5 frames?
Many thanks in advance,
Edoardo ------------------------------------------------------ Dr. Edoardo D'Imprima Postdoctoral fellow Structural and Computational Biology Unit EMBL Heidelberg - Mahamid Group Meyerhofstraße 1 69117 Heidelberg Germany
Phone: +49 6221 387-8531

Hi Elaine, Thanks for your help. I have another related question: when slicing through a volume along one axis I noticed that the displayed plane moves away from the observer both in “box” and in “plane” view. How can keep the displayed plane always in front? Is there something I can use to view in “orient” mode always active? Many thanks in advance, Edoardo ------------------------------------------------------ Dr. Edoardo D'Imprima Postdoctoral fellow Structural and Computational Biology Unit EMBL Heidelberg - Mahamid Group Meyerhofstraße 1 69117 Heidelberg Germany Phone: +49 6221 387-8531
On 29. Jul 2022, at 17:25, Elaine Meng <meng@cgl.ucsf.edu> wrote:
HI Edoardo, When you do it in two separate commands (first create the arrow and then in second command hide it) it works, as in the example I sent:
2dlab arrow start .1,.1 end .28,.33 color orange 2dlab arrow #5.1 visibility false
However, you were not doing anything wrong -- in fact, there was a bug so that if you tried to do it all in one command, the arrow would still be shown. This was just fixed yesterday, so if you get the new daily build it should work correctly. Or, you can just do it in two commands as in the workaround above.
I hope this helps, Elaine ----- Elaine C. Meng, Ph.D. UCSF Chimera(X) team Department of Pharmaceutical Chemistry University of California, San Francisco
On Jul 29, 2022, at 7:45 AM, Edoardo D Imprima via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Hi Elaine,
Thank you for your prompt reply. When I use this code the arrows are always shown. I tried either visibility 0-1 or hide|show but they are still there since the beginning.
2dlabels text "Test 01" size 18 xpos .03 ypos .92 bold true bgColor black margin 5 visibility false; #2dlabels arrow start 0.112,0.916 end 0.442,0.807 color white weight 0.5 visibility false; #2dlabels arrow start 0.112,0.819 end 0.331,0.561 color white weight 0.5 visibility false;
volume #1 planes z,1349,1300; wait 50;
show #2.1 models; show #3.1-2 models;
wait 200; hide #2.1 models; hide #3.1-2 models;
volume #1 planes z,1300,1000; wait 301;
What am I doing wrong?
Many thanks in advance,
Edoardo
On Thu, Jul 28, 2022 at 18:39, Elaine Meng <meng@cgl.ucsf.edu> wrote: Hi Edoardo, The frames argument of 2d label is used for gradually changing the label (e.g. fade in, fade out, change color, and/or change position).
It is not used to specify the time point within an existing script where the change starts to happen. Instead you just have to put the command(s) in the right places within your script to get the timing that you would want.
So you would use a setup command to create and hide the label ahead of time, for example (let's say that arrow is created as model #5.1):
2dlab arrow start .1,.1 end .28,.33 color orange 2dlab arrow #5.1 visibility false
(you could have many setup commands like this if you are going to make different labels and arrows appear later)
... then in the part of the script where it would be frame 10 in your movie, insert the command to start fade-in, specifying the model number of the label:
2dlab arrow #5.1 visibility true frames 5
If you want to finish fading in before any later actions start, then put a "wait 5" after it. Actually, a fade-in of 5 frames is really fast, maybe try using a bigger number so that you can see it happening gradually!
I see there is an error in the "2dlabels arrow" documentation where it says "visibility hide | show" ... it should be "visibility true | false" instead, as in the example above. I will fix the documentation.
<https://rbvi.ucsf.edu/chimerax/docs/user/commands/2dlabels.html#acreate>
I hope this helps, Elaine ----- Elaine C. Meng, Ph.D. UCSF Chimera(X) team Department of Pharmaceutical Chemistry University of California, San Francisco
On Jul 28, 2022, at 2:25 AM, Edoardo D Imprima via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Hi,
Could you please explain more how the frames option works when changing 2dlabels? Let’s say I have 100 frames and I wish to have an arrow to appear at frame 10 for 5 frames?
Many thanks in advance,
Edoardo ------------------------------------------------------ Dr. Edoardo D'Imprima Postdoctoral fellow Structural and Computational Biology Unit EMBL Heidelberg - Mahamid Group Meyerhofstraße 1 69117 Heidelberg Germany
Phone: +49 6221 387-8531

Hi Edoardo, I tried to change the subject line appropriately. I'm not sure I understand your question. I'm guessing you are moving the slice plane through the map, which itself is not moving -- but you want to make it look like the slice plane is staying in the same place and the map is moving instead? If you are using the "planes" option of volume (or per-model clipping), you could try moving the map in the opposite direction at the same time, e.g. something like this since my example map has 236 Z-planes spaced 1.25 apart: volume #1 planes z,1,236,1; move z -1.25 236 coord #1 mod #1; wait 236 If you are using global clipping, you could try moving the map instead of moving the plane. I hope this helps, Elaine ----- Elaine C. Meng, Ph.D. UCSF Chimera(X) team Department of Pharmaceutical Chemistry University of California, San Francisco
On Aug 1, 2022, at 5:45 AM, Edoardo D Imprima <edoardo.dimprima@embl.de> wrote:
Hi Elaine,
Thanks for your help. I have another related question: when slicing through a volume along one axis I noticed that the displayed plane moves away from the observer both in “box” and in “plane” view. How can keep the displayed plane always in front? Is there something I can use to view in “orient” mode always active?
Many thanks in advance,
Edoardo
participants (2)
-
Edoardo D Imprima
-
Elaine Meng