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.

Tutorial on 2D particle tracking

Tutorial on 3D particle tracking

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.

IDL>tr = read_gdf('tr.tetra.gdf')

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

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 "".

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 "", 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 "" 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 "".

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>tr = read_gdf('tr.tetra.gdf')

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.

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

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

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

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

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

t0 = rotmsd(RR, rotvec=v0, /getvec)

t1 = rotmsd(RR, rotvec=v1, /getvec)

t2 = rotmsd(RR, rotvec=v2, /getvec)

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.

xplot3d, t0(0,*), t0(1,*), t0(2,*), xr=[-1,1], yr=[-1,1], zr=[-1,1]

xplot3d, t1(0,*), t1(1,*), t1(2,*), /over, color=[0,1,0]*255

xplot3d, t2(0,*), t2(1,*), t2(2,*), /over, color=[0,0,1]*255

xplot3d, t3(0,*), t3(1,*), t3(2,*), /over, color=[1,0,1]*255

Rotation Tracking Software

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


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

[2] "Connection of translational and rotational dynamical heterogeneities with the breakdown of the Stokes-Einstein and Stokes-Einstein-Debye relations in water"
Marco G. Mazza, Nicolas Giovambattista, H. Eugene Stanley, Francis W. Starr, Physical Review E, Vol. 76, No. 3. (Sep 2007), pp. 031203-031203. Click here for journal link.