VMD Extension Functions
Frame order manipulation

Functions

 swapFrames molID frame1 frame2
 
 sortFrames molID values
 

Detailed Description

Example

Reorder frames by increasing RMSD to frame 0.

1 sortFrames top [qRMSD]

Function Documentation

◆ sortFrames()

sortFrames   molID values  

Reorder all frames of molecule molID according to the numeric list values, where values is a list of real numbers whose length must equal the number of frames in the trajectory of molID. Frames will be permuted so that their new order corresponds to sorting values in ascending order. Internally, builds an indexList via lsort and calls animate reorder.

◆ swapFrames()

swapFrames   molID frame1 frame2  

Swap the coordinates of two frames frame1 and frame2 for all atoms in the trajectory of molecule molID. In other words, for the loaded molecule (with ID molID), exchange the atomic coordinates stored at frame frame1 with those at frame frame2 entirely in memory. molID should refer to a molecule loaded in VMD (e.g. returned by mol new), and frame1 and frame2 are zero‑based frame indices.