Aligning a trajectory to its first frame

Hi all, I hope you are doing well. Is there a way to align all the frames of a trajectory to its first frame for the purpose of visualization? I’m trying to visualize a residue pair in a trajectory and I have done the following: select both residues; view sel; play the movie. The issue here is that the position of the pair changes (the pair rotates across the screen) with the frame. Regards, Shubham Ramgoolam Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows

Hi Shubham, The "coordset" command for playing back trajectories and the "coordset slider" command for showing a slider interface both have a "holdSteady" option for specifying which atoms to fit between frames: <https://rbvi.ucsf.edu/chimerax/docs/user/commands/coordset.html> <https://rbvi.ucsf.edu/chimerax/docs/user/commands/coordset.html#slider> I hope this helps, Elaine ----- Elaine C. Meng, Ph.D. UCSF Chimera(X) team Department of Pharmaceutical Chemistry University of California, San Francisco
On Jun 29, 2022, at 12:30 AM, Shubham Devesh Ramgoolam via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Hi all, I hope you are doing well. Is there a way to align all the frames of a trajectory to its first frame for the purpose of visualization? I’m trying to visualize a residue pair in a trajectory and I have done the following: select both residues; view sel; play the movie. The issue here is that the position of the pair changes (the pair rotates across the screen) with the frame. Regards, Shubham Ramgoolam

Hi Elaine, Thank you for the reply. Coordset contains the solution to the problem. However, during the visualization process, I am also computing some geometric objects for each frame. I believe I would lose this ability if I use the coordset command. I have been using a python script for the visualization process and here’s how it works: -Select residue pairs & view sel -use a while loop and session.models[0].active_coordset_id to play the trajectory -> It would be nice to be able to fit the atoms in between frames here, just like the holdSteady option -for each loop(frame): view sel, define the geometric objects and hide them before proceeding to the next loop(frame). I am thinking of going over the script that chimeraX uses to run the ‘coordset’ command and then create my own version to fit my need. My question is: How do I locate the scripts that encode commands used by chimeraX? (I tried it on my end but I do not know in which package the command is found) Regards, Shubham Ramgoolam Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows From: Elaine Meng<mailto:meng@cgl.ucsf.edu> Sent: Wednesday, June 29, 2022 19:34 To: Shubham Devesh Ramgoolam<mailto:sdramgoolam@uwaterloo.ca> Cc: chimerax-users@cgl.ucsf.edu<mailto:chimerax-users@cgl.ucsf.edu> Subject: Re: [chimerax-users] Aligning a trajectory to its first frame Hi Shubham, The "coordset" command for playing back trajectories and the "coordset slider" command for showing a slider interface both have a "holdSteady" option for specifying which atoms to fit between frames: <https://rbvi.ucsf.edu/chimerax/docs/user/commands/coordset.html> <https://rbvi.ucsf.edu/chimerax/docs/user/commands/coordset.html#slider> I hope this helps, Elaine ----- Elaine C. Meng, Ph.D. UCSF Chimera(X) team Department of Pharmaceutical Chemistry University of California, San Francisco
On Jun 29, 2022, at 12:30 AM, Shubham Devesh Ramgoolam via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Hi all, I hope you are doing well. Is there a way to align all the frames of a trajectory to its first frame for the purpose of visualization? I’m trying to visualize a residue pair in a trajectory and I have done the following: select both residues; view sel; play the movie. The issue here is that the position of the pair changes (the pair rotates across the screen) with the frame. Regards, Shubham Ramgoolam

I was able to find the python script for the command, thanks to the online documentation. I’ll try to work something out of this. Shubham Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows From: Elaine Meng<mailto:meng@cgl.ucsf.edu> Sent: Wednesday, June 29, 2022 19:34 To: Shubham Devesh Ramgoolam<mailto:sdramgoolam@uwaterloo.ca> Cc: chimerax-users@cgl.ucsf.edu<mailto:chimerax-users@cgl.ucsf.edu> Subject: Re: [chimerax-users] Aligning a trajectory to its first frame Hi Shubham, The "coordset" command for playing back trajectories and the "coordset slider" command for showing a slider interface both have a "holdSteady" option for specifying which atoms to fit between frames: <https://rbvi.ucsf.edu/chimerax/docs/user/commands/coordset.html> <https://rbvi.ucsf.edu/chimerax/docs/user/commands/coordset.html#slider> I hope this helps, Elaine ----- Elaine C. Meng, Ph.D. UCSF Chimera(X) team Department of Pharmaceutical Chemistry University of California, San Francisco
On Jun 29, 2022, at 12:30 AM, Shubham Devesh Ramgoolam via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Hi all, I hope you are doing well. Is there a way to align all the frames of a trajectory to its first frame for the purpose of visualization? I’m trying to visualize a residue pair in a trajectory and I have done the following: select both residues; view sel; play the movie. The issue here is that the position of the pair changes (the pair rotates across the screen) with the frame. Regards, Shubham Ramgoolam

