From: Maxim Belkin (mbelkin_at_ks.uiuc.edu)
Date: Fri Jun 27 2014 - 12:27:07 CDT

Yes, this is what is explained on that webpage. Take a look at "enabletrace" proc there: it calls "drawcounter" every time frame changes (whether via manual mouse click, animate goto <frame_number>, or even when you simply play the trajectory in VMD).

On Jun 27, 2014, at 12:14 PM, Ebert Maximilian <m.ebert_at_umontreal.ca> wrote:

> Hi Maxim,
>
> Thanks for the answer that helped a lot. Is there a possibility to write a function which is executed in each frame when I press the play button in VMD?
>
> Thanks again,
>
> Max
>
>
> On Jun 27, 2014, at 12:36 PM, Ebert Maximilian <m.ebert_at_umontreal.ca> wrote:
>
>>
>>
>>
>> ________________________________________
>> From: Maxim Belkin
>> Sent: Friday, June 27, 2014 12:29:36 PM (UTC-05:00) Eastern Time (US & Canada)
>> To: Ebert Maximilian
>> Cc: vmd-l_at_ks.uiuc.edu
>> Subject: Re: vmd-l: Select the residue which comprises the atom with index
>>
>> Hi Ebert,
>>
>> Perhaps, "same residue as index 1120" is what you are looking for.
>>
>> You can write a tcl script that is called during playback every time frame of a trajectory changes (vmd_frame). In that script, you can do all the analysis you need and draw spheres, cylinders or whatever you want and where you want.
>> Take a look here:
>> http://www.ks.uiuc.edu/Training/Tutorials/vmd-ref/imgmv/tutorial-html/node3.html
>>
>> Maxim
>>
>>
>> On Jun 27, 2014, at 11:08 AM, Ebert Maximilian <m.ebert_at_umontreal.ca> wrote:
>>
>>> Dear list,
>>>
>>> I am trying to make a video of my trajectory in which every time a hydrogen bond is formed, the residues implicated in bond formation change their representation style to surface. Therefore, I am trying to find out using TCL which residues are forming an hbond in each frame. The result of
>>>
>>> measure hbonds 3.5 30 $sel1 $sel2
>>>
>>> is an array with the 3 indices of atoms implicated in the formation of this bond. Now I am trying to get the corresponding residues to these indices. How can I select the residue in the atomselect statement? Is there something like
>>>
>>> atomselect top “residue where index 1120”
>>>
>>> In addition if you know another method to highly during playback of the trajectory the hbonds differently with build in methods other than the dashed line (for instance by having spheres around the residues implicated in the hbond) please let me know.
>>>
>>> Thank you very much,
>>>
>>> Max
>>
>