[chimerax-users] Perframe and distance
Simonson, Benjamin Thomas
bts5242 at psu.edu
Fri Dec 9 11:47:13 PST 2022
Hi Elaine,
Thanks so much for your help, I actually figured out I needed coordset about 2 minutes before you sent your email!
And thank you for the other suggestions as well.
Best,
Ben
________________________________
From: Elaine Meng <meng at cgl.ucsf.edu>
Sent: Friday, December 9, 2022 2:43 PM
To: Simonson, Benjamin Thomas <bts5242 at psu.edu>
Cc: chimerax-users at cgl.ucsf.edu <chimerax-users at cgl.ucsf.edu>
Subject: Re: [chimerax-users] Perframe and distance
[You don't often get email from meng at cgl.ucsf.edu. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
Hi Ben,
You also need a "coordset" command to actually play the trajectory. The perframe frames are graphics frames, not trajectory frames:
<https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Frbvi.ucsf.edu%2Fchimerax%2Fdocs%2Fuser%2Fcommands%2Fperframe.html&data=05%7C01%7Cbts5242%40psu.edu%7C0279a5cc1513488de84508dada1daebf%7C7cf48d453ddb4389a9c1c115526eb52e%7C0%7C0%7C638062118279090465%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=iLEFLB2tf79o6ZgR9ZGgHRrXDRXkiBXTAiA00xAF%2B68%3D&reserved=0>
Here is an example using an NMR structure opened as a trajectory:
open 1plx coord true
perframe "distance /A:1 at N:4 at CG; distance save dist$1.txt; ~distance" range 10,80,10; coordset #1; wait 80; ~perframe
Note that it isn't necessary to name the atoms in the ~distance command. Simply giving ~distance will remove all current distance monitors. The example above will give files dist10.txt, dist20.txt ... dist 80.txt. Or alternatively, to name files dist1.txt, dist2.txt ... dist8.txt:
perframe "distance /A:1 at N:4 at CG; distance save dist$1.txt; ~distance" ; coordset #1 10,80,10; wait 8; ~perframe
In that second example, one tricky thing is that you need a space between the end quote and the semicolon that follows it.
I hope this helps,
Elaine
-----
Elaine C. Meng, Ph.D.
UCSF Chimera(X) team
Department of Pharmaceutical Chemistry
University of California, San Francisco
> On Dec 9, 2022, at 8:18 AM, Simonson, Benjamin Thomas via ChimeraX-users <chimerax-users at cgl.ucsf.edu> wrote:
>
> Hello! I am trying to measure the distance between two atoms in my trajectory in every 10th frame. My approach was to use the perframe command paired with the distance command. Below was my attempt:
>
> perframe "distance /D:15 at NH1 /B:42 at OD1;distance save dist$1.txt;~distance /D:15 at NH1 /B:42 at OD1" interval 10
>
> However, it instead simply outputs the distance of the currently displayed frame over and over again. Any help would be appreciated!
>
> Ben
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.rbvi.ucsf.edu/pipermail/chimerax-users/attachments/20221209/ce5b67a1/attachment.html>
More information about the ChimeraX-users
mailing list