I have a molecule in a system (the molecule is not in the center) with determined coordinates of all atoms. One of my molecule is on the picture below

the molecule with C46H32N2 atoms

What I need is to determine the vector that is parallel to the long axis of the molecule. As I think I should find the inertia tensor of the molecule. I calculated $I_x$, $I_y$ and $I_z$. Then I tried to normalize the vector and compare it with the vector between two blue nitrogen atoms. It showed that I had done something wrong because vectors was not even close.

  • $\begingroup$ Compute the geometric center at the leftmost and rightmost points of your molecule and use those two points to define your vector? I'm not sure this is really a physics question on-topic here... $\endgroup$
    – tpg2114
    Nov 17, 2015 at 23:47

1 Answer 1


You may want to look at the principal axes of the molecule, which can be calculated from the inertia matrix in the body frame. The theory is discussed in rigid body dynamics and you should be able to find examples of the calculation on the internet. The calculation procedure can be outlined as follows:

First, calculate the center of mass of the rigid molecule. Find the x,y,z coordinates of the atoms of your molecule in the body frame, a reference frame whose origin is at the center of mass of the molecule.

Second, use the body frame coordinates to calculate the inertia matrix in the body frame. The inertia matrix must look like this: $$\begin{pmatrix}I_{xx} & -I_{xy} & -I_{xz} \\ -I_{yx} & I_{yy} & -I_{yz} \\ -I_{zx} & -I_{zy} & I_{zz} \end{pmatrix}$$

I put the minus signs on the products of inertia because they can be easily forgotten. Sometimes the minus signs are included in the definition of $I_{jk}$, in which case they should not appear again in the inertia matrix.

Third, find the eigenvalues and eigenvectors of the inertia matrix. The three eigenvectors will be parallel to the principal axes of the rigid molecule. The axes themselves are lines that pass through the center of mass of the rigid molecule. In your example molecule, the eigenvector that corresponds to the largest eigenvalue should be nearly parallel to the line through the blue nitrogen atoms.

Fourth, perform a sanity check on your calculations. This is optional, but recommended. Normalize the three eigenvectors so they have unit length. Use the normalized eigenvectors as columns of a matrix, T. Multiply the x,y,z body frame coordinates of each atom by matrix T to get new coordinates. Use these new coordinates to calculate a new inertia matrix. If all has gone well, the new inertia matrix will be diagonal (or have very small off diagonal values) and the values on its diagonal will be the same as the eigenvalues calculated for the first inertia matrix.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.