Hi Elaine,
Your idea works. But how can direct the output to a file rather than seeing it on the chimera window. I gave
~distance
distance :163@CA :166@CA
and then tried savefile option but nothing is saved in the output file except the two lines of command. Could you please send me an example script of doing some analysis on each frame of the trajectory and just output to a file directly.

Thanks,
Bala

On Wed, Dec 23, 2009 at 6:28 PM, Elaine Meng <meng@cgl.ucsf.edu> wrote:
Hi Bala,
Perhaps there is a more elegant way, but you could just add the command ~dist to your per-frame script, i.e.:


distance :163@CA :166@CA
~dist

Of course, if the distance measurement is already present in Chimera, also enter the command ~dist before starting to apply the script so that the first time it runs, it will not generate that error.  I hope this helps,
Elaine
-----
Elaine C. Meng, Ph.D.
UCSF Computer Graphics Lab (Chimera team) and Babbitt Lab
Department of Pharmaceutical Chemistry
University of California, San Francisco


On Dec 23, 2009, at 3:36 AM, Bala subramanian wrote:

Friends,
I loaded a amber trajectory in chimera. I simply want to calculate the distance between two atom in each frame in the traj. and write it to a text file. I used the per-frame utility in MD movie tool.

I chose interpret script as 'chimera commands'
substitute text 001-200 (frame 1 to 200)

In the script section i gave
distance :163@CA :166@CA

It reports to me the following in the reply log.
Distance between GLY 163 CA and ARG 166 CA: 5.083
Problem in per-frame script:
Distance monitor already exists
Problem in per-frame script:
Distance monitor already exists
Problem in per-frame script:
Distance monitor already exists

How should i actually use the perframe option so that the analysis will be done in each frame and reported output file will hve the distance values for every frame.
Thanks,
Bala