crawdad:programming:project1

The purpose of this project is to introduce you to fundamental C-language programming techniques in the context of a scientific problem, viz. the calculation of the internal coordinates (bond lengths, bond angles, dihedral angles), moments of inertia, and rotational constants of a polyatomic molecule. A concise set of instructions for this project may be found here.

We thank Dr. Yukio Yamaguchi of the University of Georgia for the original version of this project.

The input to the program is the set of Cartesian coordinates of the atoms (in bohr) and their associated atomic numbers. A sample molecule (acetaldehyde) to use as input to the program is:

7 6 0.000000000000 0.000000000000 0.000000000000 6 0.000000000000 0.000000000000 2.845112131228 8 1.899115961744 0.000000000000 4.139062527233 1 -1.894048308506 0.000000000000 3.747688672216 1 1.942500819960 0.000000000000 -0.701145981971 1 -1.007295466862 -1.669971842687 -0.705916966833 1 -1.007295466862 1.669971842687 -0.705916966833(You may cut and paste the above or download the file from here.) The first line above is the number of atoms (an integer), while the remaining lines contain the z-values and x-, y-, and z-coordinates of each atom (one integer followed by three double-precision floating-point numbers).

After downloading the file to your computer (to a file called “geom.dat”, for example), you must open the file, read the data from each line into appropriate variables, and finally close the file.

Calculate the interatomic distances using the expression:

where *x*, *y*, and *z* are Cartesian coordinates and *i* and *j* denote atomic indices.

Calculate all possible bond angles. For example, the angle, , between atoms
** i-j-k**, where

where the are unit vectors between the atoms, e.g.,

Calculate all possible out-of-plane angles. For example, the angle for atom ** i** out of the plane containing atoms

Calculate all possible torsional angles. For example, the torsional angle
for the atom connectivity ** i-j-k-l** is
given by:

Can you also determine the sign of the torsional angle?

Find the center of mass of the molecule:

where *m _{i}* is the mass of atom

Translate the input coordinates of the molecule to the center-of-mass.

Calculate elements of the moment of inertia tensor.

Diagonal:

Off-diagonal:

Diagonalize the inertia tensor to obtain the principal moments of inertia:

Report the moments of inertia in amu bohr^{2}, amu Å^{2}, and g cm^{2}.

Based on the relative values of the principal moments, determine the molecular rotor type: linear, oblate, prolate, asymmetric.

- Acetaldehyde: input coordinates | output
- Benzene: input coordinates | output
- Allene: input coordinates | output

E.B. Wilson, J.C. Decius, and P.C. Cross, *Molecular Vibrations*, McGraw-Hill, 1955.

crawdad/programming/project1.txt · Last modified: 2014/08/29 10:10 by crawdad