Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix transparent equations #36

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 50 additions & 10 deletions Project#01/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@ After downloading the file to your computer (to a file called “geom.dat”, fo
## Step 2: Bond Lengths
Calculate the interatomic distances using the expression:

<img src="./figures/distances.png" height="40">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="./figures/dark/distances.png">
<source media="(prefers-color-scheme: light)" srcset="./figures/distances.png">
<img src="./figures/distances.png" height="40">
</picture>

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

Expand All @@ -40,11 +44,19 @@ where x, y, and z are Cartesian coordinates and i and j denote atomic indices.
## Step 3: Bond Angles
Calculate all possible bond angles. For example, the angle, &phi;<sub>ijk</sub>, between atoms i-j-k, where j is the central atom is given by:

<img src="./figures/bond-angle.png" height="25">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="./figures/dark/bond-angle.png">
<source media="(prefers-color-scheme: light)" srcset="./figures/bond-angle.png">
<img src="./figures/bond-angle.png" height="25">
</picture>

where the e<sub>ij</sub> are unit vectors between the atoms, e.g.,

<img src="./figures/unit-vectors.png" height="30">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="./figures/dark/unit-vectors.png">
<source media="(prefers-color-scheme: light)" srcset="./figures/unit-vectors.png">
<img src="./figures/unit-vectors.png" height="30">
</picture>

- [Hint 1](./hints/hint3-1.md): Memory allocation for the unit vectors
- [Hint 2](./hints/hint3-2.md): Avoiding a divide-by-zero
Expand All @@ -56,7 +68,11 @@ where the e<sub>ij</sub> are unit vectors between the atoms, e.g.,
## Step 4: Out-of-Plane Angles
Calculate all possible out-of-plane angles. For example, the angle &theta;<sub>ijkl</sub> for atom i out of the plane containing atoms j-k-l (with k as the central atom, connected to i) is given by:

<img src="./figures/oop-angle.png" height="60">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="./figures/dark/oop-angle.png">
<source media="(prefers-color-scheme: light)" srcset="./figures/oop-angle.png">
<img src="./figures/oop-angle.png" height="60">
</picture>

- [Hint 1](./hints/hint4-1.md): Memory allocation?
- [Hint 2](./hints/hint4-2.md): Cross products
Expand All @@ -67,7 +83,11 @@ Calculate all possible out-of-plane angles. For example, the angle &theta;<sub>i
## Step 5: Torsion/Dihedral Angles
Calculate all possible torsional angles. For example, the torsional angle &tau;<sub>ijkl</sub> for the atom connectivity i-j-k-l is given by:

<img src="./figures/torsion-angle.png" height="60">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="./figures/dark/torsion-angle.png">
<source media="(prefers-color-scheme: light)" srcset="./figures/torsion-angle.png">
<img src="./figures/torsion-angle.png" height="60">
</picture>

Can you also determine the sign of the torsional angle?

Expand All @@ -80,7 +100,11 @@ Can you also determine the sign of the torsional angle?
## Step 6: Center-of-Mass Translation
Find the center of mass of the molecule:

<img src="./figures/center-of-mass.png" width="600">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="./figures/dark/center-of-mass.png">
<source media="(prefers-color-scheme: light)" srcset="./figures/center-of-mass.png">
<img src="./figures/center-of-mass.png" width="600">
</picture>

where m<sub>i</sub> is the mass of atom i and the summation runs over all atoms in the molecule.

