Hi Elaine,

Thank you for your insight into the 2 techniques. I will keep in mind to drastically lower the frame # option when using morph in the future for trajectories. Is there code that shows the implementation of corkscrew interpolation in the morph command? I want to see if a derivative of the smooth_MD script is possible with interpolation instead of cartesian averaging.

Another question I have is about post-smoothing analysis on simulations.  With the distortions created through either smoothing methods, might they impact analyses like finding H-bonds?

Regards,
Alex

From: Elaine Meng <meng@cgl.ucsf.edu>
Sent: Monday, May 19, 2025 2:35 PM
To: Alexander Lee <Alex.H.Lee@outlook.com>
Cc: Alexandra Zahradnikova via ChimeraX-users <chimerax-users@cgl.ucsf.edu>
Subject: Re: [chimerax-users] Smooth MD script vs morph movie
 
Hi Alex,
Maybe others have more specific answers, but my general sense is that the choice depends on artistic license + heatlthy awareness that any smoothing will alter the coordinates from what was produced by the energy function in your simulation.

The ChimeraX smooth_md script
(for others, see https://www.rbvi.ucsf.edu/pipermail/chimerax-users/2019-July/000590.html and the actual script is linked near the bottom of https://www.cgl.ucsf.edu/trac/chimera/wiki/Scripts )
averages coordinates in a frame based on the surrounding frames in a specified window width.  If that is simply doing Cartesian averaging (sorry I'm not sure about that and can't read code) it is possible that would give some distortions if there are large changes across your specified window.

The results you get from morphing of course depend on the options you chose. 
<https://rbvi.ucsf.edu/chimerax/docs/user/commands/morph.html>
More frames => more opportunity to deviate from what the energy function gave you, but at least the default (cartesian false) tries to interpolate the internal coordinates where possible to avoid ridiculous local conformations.  It also depends on your trajectory time step and at what temperature the simulation was run (how large the changes you observe between two adjacent trajectory frames might be).

My intuition is that 50 frames would be rather excessive for smoothing between each pair of frames of trajectory, and you might want to try something much smaller (3? 5?), but you'd have to see how it looks.  The defaults are what we felt reasonable for the most common use case of comparing conformational changes of moderate size between two different experimentally determined structures, not for smoothing trajectories.

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

> On May 19, 2025, at 9:26 AM, Alexander Lee via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
>
> Dear ChimeraX developers,
>
> I have been wondering about the pros/cons between the 2 methods to smoothen a trajectory.
>
> If I provide a pdb and an nc trajectory file, I can use the  smooth_md python script. If the trajectory originally has 100 frames , there will still be 100 frames after using the script.
>
> If I exported my trajectory into separate pdb models and morph between each of them, with the default of 50 frames created between each trajectory frame, there will be 5,001 frames after using the command.
>
> While importing many pdb's and morphing them takes longer than importing a trajectory and smoothing it, are there any benefits to using either one over the other? I remember seeing some post-production artifacts in smooth_md python script method like the hydrogens of a lysine being in an odd geometry briefly throughout the smoothed trajectory and am unsure if morph command would do the same.
>
> Regards,
> Alex