Tracking Rotations of Clusters of Particles - Gary L. Hunter, Kazem V. Edmond, Eric R. Weeks
Home | Tracking software | Rotation tracking software | Extra software
The first step in tracking rotations of clusters is to track the individual particles within the cluster. So, before thinking too hard about this webpage, make sure you understand the basics of particle tracking. See links below for Eric Weeks' particle tracking tutorials.

# Tracking Rotations

Once the individual particles are tracked, the procedure to get the rotations is pretty easy. First, read in the track file (which I'm calling "tr.tetra.gdf"). If you don't have a track file to use, you can download this one, which is the track file I'm using from a simulation of a tetrahedral cluster diffusing translationally and rotationally.

Next, we need to calculate a rotation matrix for each timestep, which is done with the function "rmrot.pro".

#### IDL>trn = rmrot(tr, 3,rotmat=RR, /center)

Here, 3 is the dimension of the track file, and setting "rotmat = RR" will return the variable RR, which is the list of rotation matrices. Also, in the above line, there is the keyword "/center" -- for the procedure to work, translational motions need to be removed. Therefore, your data must be centered about the origin at each timestep. Specifying "/center" in the code above will do this for you, if your track file isn't already formatted this way.

Once we have the rotation matrices RR, we can calculate a Mean-Square Angular Displacement (MSAD) by using the function "rotmsd.pro".

#### IDL>m = rotmsd(RR, maxtime=500)

The above statement calculates the MSAD of an orientation vector with initial coordinates (1,0,0) up to dt = 500. Just like "msd.pro", this function will output components of the MSAD -- in most circumstances, the quantity you're after will be the total MSAD, which is given in column 7. To plot the MSAD, you can use something like

#### IDL>plot, m(0,*), m(7,*), /xl, /yl, ps = circ(), xr = [1,500], /xs

There are several important keywords in "rotmsd.pro" to know about. These are listed below with brief descriptions.

rotvec - this keyword allows you to specify the inital orientation vector [by default, this vector is (1,0,0)]. For example, if you want to calculate the MSAD of vector (1,1,1), you call "m = rotmsd(RR, rotvec=[1,1,1])". You don't need to normalize this vector; the program will do it for you. This is especially useful when you're interested in computing how specific particles within a cluster rotate about the center of mass. Click here for an example of how to compute the motions of each particle within a cluster.

getvec - specifying this keyword overrides computing the MSAD. Instead, the program will return the trajectory of the orientation vector through space. So, if for example you wanted the trajectory of vector (1,1,1) through space, you use "vec = rotmsd(RR, /getvec, rotvec=[1,1,1])"

gettheta - specifying this keyword overrides computing the MSAD. Instead, the program will return trajectory of the orientation vector through a type of rotation space. Basically, a coordinate (θxyz) in the rotation space describes the cumulative rotations about specific axes. I.e., θx is the total amount that the orientation vector has rotated about the x-axis. To do this, call "theta = rotmsd(RR, /gettheta)". See References [1,2] at the bottom of the page for more details on the idea behind the rotation space.

The other allowed keywords are "maxtime", "quiet", "noplot", and "mydts", which have the same meaning as in "msd.pro".

### An Example of How to Compute the Trajectories of Particles within a Cluster

First, read in the track file. Then, we'll compute the rotation matrices.

#### IDL>trn = rmrot(tr, 3, rotmat=RR, /center)

The example track file is of a diffusing tetrahedron, which means that we have 4 different initial orientation vectors we want to examine (corresponding to the initial positions of each particle). We need to identify the initial positions of each particle ID. NOTE: In this example, time is given in column 3, and ID is given in column 4.

#### v3 = tr[0:2, where(tr[3,*] eq 0 and tr[4,*] eq 3)]

Next, we'll use "rotmsd.pro" to calculate each trajectory by specifying the different orientation vectors.

#### t3 = rotmsd(RR, rotvec=v3, /getvec)

Finally, we can plot the motions of the orientation vectors over time, and we end up with the picture shown below.

# Rotation Tracking Software

On top of the standard pretracking and tracking software described
here, you'll need the functions below to track rotations.

centertrack.pro (used in rmrot.pro)

rmrot.pro

rotmsd.pro

### References

[1] "Tracking rotational diffusion of colloidal clusters"
GL Hunter, KV Edmond, MT Elsesser, & ER Weeks, Optics Express 19, 17189-17202 (2011).