Turning models on/off on a perframe basis

Hi, in a short animation I would like to turn on/off a second model that is overlapping with the main model. The idea is to show differences by showing/hiding side chains of the second model. I know I can turn off models with ~modeldisp #1 but I don't know how to do that properly in a perframe statement turn y 2 180 perframe "modeldisp #1 " range 0,1 frames 180 # pseudo code wait clearly range does not quite work and $1 is presumably not setup to be ~ or nothing. I want to turn #1 on/off say every 6 degrees. How can this be done ? Thanks, Lothar

Hi Lothar, The perframe command does have an “interval” option to do something only at every Nth frame (N >1), but then how to interleave modeldisplay and ~modeldisplay? <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/perframe.html> Here’s a possibly crazy idea, and I really don’t know if it would work: make an alias that hides the model, waits N frames (e.g. 6 frames), and then shows it again. Then use perframe to execute this alias every 2N frames (e.g. 12). I guess it’s worth a try… I hope this helps, Elaine ----- Elaine C. Meng, Ph.D. UCSF Chimera(X) team Department of Pharmaceutical Chemistry University of California, San Francisco
On Jan 24, 2018, at 8:58 AM, Esser, Lothar (NIH/NCI) [E] <esserlo@mail.nih.gov> wrote:
Hi, in a short animation I would like to turn on/off a second model that is overlapping with the main model. The idea is to show differences by showing/hiding side chains of the second model. I know I can turn off models with ~modeldisp #1 but I don't know how to do that properly in a perframe statement
turn y 2 180 perframe "modeldisp #1 " range 0,1 frames 180 # pseudo code wait
clearly range does not quite work and $1 is presumably not setup to be ~ or nothing. I want to turn #1 on/off say every 6 degrees. How can this be done ?
Thanks, Lothar

Hi Elaine, thanks for the fast reply. After I sent off the question I wrote a script to generate a bunch of simple turn y 2 3 statements in a row with interspersed modeldisp #1 and ~modeldisp #1 statement. That worked. Only I found out that I did not like the abruptness. So I did the reasonable thing as to change the transparency ! perframe "transparency $1,a" range 100,50 frames 10 ... or something like this. That gave a smooth transition that looks good. Thanks again. Lothar P.S. I apologize for any inconvenience, but recently my mail server was moved and I still have to update my subscription. ________________________________ From: Elaine Meng <meng@cgl.ucsf.edu> Sent: Wednesday, January 24, 2018 3:42:36 PM To: Esser, Lothar (NIH/NCI) [E] Cc: chimeraBB Subject: Re: [Chimera-users] Turning models on/off on a perframe basis Hi Lothar, The perframe command does have an “interval” option to do something only at every Nth frame (N >1), but then how to interleave modeldisplay and ~modeldisplay? <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/perframe.html> Here’s a possibly crazy idea, and I really don’t know if it would work: make an alias that hides the model, waits N frames (e.g. 6 frames), and then shows it again. Then use perframe to execute this alias every 2N frames (e.g. 12). I guess it’s worth a try… I hope this helps, Elaine ----- Elaine C. Meng, Ph.D. UCSF Chimera(X) team Department of Pharmaceutical Chemistry University of California, San Francisco
On Jan 24, 2018, at 8:58 AM, Esser, Lothar (NIH/NCI) [E] <esserlo@mail.nih.gov> wrote:
Hi, in a short animation I would like to turn on/off a second model that is overlapping with the main model. The idea is to show differences by showing/hiding side chains of the second model. I know I can turn off models with ~modeldisp #1 but I don't know how to do that properly in a perframe statement
turn y 2 180 perframe "modeldisp #1 " range 0,1 frames 180 # pseudo code wait
clearly range does not quite work and $1 is presumably not setup to be ~ or nothing. I want to turn #1 on/off say every 6 degrees. How can this be done ?
Thanks, Lothar
participants (2)
-
Elaine Meng
-
Esser, Lothar (NIH/NCI) [E]