Another possibility is to open a copy of the first frame of your trajectory, hide it, and after each new coordset use the “align” command to fit the pair you care about to the hidden structure. --Eric Eric Pettersen UCSF Computer Graphics Lab
On Jun 30, 2022, at 9:45 AM, Shubham Devesh Ramgoolam via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
I was able to find the python script for the command, thanks to the online documentation. I’ll try to work something out of this. Shubham
Sent from Mail <https://go.microsoft.com/fwlink/?LinkId=550986> for Windows
From: Elaine Meng <mailto:meng@cgl.ucsf.edu> Sent: Wednesday, June 29, 2022 19:34 To: Shubham Devesh Ramgoolam <mailto:sdramgoolam@uwaterloo.ca> Cc: chimerax-users@cgl.ucsf.edu <mailto:chimerax-users@cgl.ucsf.edu> Subject: Re: [chimerax-users] Aligning a trajectory to its first frame
Hi Shubham, The "coordset" command for playing back trajectories and the "coordset slider" command for showing a slider interface both have a "holdSteady" option for specifying which atoms to fit between frames:
<https://rbvi.ucsf.edu/chimerax/docs/user/commands/coordset.html <https://rbvi.ucsf.edu/chimerax/docs/user/commands/coordset.html>> <https://rbvi.ucsf.edu/chimerax/docs/user/commands/coordset.html#slider <https://rbvi.ucsf.edu/chimerax/docs/user/commands/coordset.html#slider>>
I hope this helps, Elaine ----- Elaine C. Meng, Ph.D. UCSF Chimera(X) team Department of Pharmaceutical Chemistry University of California, San Francisco
On Jun 29, 2022, at 12:30 AM, Shubham Devesh Ramgoolam via ChimeraX-users <chimerax-users@cgl.ucsf.edu <mailto:chimerax-users@cgl.ucsf.edu>> wrote:
Hi all, I hope you are doing well. Is there a way to align all the frames of a trajectory to its first frame for the purpose of visualization? I’m trying to visualize a residue pair in a trajectory and I have done the following: select both residues; view sel; play the movie. The issue here is that the position of the pair changes (the pair rotates across the screen) with the frame. Regards, Shubham Ramgoolam
_______________________________________________ ChimeraX-users mailing list ChimeraX-users@cgl.ucsf.edu <mailto:ChimeraX-users@cgl.ucsf.edu> Manage subscription: https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users <https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users>

Hi Shubham, The ChimeraX programming manual has a section showing the Python functions for each ChimeraX command https://www.cgl.ucsf.edu/chimerax/docs/devel/bundles/core/commands/user_comm... <https://www.cgl.ucsf.edu/chimerax/docs/devel/bundles/core/commands/user_comm...> Probably you already found that. Tom
On Jun 30, 2022, at 9:45 AM, Shubham Devesh Ramgoolam via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
I was able to find the python script for the command, thanks to the online documentation. I’ll try to work something out of this. Shubham
Sent from Mail <https://go.microsoft.com/fwlink/?LinkId=550986> for Windows
From: Elaine Meng <mailto:meng@cgl.ucsf.edu> Sent: Wednesday, June 29, 2022 19:34 To: Shubham Devesh Ramgoolam <mailto:sdramgoolam@uwaterloo.ca> Cc: chimerax-users@cgl.ucsf.edu <mailto:chimerax-users@cgl.ucsf.edu> Subject: Re: [chimerax-users] Aligning a trajectory to its first frame
Hi Shubham, The "coordset" command for playing back trajectories and the "coordset slider" command for showing a slider interface both have a "holdSteady" option for specifying which atoms to fit between frames:
<https://rbvi.ucsf.edu/chimerax/docs/user/commands/coordset.html <https://rbvi.ucsf.edu/chimerax/docs/user/commands/coordset.html>> <https://rbvi.ucsf.edu/chimerax/docs/user/commands/coordset.html#slider <https://rbvi.ucsf.edu/chimerax/docs/user/commands/coordset.html#slider>>
I hope this helps, Elaine ----- Elaine C. Meng, Ph.D. UCSF Chimera(X) team Department of Pharmaceutical Chemistry University of California, San Francisco
On Jun 29, 2022, at 12:30 AM, Shubham Devesh Ramgoolam via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Hi all, I hope you are doing well. Is there a way to align all the frames of a trajectory to its first frame for the purpose of visualization? I’m trying to visualize a residue pair in a trajectory and I have done the following: select both residues; view sel; play the movie. The issue here is that the position of the pair changes (the pair rotates across the screen) with the frame. Regards, Shubham Ramgoolam
_______________________________________________ ChimeraX-users mailing list ChimeraX-users@cgl.ucsf.edu Manage subscription: https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users
participants (4)
-
Elaine Meng
-
Eric Pettersen
-
Shubham Devesh Ramgoolam
-
Tom Goddard