Hi Eric,

Thank you for the script. Unfortunately, I cannot download it from either my mail app (.py file format is not supported) or the Pipermail website. 
Could you please email it to me as a text file (.txt)?

Best,
Shubham

From: Eric Pettersen <pett@cgl.ucsf.edu>
Sent: May 15, 2023 9:39 PM
To: Shubham Devesh Ramgoolam <sdramgoolam@uwaterloo.ca>
Cc: ChimeraX Users Help <chimerax-users@cgl.ucsf.edu>
Subject: Re: [chimerax-users] Trajectory smoothing
 
Hi Shubham,
I think your analysis is correct in that the slowdown for large trajectories would be high memory consumption, and the copying of the coordinates into a convenience array exacerbates that.  It make the memory use about triple (original coordinates, convenience copy, smoothed coordinates) while the script runs.  Referring back to the original coordinates instead of copying would reduce memory use to about double, at the cost of having to fetch/convert each coordinate set 5 times (for a smoothing window of 2).  Nonetheless, the tradeoff could be worth it.  I’ve attached a version of the smoothing script that refers to the original coordinates instead of copying, and you could try it out and see if it helps.

--Eric

Eric Pettersen
UCSF Computer Graphics Lab


On May 15, 2023, at 9:35 AM, Shubham Devesh Ramgoolam via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:

Hi ChimeraX team,
 
For large trajectories, the smoothing algorithm in smooth_md.py slows down considerably.
I suspect it is because of this line of code: coord_sets = [s.coordset(cs_id).xyzs for cs_id in s.coordset_ids]
 
Is there a way to retrieve the original coordinates efficiently?

I was looking at the code used to load the trajectories (read_coords.py in chimerax.md_crds) and I was thinking of retrieving the original coordinates from there.
However, I believe this approach would not work for DCD trajectories because the coordinates are loaded one frame at a time (from my understanding of  _set_model_dcd_coordinates in read_coords.py), unlike the other trajectory formats.
 
Shubham
 
Sent from Mail for Windows
 
From: Elaine Meng
Sent: Tuesday, January 3, 2023 14:57
To: Shubham Devesh Ramgoolam
Cc: chimerax-users@cgl.ucsf.edu
Subject: Re: [chimerax-users] Trajectory smoothing
 

Hi Shubham, 
Maybe you were using the old http URL for the scripts page?  Here is the current https one:

<https://www.cgl.ucsf.edu/trac/chimera/wiki/Scripts>

The ChimeraX trajectory-smoothing script is near the bottom.  There is also one for Chimera near the middle.

I hope this helps,
Elaine
-----
Elaine C. Meng, Ph.D.                       
UCSF Chimera(X) team
Department of Pharmaceutical Chemistry
University of California, San Francisco


> On Jan 2, 2023, at 3:14 PM, Shubham Devesh Ramgoolam via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
> 
> Hi all,
> Does chimeraX has a command for trajectory smoothing?
> Based on previous similar questions, I know a script was written for trajectory smoothing in chimera/chimeraX. However, I cannot not access this script because it is not found on the server anymore.
 
> Shubham

 
_______________________________________________
ChimeraX-users mailing list
ChimeraX-users@cgl.ucsf.edu
Manage subscription:
https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users