[Chimera-users] Can I use wait command over Rest service?
conrad at cgl.ucsf.edu
Tue May 31 13:54:28 PDT 2016
Yeah, "wait" is an odd command because it does not _actually_ wait for a
number of frames. Instead, it sets up a counter that gets decremented
each time a screen refresh happens (which is why things rotate and
translate). Unfortunately, the REST command processor thinks that it's
done even though the counter has not been decremented at all while
processing the commands; so REST returns immediately.
The "right way" to do this is probably to actually do N screen refreshes
when executing the wait command, but it's not too high on the priority
list. Sorry. Since sleep is a viable workaround, that's the way to go.
On 5/30/2016 11:37 PM, Mungo Carstairs (Staff) wrote:
> Hi Elaine,
> "sleep .2" works for me (I still don't get any "wait" to happen over Rest) - but I've realised there is a much better way to do what I want which is the "rlabel" / "~rlabel" command to show a residue label as I traverse the sequence / structure.
> One question on that - interactively (in Chimera), the label shows in a nice shadowed box (a tooltip I guess), programmatically it is just the label text, which doesn't stand out too clearly against the background. Is that the best I can get for this? I don't see anything in labelopt to customize this.
> Mungo Carstairs
> Jalview Computational Scientist
> The Barton Group
> Division of Computational Biology
> School of Life Sciences
> University of Dundee, Dundee, Scotland, UK.
> From: Elaine Meng <meng at cgl.ucsf.edu>
> Sent: 30 May 2016 19:19:05
> To: Mungo Carstairs (Staff)
> Cc: chimera-users at cgl.ucsf.edu Mailing List
> Subject: Re: [Chimera-users] Can I use wait command over Rest service?
> Hi Mungo,
> At least in my tests, it is possible to use fractional sleep times, e.g. “sleep .1”
> On May 30, 2016, at 10:46 AM, Mungo Carstairs (Staff) <g.m.carstairs at dundee.ac.uk> wrote:
>> Hi Elaine,
>> Thanks. I tried as separate commands and now at least I can see the effect, but only as a fast flicker regardless of the wait value (or no wait command).
>> It does seem that wait is ignored over Rest. I guess I could code the wait at my end but that would be a last resort.
>> Concatenating the commands on the command line does give the wait behaviour I am hoping for (so somewhat contradicts the link you passed in that the display is redrawn a couple of times).
>> Sleep works, but is too slow for my purposes (minimum one second delay), which include tracking over a sequence with the mouse at some speed.
>> Mungo Carstairs
>> Jalview Computational Scientist
>> The Barton Group
>> Division of Computational Biology
>> School of Life Sciences
>> University of Dundee, Dundee, Scotland, UK.
>> From: Elaine Meng <meng at cgl.ucsf.edu>
>> Sent: 30 May 2016 18:26:11
>> To: Mungo Carstairs (Staff)
>> Cc: chimera-users at cgl.ucsf.edu
>> Subject: Re: [Chimera-users] Can I use wait command over Rest service?
>> Hi Mungo,
>> If I understand correctly, stringing the commands together with semicolons means to only show the result at the end.
>> “...display is not redrawn until the last command in a semicolon-separated series has been executed.”
>> I’d expect it to behave more like you want as two separate commands:
>> display #0:30.A;wait 20
>> ~display #0:30.A
>> … although perhaps that is more trouble to script. If this is just for “live” execution (not recording as a movie) the “sleep” command may be an alternative to “wait,” although it may also require using two separate commands.
>> I hope this helps,
>> Elaine C. Meng, Ph.D.
>> UCSF Computer Graphics Lab (Chimera team) and Babbitt Lab
>> Department of Pharmaceutical Chemistry
>> University of California, San Francisco
>> On May 30, 2016, at 9:58 AM, Mungo Carstairs (Staff) <g.m.carstairs at dundee.ac.uk> wrote:
>>> I am trying to devise a way to highlight locations on a structure in Chimera while mousing over the sequence in Jalview.
>>> My latest attempt tries to 'flash' the side-chain display at the residue position i.e.
>>> - hide then show atoms (if currently displayed e.g. display is in atom mode)
>>> - or show then hide atoms (if currently not displayed e.g. display is in ribbon mode)
>>> I'm sending a command like
>>> display #0:30.A;wait 20;~display #0:30.A
>>> to the Rest service.
>>> However while this seems to do what I want when used at the Chimera command line, via the Rest service it ignores the wait command, with the result that the action is too quick to see.
>>> Any suggestions please for how to get this to work, or a better alternative?
>> The University of Dundee is a registered Scottish Charity, No: SC015096
>> Chimera-users mailing list: Chimera-users at cgl.ucsf.edu
>> Manage subscription: http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users
> The University of Dundee is a registered Scottish Charity, No: SC015096
> Chimera-users mailing list: Chimera-users at cgl.ucsf.edu
> Manage subscription: http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users
More information about the Chimera-users