Expand All @@ -95,15 +119,27 @@ Calculate elements of the [moment of inertia tensor](http://en.wikipedia.org/wik

Diagonal:

<img src="./figures/inertia-diag.png" width="750">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="./figures/dark/inertia-diag.png">
<source media="(prefers-color-scheme: light)" srcset="./figures/inertia-diag.png">
<img src="./figures/inertia-diag.png" width="750">
</picture>

Off-diagonal (add a negative sign):

<img src="./figures/inertia-off-diag.png" width="600">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="./figures/dark/inertia-off-diag.png">
<source media="(prefers-color-scheme: light)" srcset="./figures/inertia-off-diag.png">
<img src="./figures/inertia-off-diag.png" width="600">
</picture>

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

<img src="./figures/principal-mom-of-inertia.png" width="125">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="./figures/dark/principal-mom-of-inertia.png">
<source media="(prefers-color-scheme: light)" srcset="./figures/principal-mom-of-inertia.png">
<img src="./figures/principal-mom-of-inertia.png" width="125">
</picture>

Report the moments of inertia in amu bohr<sup>2</sup>, amu &#8491;<sup>2</sup>, and g cm<sup>2</sup>.

Expand All @@ -116,7 +152,11 @@ Based on the relative values of the principal moments, determine the [molecular
## Step 8: Rotational Constants
Compute the rotational constants in cm<sup>-1</sup> and MHz:

<img src="./figures/rot-const.png" width="100">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="./figures/dark/rot-const.png">
<source media="(prefers-color-scheme: light)" srcset="./figures/rot-const.png">
<img src="./figures/rot-const.png" width="100">
</picture>

- [Solution](./hints/step8-solution.md)

Expand Down
Binary file removed Project#01/figures/.DS_Store
Binary file not shown.
Binary file added Project#01/figures/dark/bond-angle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Project#01/figures/dark/center-of-mass.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Project#01/figures/dark/determinant.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Project#01/figures/dark/distances.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Project#01/figures/dark/inertia-diag.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Project#01/figures/dark/inertia-off-diag.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Project#01/figures/dark/oop-angle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Project#01/figures/dark/rot-const.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Project#01/figures/dark/torsion-angle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Project#01/figures/dark/unit-vectors.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Project#01/figures/determinant.pdf
Binary file not shown.
Binary file modified Project#01/figures/determinant.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed Project#01/figures/distances2.png
Binary file not shown.
6 changes: 5 additions & 1 deletion Project#01/hints/hint7-1.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ Here are two approaches for the [diagonalization](http://en.wikipedia.org/wiki/D
## Secular Determinant
Since the moment of inertia tensor is only a 3x3 matrix, a brute-force approach via the secular determinant is feasible:

<img src="../figures/determinant.png" height="60">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="../figures/dark/determinant.png">
<source media="(prefers-color-scheme: light)" srcset="../figures/determinant.png">
<img src="../figures/determinant.png" height="60">
</picture>

This leads to a cubic equation in &lambda;, which one can solve directly. Have fun with that.

Expand Down
30 changes: 25 additions & 5 deletions Project#02/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,33 @@ for the remainder of this project is the water molecule, optimized at the SCF/DZ
The primary input data for the harmonic vibrational calculation is the Hessian matrix,
which consists of second derivatives of the energy with respect to atomic positions.

<img src="./figures/hessian.png" height="50">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="./figures/dark/hessian.png">
<source media="(prefers-color-scheme: light)" srcset="./figures/hessian.png">
<img src="./figures/hessian.png" height="50">
</picture>

The Hessian matrix (in units of E<sub>h</sub>/a<sub>0</sub><sup>2</sup>) can be downloaded [here](./input/h2o_hessian.txt) for the H<sub>2</sub>O test case.
The first integer in the file is the number of atoms (which you should compare to the corresponding value from the geometry file as a test of consistency),
while the remaining values have the following format:

<img src="./figures/hessian-file-format.png" width="200">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="./figures/dark/hessian-file-format.png">
<source media="(prefers-color-scheme: light)" srcset="./figures/hessian-file-format.png">
<img src="./figures/hessian-file-format.png" width="200">
</picture>

* [Hint 1](./hints/hint1.md): Reading the Hessian

## Step 3: Mass-Weight the Hessian Matrix

Divide each element of the Hessian matrix by the product of square-roots of the masses of the atoms associated with the given coordinates:

<img src="./figures/mass-weighted-hessian.png" height="50">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="./figures/dark/mass-weighted-hessian.png">
<source media="(prefers-color-scheme: light)" srcset="./figures/mass-weighted-hessian.png">
<img src="./figures/mass-weighted-hessian.png" height="50">
</picture>

where m<sub>i</sub> represents the mass of the atom corresponding to atom *i*. Use atomic mass units (amu) for the masses, just as
for [Project #1](../Project%2301).
Expand All @@ -39,7 +51,11 @@ for [Project #1](../Project%2301).

Compute the eigenvalues of the mass-weighted Hessian:

<img src="./figures/diag-mass-weighted-hessian.png" height="20">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="./figures/dark/diag-mass-weighted-hessian.png">
<source media="(prefers-color-scheme: light)" srcset="./figures/diag-mass-weighted-hessian.png">
<img src="./figures/diag-mass-weighted-hessian.png" height="20">
</picture>

You should consider using the same canned diagonalization function
you used in [Project #1](../Project%2301).
Expand All @@ -50,7 +66,11 @@ you used in [Project #1](../Project%2301).

The vibrational frequencies are proportional to the squareroot of the eigenvalues of the mass-weighted Hessian:

<img src="./figures/vib-freq.png" height="25">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="./figures/dark/vib-freq.png">
<source media="(prefers-color-scheme: light)" srcset="./figures/vib-freq.png">
<img src="./figures/vib-freq.png" height="25">
</picture>

The most common units to use for vibrational frequencies is cm<sup>-1</sup>.

Expand Down
Binary file removed Project#02/figures/.DS_Store
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Project#02/figures/dark/hessian-file-format.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Project#02/figures/dark/hessian.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Project#02/figures/dark/mass-weighted-hessian.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Project#02/figures/dark/vib-freq.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Project#02/figures/diag-mass-weighted-hessian.pdf
Binary file not shown.
Binary file added Project#02/figures/hessian-file-format.pdf
Binary file not shown.
Binary file added Project#02/figures/hessian.pdf
Binary file not shown.
Binary file added Project#02/figures/mass-weighted-hessian.pdf
Binary file not shown.
Binary file added Project#02/figures/vib-freq.pdf
Binary file not shown.
Loading