diff --git a/Project#01/README.md b/Project#01/README.md
index b6a1d47..5741bb4 100644
--- a/Project#01/README.md
+++ b/Project#01/README.md
@@ -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:
-
+
+
+
+
+
where x, y, and z are Cartesian coordinates and i and j denote atomic indices.
@@ -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, φijk, between atoms i-j-k, where j is the central atom is given by:
-
+
+
+
+
+
where the eij are unit vectors between the atoms, e.g.,
-
+
+
+
+
+
- [Hint 1](./hints/hint3-1.md): Memory allocation for the unit vectors
- [Hint 2](./hints/hint3-2.md): Avoiding a divide-by-zero
@@ -56,7 +68,11 @@ where the eij 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 θijkl for atom i out of the plane containing atoms j-k-l (with k as the central atom, connected to i) is given by:
-
+
+
+
+
+
- [Hint 1](./hints/hint4-1.md): Memory allocation?
- [Hint 2](./hints/hint4-2.md): Cross products
@@ -67,7 +83,11 @@ Calculate all possible out-of-plane angles. For example, the angle θi
## Step 5: Torsion/Dihedral Angles
Calculate all possible torsional angles. For example, the torsional angle τijkl for the atom connectivity i-j-k-l is given by:
-
+
+
+
+
+
Can you also determine the sign of the torsional angle?
@@ -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:
-
+
+
+
+
+
where mi is the mass of atom i and the summation runs over all atoms in the molecule.
@@ -95,15 +119,27 @@ Calculate elements of the [moment of inertia tensor](http://en.wikipedia.org/wik
Diagonal:
-
+
+
+
+
+
Off-diagonal (add a negative sign):
-
+
+
+
+
+
Diagonalize the inertia tensor to obtain the principal moments of inertia:
-
+
+
+
+
+
Report the moments of inertia in amu bohr2, amu Å2, and g cm2.
@@ -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-1 and MHz:
-
+
+
+
+
+
- [Solution](./hints/step8-solution.md)
diff --git a/Project#01/figures/.DS_Store b/Project#01/figures/.DS_Store
deleted file mode 100644
index 09b6423..0000000
Binary files a/Project#01/figures/.DS_Store and /dev/null differ
diff --git a/Project#01/figures/dark/bond-angle.png b/Project#01/figures/dark/bond-angle.png
new file mode 100644
index 0000000..b8b9028
Binary files /dev/null and b/Project#01/figures/dark/bond-angle.png differ
diff --git a/Project#01/figures/dark/center-of-mass.png b/Project#01/figures/dark/center-of-mass.png
new file mode 100644
index 0000000..bfdc4a9
Binary files /dev/null and b/Project#01/figures/dark/center-of-mass.png differ
diff --git a/Project#01/figures/dark/determinant.png b/Project#01/figures/dark/determinant.png
new file mode 100644
index 0000000..7097457
Binary files /dev/null and b/Project#01/figures/dark/determinant.png differ
diff --git a/Project#01/figures/dark/distances.png b/Project#01/figures/dark/distances.png
new file mode 100644
index 0000000..4568498
Binary files /dev/null and b/Project#01/figures/dark/distances.png differ
diff --git a/Project#01/figures/dark/inertia-diag.png b/Project#01/figures/dark/inertia-diag.png
new file mode 100644
index 0000000..30b4a5d
Binary files /dev/null and b/Project#01/figures/dark/inertia-diag.png differ
diff --git a/Project#01/figures/dark/inertia-off-diag.png b/Project#01/figures/dark/inertia-off-diag.png
new file mode 100644
index 0000000..90ff2bb
Binary files /dev/null and b/Project#01/figures/dark/inertia-off-diag.png differ
diff --git a/Project#01/figures/dark/oop-angle.png b/Project#01/figures/dark/oop-angle.png
new file mode 100644
index 0000000..3d61b82
Binary files /dev/null and b/Project#01/figures/dark/oop-angle.png differ
diff --git a/Project#01/figures/dark/principal-mom-of-inertia.png b/Project#01/figures/dark/principal-mom-of-inertia.png
new file mode 100644
index 0000000..4182909
Binary files /dev/null and b/Project#01/figures/dark/principal-mom-of-inertia.png differ
diff --git a/Project#01/figures/dark/rot-const.png b/Project#01/figures/dark/rot-const.png
new file mode 100644
index 0000000..2dc2545
Binary files /dev/null and b/Project#01/figures/dark/rot-const.png differ
diff --git a/Project#01/figures/dark/torsion-angle.png b/Project#01/figures/dark/torsion-angle.png
new file mode 100644
index 0000000..3fb5825
Binary files /dev/null and b/Project#01/figures/dark/torsion-angle.png differ
diff --git a/Project#01/figures/dark/unit-vectors.png b/Project#01/figures/dark/unit-vectors.png
new file mode 100644
index 0000000..95e3180
Binary files /dev/null and b/Project#01/figures/dark/unit-vectors.png differ
diff --git a/Project#01/figures/determinant.pdf b/Project#01/figures/determinant.pdf
new file mode 100644
index 0000000..14fc205
Binary files /dev/null and b/Project#01/figures/determinant.pdf differ
diff --git a/Project#01/figures/determinant.png b/Project#01/figures/determinant.png
index 64e253d..98c0190 100644
Binary files a/Project#01/figures/determinant.png and b/Project#01/figures/determinant.png differ
diff --git a/Project#01/figures/distances2.png b/Project#01/figures/distances2.png
deleted file mode 100644
index bd36d35..0000000
Binary files a/Project#01/figures/distances2.png and /dev/null differ
diff --git a/Project#01/hints/hint7-1.md b/Project#01/hints/hint7-1.md
index 4aa7771..2a2f4ce 100644
--- a/Project#01/hints/hint7-1.md
+++ b/Project#01/hints/hint7-1.md
@@ -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:
-
+
+
+
+
+
This leads to a cubic equation in λ, which one can solve directly. Have fun with that.
diff --git a/Project#02/README.md b/Project#02/README.md
index 758b491..38dc35a 100644
--- a/Project#02/README.md
+++ b/Project#02/README.md
@@ -14,13 +14,21 @@ 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.
-
+
+
+
+
+
The Hessian matrix (in units of Eh/a02) can be downloaded [here](./input/h2o_hessian.txt) for the H2O 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:
-
+
+
+
+
+
* [Hint 1](./hints/hint1.md): Reading the Hessian
@@ -28,7 +36,11 @@ while the remaining values have the following format:
Divide each element of the Hessian matrix by the product of square-roots of the masses of the atoms associated with the given coordinates:
-
+
+
+
+
+
where mi 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).
@@ -39,7 +51,11 @@ for [Project #1](../Project%2301).
Compute the eigenvalues of the mass-weighted Hessian:
-
+
+
+
+
+
You should consider using the same canned diagonalization function
you used in [Project #1](../Project%2301).
@@ -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:
-
+
+
+
+
+
The most common units to use for vibrational frequencies is cm-1.
diff --git a/Project#02/figures/.DS_Store b/Project#02/figures/.DS_Store
deleted file mode 100644
index cbaa184..0000000
Binary files a/Project#02/figures/.DS_Store and /dev/null differ
diff --git a/Project#02/figures/dark/diag-mass-weighted-hessian.png b/Project#02/figures/dark/diag-mass-weighted-hessian.png
new file mode 100644
index 0000000..219e7d0
Binary files /dev/null and b/Project#02/figures/dark/diag-mass-weighted-hessian.png differ
diff --git a/Project#02/figures/dark/hessian-file-format.png b/Project#02/figures/dark/hessian-file-format.png
new file mode 100644
index 0000000..0999ebd
Binary files /dev/null and b/Project#02/figures/dark/hessian-file-format.png differ
diff --git a/Project#02/figures/dark/hessian.png b/Project#02/figures/dark/hessian.png
new file mode 100644
index 0000000..bb78904
Binary files /dev/null and b/Project#02/figures/dark/hessian.png differ
diff --git a/Project#02/figures/dark/mass-weighted-hessian.png b/Project#02/figures/dark/mass-weighted-hessian.png
new file mode 100644
index 0000000..6490b05
Binary files /dev/null and b/Project#02/figures/dark/mass-weighted-hessian.png differ
diff --git a/Project#02/figures/dark/vib-freq.png b/Project#02/figures/dark/vib-freq.png
new file mode 100644
index 0000000..c11ef2b
Binary files /dev/null and b/Project#02/figures/dark/vib-freq.png differ
diff --git a/Project#02/figures/diag-mass-weighted-hessian.pdf b/Project#02/figures/diag-mass-weighted-hessian.pdf
new file mode 100644
index 0000000..e47f29b
Binary files /dev/null and b/Project#02/figures/diag-mass-weighted-hessian.pdf differ
diff --git a/Project#02/figures/hessian-file-format.pdf b/Project#02/figures/hessian-file-format.pdf
new file mode 100644
index 0000000..509579a
Binary files /dev/null and b/Project#02/figures/hessian-file-format.pdf differ
diff --git a/Project#02/figures/hessian.pdf b/Project#02/figures/hessian.pdf
new file mode 100644
index 0000000..fdabad4
Binary files /dev/null and b/Project#02/figures/hessian.pdf differ
diff --git a/Project#02/figures/mass-weighted-hessian.pdf b/Project#02/figures/mass-weighted-hessian.pdf
new file mode 100644
index 0000000..a936a00
Binary files /dev/null and b/Project#02/figures/mass-weighted-hessian.pdf differ
diff --git a/Project#02/figures/vib-freq.pdf b/Project#02/figures/vib-freq.pdf
new file mode 100644
index 0000000..134a4c6
Binary files /dev/null and b/Project#02/figures/vib-freq.pdf differ
diff --git a/Project#03/README.md b/Project#03/README.md
index f0ff162..93ea913 100644
--- a/Project#03/README.md
+++ b/Project#03/README.md
@@ -26,19 +26,35 @@ Read the nuclear repulsion energy from the [enuc.dat](./input/h2o/STO-3G/enuc.da
Read the AO-basis [overlap](./input/h2o/STO-3G/s.dat)
-
+
+
+
+
+
[kinetic-energy](./input/h2o/STO-3G/t.dat)
-
+
+
+
+
+
[nuclear-attraction integrals](./input/h2o/STO-3G/v.dat)
-
+
+
+
+
+
and store them in appropriately constructed matrices. Then form the "core Hamiltonian":
-
+
+
+
+
+
Note that the one-electron integrals provided include only the *permutationally unique* integrals, but you should store the full matrices for convenience.
Note also that the AO indices on the integrals in the files start with "1" rather than "0".
@@ -52,24 +68,44 @@ Read the two-electron repulsion integrals from the
file.
The integrals in this file are provided in Mulliken notation over real AO basis functions:
-
+
+
+
+
+
Hence, the integrals obey the eight-fold permutational symmetry relationships:
-
+
+
+
+
+
and only the permutationally unique integrals are provided in the file, with the restriction that, for each integral, the following relationships hold:
-
+
+
+
+
+
where
-
+
+
+
+
+
Note that the two-electron integrals may be stored efficiently in a one-dimensional array and the above relationship used to map between given
μ, ν, λ, and σ indices and a "compound index" defined as:
-
+
+
+
+
+
* [Hint 1](./hints/hint3-1.md): Compound indices
* [Hint 2](./hints/hint3-2.md): Pre-Computed Lookup Arrays
@@ -80,13 +116,21 @@ Note that the two-electron integrals may be stored efficiently in a one-dimensio
Diagonalize the overlap matrix:
-
+
+
+
+
+
where LS is the matrix of eigenvectors (columns) and ΛS is the diagonal matrix of corresponding eigenvalues.
Build the symmetric orthogonalization matrix using:
-
+
+
+
+
+
where the tilde denotes the matrix transpose.
@@ -97,21 +141,37 @@ where the tilde denotes the matrix transpose.
Form an initial (guess) Fock matrix in the orthonormal AO basis using the core Hamiltonian as a guess:
-
+
+
+
+
+
Diagonalize the Fock matrix:
-
+
+
+
+
+
Note that the ε0 matrix contains the initial orbital energies.
Transform the eigenvectors into the original (non-orthogonal) AO basis:
-
+
+
+
+
+
Build the density matrix using the occupied MOs:
-
+
+
+
+
+
where *m* indexes the columns of the coefficient matrices, and the summation includes only the occupied spatial MOs.
@@ -123,11 +183,19 @@ where *m* indexes the columns of the coefficient matrices, and the summation inc
The SCF electronic energy may be computed using the density matrix as:
-
+
+
+
+
+
The total energy is the sum of the electronic energy and the nuclear repulsion energy:
-
+
+
+
+
+
where *0* denotes the initial SCF energy.
@@ -137,7 +205,11 @@ where *0* denotes the initial SCF energy.
Start the SCF iterative procedure by building a new Fock matrix using the previous iteration's density as:
-
+
+
+
+
+
where the double-summation runs over all the AOs and *i-1* denotes the density for the last iteration.
@@ -150,19 +222,35 @@ Form the new density matrix following the same procedure as in Step #5 above:
Orthogonalize:
-
+
+
+
+
+
Diagonalize:
-
+
+
+
+
+
Back-transform:
-
+
+
+
+
+
Compute the density:
-
+
+
+
+
+
where *i* denotes the current iteration density.
@@ -170,14 +258,22 @@ where *i* denotes the current iteration density.
Compute the new SCF energy as before:
-
+
+
+
+
+
where *i* denotes the SCF energy for the *i*th iteration.
## Step #10: Test for Convergence
Test both the energy and the density for convergence:
-
+
+
+
+
+
If the difference in consecutive SCF energy and the root-mean-squared difference in consecutive densities do not fall below the prescribed thresholds, return to Step #7 and continue from there.
@@ -187,22 +283,38 @@ If the difference in consecutive SCF energy and the root-mean-squared difference
### The MO-Basis Fock Matrix
At convergence, the canonical Hartree-Fock MOs are, by definition, eigenfunctions of the Fock operator, viz.
-
+
+
+
+
+
If we multiply on the left by an arbitrary MO and integrate, we obtain:
-
+
+
+
+
+
In other words, the Fock matrix should be diagonal in the MO basis, with the orbital energies as its diagonal elements. We can demonstrate this explicitly using the AO-basis Fock matrix by first re-writing the above expression using the LCAO-MO coefficients:
-
+
+
+
+
+
Use the above equation to transform the Fock matrix from the AO basis to the MO basis and demonstrate that it is indeed diagonal (to within the convergence limits of the SCF iterative procedure).
### One-Electron Properties
As discussed in detail in Ch. 3 of the text by Szabo and Ostlund, the calculation of one-electron properties requires density matrix and the relevant property integrals. The electronic contribution to the electric-dipole moment may be computed using,
-
+
+
+
+
+
where the vector notation implies three sets of dipole-moment integrals -- one for each Cartesian component of the dipole operator.
@@ -215,7 +327,11 @@ The test cases provided below include the structural information dipole integral
### Population Analysis/Atomic Charges
A Mulliken population analysis (also described in Szabo & Ostlund, Ch. 3) requires the overlap integrals and the electron density, in addition to information about the number of basis functions centered on each atom. The charge on atom *A* may be computed as:
-
+
+
+
+
+
where the summation is limited to only those basis functions centered on atom *A*.
diff --git a/Project#03/figures/atomic-charge.pdf b/Project#03/figures/atomic-charge.pdf
new file mode 100644
index 0000000..3a1f8d6
Binary files /dev/null and b/Project#03/figures/atomic-charge.pdf differ
diff --git a/Project#03/figures/atomic-charge.png b/Project#03/figures/atomic-charge.png
index 4442851..bab6f02 100644
Binary files a/Project#03/figures/atomic-charge.png and b/Project#03/figures/atomic-charge.png differ
diff --git a/Project#03/figures/back-transform-coeff.pdf b/Project#03/figures/back-transform-coeff.pdf
new file mode 100644
index 0000000..f13a9e6
Binary files /dev/null and b/Project#03/figures/back-transform-coeff.pdf differ
diff --git a/Project#03/figures/back-transform-coeff.png b/Project#03/figures/back-transform-coeff.png
index f5cfdce..130a12f 100644
Binary files a/Project#03/figures/back-transform-coeff.png and b/Project#03/figures/back-transform-coeff.png differ
diff --git a/Project#03/figures/canonical-mos.pdf b/Project#03/figures/canonical-mos.pdf
new file mode 100644
index 0000000..6f4ecc3
Binary files /dev/null and b/Project#03/figures/canonical-mos.pdf differ
diff --git a/Project#03/figures/compound-index-restrictions.pdf b/Project#03/figures/compound-index-restrictions.pdf
new file mode 100644
index 0000000..87cc7e2
Binary files /dev/null and b/Project#03/figures/compound-index-restrictions.pdf differ
diff --git a/Project#03/figures/compound-index-restrictions2.pdf b/Project#03/figures/compound-index-restrictions2.pdf
new file mode 100644
index 0000000..e956d20
Binary files /dev/null and b/Project#03/figures/compound-index-restrictions2.pdf differ
diff --git a/Project#03/figures/compute-density.pdf b/Project#03/figures/compute-density.pdf
new file mode 100644
index 0000000..39b6297
Binary files /dev/null and b/Project#03/figures/compute-density.pdf differ
diff --git a/Project#03/figures/compute-density.png b/Project#03/figures/compute-density.png
index 11f9918..e868308 100644
Binary files a/Project#03/figures/compute-density.png and b/Project#03/figures/compute-density.png differ
diff --git a/Project#03/figures/compute-new-scf-energy.pdf b/Project#03/figures/compute-new-scf-energy.pdf
new file mode 100644
index 0000000..b0ac3ca
Binary files /dev/null and b/Project#03/figures/compute-new-scf-energy.pdf differ
diff --git a/Project#03/figures/compute-new-scf-energy.png b/Project#03/figures/compute-new-scf-energy.png
index 8d7bcf2..0d9b5c8 100644
Binary files a/Project#03/figures/compute-new-scf-energy.png and b/Project#03/figures/compute-new-scf-energy.png differ
diff --git a/Project#03/figures/convergence-test.pdf b/Project#03/figures/convergence-test.pdf
new file mode 100644
index 0000000..71c9d75
Binary files /dev/null and b/Project#03/figures/convergence-test.pdf differ
diff --git a/Project#03/figures/convergence-test.png b/Project#03/figures/convergence-test.png
index 0407b5a..5fb69b0 100644
Binary files a/Project#03/figures/convergence-test.png and b/Project#03/figures/convergence-test.png differ
diff --git a/Project#03/figures/core-hamiltonian.pdf b/Project#03/figures/core-hamiltonian.pdf
new file mode 100644
index 0000000..265b209
Binary files /dev/null and b/Project#03/figures/core-hamiltonian.pdf differ
diff --git a/Project#03/figures/dark/atomic-charge.png b/Project#03/figures/dark/atomic-charge.png
new file mode 100644
index 0000000..118de51
Binary files /dev/null and b/Project#03/figures/dark/atomic-charge.png differ
diff --git a/Project#03/figures/dark/back-transform-coeff.png b/Project#03/figures/dark/back-transform-coeff.png
new file mode 100644
index 0000000..07e7cef
Binary files /dev/null and b/Project#03/figures/dark/back-transform-coeff.png differ
diff --git a/Project#03/figures/dark/canonical-mos.png b/Project#03/figures/dark/canonical-mos.png
new file mode 100644
index 0000000..567a929
Binary files /dev/null and b/Project#03/figures/dark/canonical-mos.png differ
diff --git a/Project#03/figures/dark/compound-index-restrictions.png b/Project#03/figures/dark/compound-index-restrictions.png
new file mode 100644
index 0000000..14cf9a4
Binary files /dev/null and b/Project#03/figures/dark/compound-index-restrictions.png differ
diff --git a/Project#03/figures/dark/compound-index-restrictions2.png b/Project#03/figures/dark/compound-index-restrictions2.png
new file mode 100644
index 0000000..a899bff
Binary files /dev/null and b/Project#03/figures/dark/compound-index-restrictions2.png differ
diff --git a/Project#03/figures/dark/compute-density.png b/Project#03/figures/dark/compute-density.png
new file mode 100644
index 0000000..3f8fabc
Binary files /dev/null and b/Project#03/figures/dark/compute-density.png differ
diff --git a/Project#03/figures/dark/compute-new-scf-energy.png b/Project#03/figures/dark/compute-new-scf-energy.png
new file mode 100644
index 0000000..c35c3c9
Binary files /dev/null and b/Project#03/figures/dark/compute-new-scf-energy.png differ
diff --git a/Project#03/figures/dark/convergence-test.png b/Project#03/figures/dark/convergence-test.png
new file mode 100644
index 0000000..a06dddc
Binary files /dev/null and b/Project#03/figures/dark/convergence-test.png differ
diff --git a/Project#03/figures/dark/core-hamiltonian.png b/Project#03/figures/dark/core-hamiltonian.png
new file mode 100644
index 0000000..14da9f5
Binary files /dev/null and b/Project#03/figures/dark/core-hamiltonian.png differ
diff --git a/Project#03/figures/dark/density-matrix.png b/Project#03/figures/dark/density-matrix.png
new file mode 100644
index 0000000..555ce70
Binary files /dev/null and b/Project#03/figures/dark/density-matrix.png differ
diff --git a/Project#03/figures/dark/diag-fock.png b/Project#03/figures/dark/diag-fock.png
new file mode 100644
index 0000000..d2723a5
Binary files /dev/null and b/Project#03/figures/dark/diag-fock.png differ
diff --git a/Project#03/figures/dark/diag-mw-hessian.png b/Project#03/figures/dark/diag-mw-hessian.png
new file mode 100644
index 0000000..430a5ff
Binary files /dev/null and b/Project#03/figures/dark/diag-mw-hessian.png differ
diff --git a/Project#03/figures/dark/diag-new-fock.png b/Project#03/figures/dark/diag-new-fock.png
new file mode 100644
index 0000000..1346f83
Binary files /dev/null and b/Project#03/figures/dark/diag-new-fock.png differ
diff --git a/Project#03/figures/dark/electric-dipole-moment.png b/Project#03/figures/dark/electric-dipole-moment.png
new file mode 100644
index 0000000..10bf648
Binary files /dev/null and b/Project#03/figures/dark/electric-dipole-moment.png differ
diff --git a/Project#03/figures/dark/eri.png b/Project#03/figures/dark/eri.png
new file mode 100644
index 0000000..f432834
Binary files /dev/null and b/Project#03/figures/dark/eri.png differ
diff --git a/Project#03/figures/dark/index-restrictions.png b/Project#03/figures/dark/index-restrictions.png
new file mode 100644
index 0000000..4c624d8
Binary files /dev/null and b/Project#03/figures/dark/index-restrictions.png differ
diff --git a/Project#03/figures/dark/initial-fock.png b/Project#03/figures/dark/initial-fock.png
new file mode 100644
index 0000000..8b039db
Binary files /dev/null and b/Project#03/figures/dark/initial-fock.png differ
diff --git a/Project#03/figures/dark/initial-scf-energy.png b/Project#03/figures/dark/initial-scf-energy.png
new file mode 100644
index 0000000..efe2b14
Binary files /dev/null and b/Project#03/figures/dark/initial-scf-energy.png differ
diff --git a/Project#03/figures/dark/initial-total-energy.png b/Project#03/figures/dark/initial-total-energy.png
new file mode 100644
index 0000000..45f0a36
Binary files /dev/null and b/Project#03/figures/dark/initial-total-energy.png differ
diff --git a/Project#03/figures/dark/ioff-compound-index.png b/Project#03/figures/dark/ioff-compound-index.png
new file mode 100644
index 0000000..699004b
Binary files /dev/null and b/Project#03/figures/dark/ioff-compound-index.png differ
diff --git a/Project#03/figures/dark/ioff-compound-index2.png b/Project#03/figures/dark/ioff-compound-index2.png
new file mode 100644
index 0000000..05fa9e3
Binary files /dev/null and b/Project#03/figures/dark/ioff-compound-index2.png differ
diff --git a/Project#03/figures/dark/ioff-final-compound-index.png b/Project#03/figures/dark/ioff-final-compound-index.png
new file mode 100644
index 0000000..f5c8afc
Binary files /dev/null and b/Project#03/figures/dark/ioff-final-compound-index.png differ
diff --git a/Project#03/figures/dark/kinetic-energy.png b/Project#03/figures/dark/kinetic-energy.png
new file mode 100644
index 0000000..2dc743d
Binary files /dev/null and b/Project#03/figures/dark/kinetic-energy.png differ
diff --git a/Project#03/figures/dark/lower-triang-numbered-matrix.png b/Project#03/figures/dark/lower-triang-numbered-matrix.png
new file mode 100644
index 0000000..69faf99
Binary files /dev/null and b/Project#03/figures/dark/lower-triang-numbered-matrix.png differ
diff --git a/Project#03/figures/dark/lower-triang-numbered-matrix2.png b/Project#03/figures/dark/lower-triang-numbered-matrix2.png
new file mode 100644
index 0000000..a4181ad
Binary files /dev/null and b/Project#03/figures/dark/lower-triang-numbered-matrix2.png differ
diff --git a/Project#03/figures/dark/mo-fock-matrix-element.png b/Project#03/figures/dark/mo-fock-matrix-element.png
new file mode 100644
index 0000000..0540956
Binary files /dev/null and b/Project#03/figures/dark/mo-fock-matrix-element.png differ
diff --git a/Project#03/figures/dark/mo-fock-matrix.png b/Project#03/figures/dark/mo-fock-matrix.png
new file mode 100644
index 0000000..577df61
Binary files /dev/null and b/Project#03/figures/dark/mo-fock-matrix.png differ
diff --git a/Project#03/figures/dark/n-by-n-symmetric-matrix.png b/Project#03/figures/dark/n-by-n-symmetric-matrix.png
new file mode 100644
index 0000000..20f6594
Binary files /dev/null and b/Project#03/figures/dark/n-by-n-symmetric-matrix.png differ
diff --git a/Project#03/figures/dark/new-fock.png b/Project#03/figures/dark/new-fock.png
new file mode 100644
index 0000000..b52415a
Binary files /dev/null and b/Project#03/figures/dark/new-fock.png differ
diff --git a/Project#03/figures/dark/nuclear-attraction.png b/Project#03/figures/dark/nuclear-attraction.png
new file mode 100644
index 0000000..4934b9e
Binary files /dev/null and b/Project#03/figures/dark/nuclear-attraction.png differ
diff --git a/Project#03/figures/dark/orthog-fock.png b/Project#03/figures/dark/orthog-fock.png
new file mode 100644
index 0000000..1b3af12
Binary files /dev/null and b/Project#03/figures/dark/orthog-fock.png differ
diff --git a/Project#03/figures/dark/overlap.png b/Project#03/figures/dark/overlap.png
new file mode 100644
index 0000000..cfa3cee
Binary files /dev/null and b/Project#03/figures/dark/overlap.png differ
diff --git a/Project#03/figures/dark/permutational-symmetry.png b/Project#03/figures/dark/permutational-symmetry.png
new file mode 100644
index 0000000..e85b162
Binary files /dev/null and b/Project#03/figures/dark/permutational-symmetry.png differ
diff --git a/Project#03/figures/dark/symm-orthog-matrix.png b/Project#03/figures/dark/symm-orthog-matrix.png
new file mode 100644
index 0000000..82d08f2
Binary files /dev/null and b/Project#03/figures/dark/symm-orthog-matrix.png differ
diff --git a/Project#03/figures/dark/symmetric-integral-matrix.png b/Project#03/figures/dark/symmetric-integral-matrix.png
new file mode 100644
index 0000000..331dca6
Binary files /dev/null and b/Project#03/figures/dark/symmetric-integral-matrix.png differ
diff --git a/Project#03/figures/dark/transform-coeff.png b/Project#03/figures/dark/transform-coeff.png
new file mode 100644
index 0000000..6b73313
Binary files /dev/null and b/Project#03/figures/dark/transform-coeff.png differ
diff --git a/Project#03/figures/density-matrix.pdf b/Project#03/figures/density-matrix.pdf
new file mode 100644
index 0000000..5a84ad8
Binary files /dev/null and b/Project#03/figures/density-matrix.pdf differ
diff --git a/Project#03/figures/density-matrix.png b/Project#03/figures/density-matrix.png
index e64ef97..d3412f3 100644
Binary files a/Project#03/figures/density-matrix.png and b/Project#03/figures/density-matrix.png differ
diff --git a/Project#03/figures/diag-fock.pdf b/Project#03/figures/diag-fock.pdf
new file mode 100644
index 0000000..dab65d5
Binary files /dev/null and b/Project#03/figures/diag-fock.pdf differ
diff --git a/Project#03/figures/diag-fock.png b/Project#03/figures/diag-fock.png
index 27f3249..65aef6d 100644
Binary files a/Project#03/figures/diag-fock.png and b/Project#03/figures/diag-fock.png differ
diff --git a/Project#03/figures/diag-mw-hessian.pdf b/Project#03/figures/diag-mw-hessian.pdf
new file mode 100644
index 0000000..6fb1dae
Binary files /dev/null and b/Project#03/figures/diag-mw-hessian.pdf differ
diff --git a/Project#03/figures/diag-new-fock.pdf b/Project#03/figures/diag-new-fock.pdf
new file mode 100644
index 0000000..0b302f8
Binary files /dev/null and b/Project#03/figures/diag-new-fock.pdf differ
diff --git a/Project#03/figures/diag-new-fock.png b/Project#03/figures/diag-new-fock.png
index e6db263..f9e2fb0 100644
Binary files a/Project#03/figures/diag-new-fock.png and b/Project#03/figures/diag-new-fock.png differ
diff --git a/Project#03/figures/electric-dipole-moment.pdf b/Project#03/figures/electric-dipole-moment.pdf
new file mode 100644
index 0000000..68ab4af
Binary files /dev/null and b/Project#03/figures/electric-dipole-moment.pdf differ
diff --git a/Project#03/figures/index-restrictions.pdf b/Project#03/figures/index-restrictions.pdf
new file mode 100644
index 0000000..4906974
Binary files /dev/null and b/Project#03/figures/index-restrictions.pdf differ
diff --git a/Project#03/figures/initial-fock.pdf b/Project#03/figures/initial-fock.pdf
new file mode 100644
index 0000000..35a3d21
Binary files /dev/null and b/Project#03/figures/initial-fock.pdf differ
diff --git a/Project#03/figures/initial-fock.png b/Project#03/figures/initial-fock.png
index da37342..f42977a 100644
Binary files a/Project#03/figures/initial-fock.png and b/Project#03/figures/initial-fock.png differ
diff --git a/Project#03/figures/initial-scf-energy.pdf b/Project#03/figures/initial-scf-energy.pdf
new file mode 100644
index 0000000..c13250a
Binary files /dev/null and b/Project#03/figures/initial-scf-energy.pdf differ
diff --git a/Project#03/figures/initial-total-energy.pdf b/Project#03/figures/initial-total-energy.pdf
new file mode 100644
index 0000000..b9b6ec8
Binary files /dev/null and b/Project#03/figures/initial-total-energy.pdf differ
diff --git a/Project#03/figures/ioff-compound-index.pdf b/Project#03/figures/ioff-compound-index.pdf
new file mode 100644
index 0000000..0fdef8d
Binary files /dev/null and b/Project#03/figures/ioff-compound-index.pdf differ
diff --git a/Project#03/figures/ioff-compound-index.png b/Project#03/figures/ioff-compound-index.png
index 993be3f..1d44f9c 100644
Binary files a/Project#03/figures/ioff-compound-index.png and b/Project#03/figures/ioff-compound-index.png differ
diff --git a/Project#03/figures/ioff-compound-index2.pdf b/Project#03/figures/ioff-compound-index2.pdf
new file mode 100644
index 0000000..6f3ef15
Binary files /dev/null and b/Project#03/figures/ioff-compound-index2.pdf differ
diff --git a/Project#03/figures/ioff-compound-index2.png b/Project#03/figures/ioff-compound-index2.png
index f441216..5c4ed54 100644
Binary files a/Project#03/figures/ioff-compound-index2.png and b/Project#03/figures/ioff-compound-index2.png differ
diff --git a/Project#03/figures/ioff-final-compound-index.pdf b/Project#03/figures/ioff-final-compound-index.pdf
new file mode 100644
index 0000000..99310a0
Binary files /dev/null and b/Project#03/figures/ioff-final-compound-index.pdf differ
diff --git a/Project#03/figures/ioff-final-compound-index.png b/Project#03/figures/ioff-final-compound-index.png
index 8946085..42b2d18 100644
Binary files a/Project#03/figures/ioff-final-compound-index.png and b/Project#03/figures/ioff-final-compound-index.png differ
diff --git a/Project#03/figures/kinetic-energy.pdf b/Project#03/figures/kinetic-energy.pdf
new file mode 100644
index 0000000..3091987
Binary files /dev/null and b/Project#03/figures/kinetic-energy.pdf differ
diff --git a/Project#03/figures/lower-triang-numbered-matrix.pdf b/Project#03/figures/lower-triang-numbered-matrix.pdf
new file mode 100644
index 0000000..89226ef
Binary files /dev/null and b/Project#03/figures/lower-triang-numbered-matrix.pdf differ
diff --git a/Project#03/figures/lower-triang-numbered-matrix.png b/Project#03/figures/lower-triang-numbered-matrix.png
index b05304a..2e2e9ed 100644
Binary files a/Project#03/figures/lower-triang-numbered-matrix.png and b/Project#03/figures/lower-triang-numbered-matrix.png differ
diff --git a/Project#03/figures/lower-triang-numbered-matrix2.pdf b/Project#03/figures/lower-triang-numbered-matrix2.pdf
new file mode 100644
index 0000000..dff2c14
Binary files /dev/null and b/Project#03/figures/lower-triang-numbered-matrix2.pdf differ
diff --git a/Project#03/figures/lower-triang-numbered-matrix2.png b/Project#03/figures/lower-triang-numbered-matrix2.png
index 20d71ec..3846b14 100644
Binary files a/Project#03/figures/lower-triang-numbered-matrix2.png and b/Project#03/figures/lower-triang-numbered-matrix2.png differ
diff --git a/Project#03/figures/mo-fock-matrix-element.pdf b/Project#03/figures/mo-fock-matrix-element.pdf
new file mode 100644
index 0000000..042cc20
Binary files /dev/null and b/Project#03/figures/mo-fock-matrix-element.pdf differ
diff --git a/Project#03/figures/mo-fock-matrix-element.png b/Project#03/figures/mo-fock-matrix-element.png
index 7f1bead..16a5940 100644
Binary files a/Project#03/figures/mo-fock-matrix-element.png and b/Project#03/figures/mo-fock-matrix-element.png differ
diff --git a/Project#03/figures/mo-fock-matrix.pdf b/Project#03/figures/mo-fock-matrix.pdf
new file mode 100644
index 0000000..e548e48
Binary files /dev/null and b/Project#03/figures/mo-fock-matrix.pdf differ
diff --git a/Project#03/figures/n-by-n-symmetric-matrix.pdf b/Project#03/figures/n-by-n-symmetric-matrix.pdf
new file mode 100644
index 0000000..c5f14d4
Binary files /dev/null and b/Project#03/figures/n-by-n-symmetric-matrix.pdf differ
diff --git a/Project#03/figures/n-by-n-symmetric-matrix.png b/Project#03/figures/n-by-n-symmetric-matrix.png
index fb462ff..634f8ac 100644
Binary files a/Project#03/figures/n-by-n-symmetric-matrix.png and b/Project#03/figures/n-by-n-symmetric-matrix.png differ
diff --git a/Project#03/figures/new-fock.pdf b/Project#03/figures/new-fock.pdf
new file mode 100644
index 0000000..9cd4c88
Binary files /dev/null and b/Project#03/figures/new-fock.pdf differ
diff --git a/Project#03/figures/new-fock.png b/Project#03/figures/new-fock.png
index d93fd8b..b58b622 100644
Binary files a/Project#03/figures/new-fock.png and b/Project#03/figures/new-fock.png differ
diff --git a/Project#03/figures/nuclear-attraction.pdf b/Project#03/figures/nuclear-attraction.pdf
new file mode 100644
index 0000000..288d6d1
Binary files /dev/null and b/Project#03/figures/nuclear-attraction.pdf differ
diff --git a/Project#03/figures/orthog-fock.pdf b/Project#03/figures/orthog-fock.pdf
new file mode 100644
index 0000000..376ac39
Binary files /dev/null and b/Project#03/figures/orthog-fock.pdf differ
diff --git a/Project#03/figures/orthog-fock.png b/Project#03/figures/orthog-fock.png
index 24d63d5..bf38e06 100644
Binary files a/Project#03/figures/orthog-fock.png and b/Project#03/figures/orthog-fock.png differ
diff --git a/Project#03/figures/overlap.pdf b/Project#03/figures/overlap.pdf
new file mode 100644
index 0000000..4973634
Binary files /dev/null and b/Project#03/figures/overlap.pdf differ
diff --git a/Project#03/figures/permutational-symmetry.pdf b/Project#03/figures/permutational-symmetry.pdf
new file mode 100644
index 0000000..866807b
Binary files /dev/null and b/Project#03/figures/permutational-symmetry.pdf differ
diff --git a/Project#03/figures/symm-orthog-matrix.pdf b/Project#03/figures/symm-orthog-matrix.pdf
new file mode 100644
index 0000000..d1a4727
Binary files /dev/null and b/Project#03/figures/symm-orthog-matrix.pdf differ
diff --git a/Project#03/figures/symm-orthog-matrix.png b/Project#03/figures/symm-orthog-matrix.png
index 7a9051a..e5cc025 100644
Binary files a/Project#03/figures/symm-orthog-matrix.png and b/Project#03/figures/symm-orthog-matrix.png differ
diff --git a/Project#03/figures/symmetric-integral-matrix.pdf b/Project#03/figures/symmetric-integral-matrix.pdf
new file mode 100644
index 0000000..02fc2fb
Binary files /dev/null and b/Project#03/figures/symmetric-integral-matrix.pdf differ
diff --git a/Project#03/figures/symmetric-integral-matrix.png b/Project#03/figures/symmetric-integral-matrix.png
index eebcc2a..10ff9e5 100644
Binary files a/Project#03/figures/symmetric-integral-matrix.png and b/Project#03/figures/symmetric-integral-matrix.png differ
diff --git a/Project#03/figures/transform-coeff.pdf b/Project#03/figures/transform-coeff.pdf
new file mode 100644
index 0000000..66b2de2
Binary files /dev/null and b/Project#03/figures/transform-coeff.pdf differ
diff --git a/Project#03/figures/transform-coeff.png b/Project#03/figures/transform-coeff.png
index 12dfbb0..70db3df 100644
Binary files a/Project#03/figures/transform-coeff.png and b/Project#03/figures/transform-coeff.png differ
diff --git a/Project#03/hints/hint3-1.md b/Project#03/hints/hint3-1.md
index 1446996..dd81ad5 100644
--- a/Project#03/hints/hint3-1.md
+++ b/Project#03/hints/hint3-1.md
@@ -1,15 +1,27 @@
## Symettric Matrices
How do we conveniently store the elements of the four-dimensional two-electron integral array in a one-dimensional array? Consider the lower triangle of an *n x n* symmetric matrix:
-
+
+
+
+
+
The total number of elements in the lower triangle is *M = n(n+1)/2*. We could store these in a one-dimensional array by ordering them from top-to-bottom, left-to-right:
-
+
+
+
+
+
How do we translate row (*i*) and column (*j*) indices of the matrix to the position in the linear array (*ij*)?
-
+
+
+
+
+
Here's a code block to calculate the compound index using a standard [if-then-else conditional](https://github.com/CrawfordGroup/ProgrammingProjects/wiki/Control-Statements):
```c++
@@ -28,8 +40,16 @@ Here's an equivalent piece of code that requires fewer keystrokes:
## Four-Dimensional Arrays
The eight-fold permutational symmetry of the two-electron repulsion integrals can be viewed similarly. The Mulliken-notation integrals are symmetric to permutations of the bra indices or of the ket indices. Hence, we can view the integral list as a symmetric "super-matrix" of the form:
-
+
+
+
+
+
Thus, just as for the two-dimensional case above, we only need to store the lower triangle of this matrix, and a one-dimensional array of length *M(M+1)/2* will do the trick. Given four AO indices, *i*, *j*, *k*, and *l* corresponding to the integral, (ij|kl), we can translate these into compound row (*ij*) and column (*kl*) indices using the expression above, as well as the final compound index:
-
+
+
+
+
+
diff --git a/Project#03/hints/hint3-2.md b/Project#03/hints/hint3-2.md
index 77b74c5..1b39089 100644
--- a/Project#03/hints/hint3-2.md
+++ b/Project#03/hints/hint3-2.md
@@ -1,10 +1,18 @@
If you've written your program so that the two-electron integrals are stored in a one-dimensional array, you may have recognized that your program spends quite a bit of its time calculating compound indices. Is there a way to speed up this process? Sure! Pre-compute the indices instead. Look again at the structure of a symmetric matrix, with the elements of the lower triangle numbered top-to-bottom/left-to-right:
-
+
+
+
+
+
We calculate these above values from the raw row and column indices, *i* and *j*, respectively using:
-
+
+
+
+
+
The expensive part of the above expression is the repeated evaluation of the *i(i+1)/2* and *j(j+1)/2* parts (which correspond to the first column of numbers in the above matrix). However, if we were to build an integer array (named `ioff`, for example) to store these values, then we could simplify the task to use array look-ups instead:
```c++
diff --git a/Project#04/README.md b/Project#04/README.md
index fabf300..6ef18d7 100644
--- a/Project#04/README.md
+++ b/Project#04/README.md
@@ -7,7 +7,11 @@ The theoretical background and a concise set of instructions for this project ma
## Step #1: Read the Two-Electron Integrals
The Mulliken-ordered integrals are defined as:
-
+
+
+
+
+
Concise instructions for this step can be found in [Project #3](../Project%2303).
@@ -18,7 +22,11 @@ Use the values you computed in the Hartree-Fock program of [Project #3](../Proje
The most straightforward expression of the AO/MO integral transformation is
-
+
+
+
+
+
This approach is easy to implement (hence the word "[noddy](http://www.hackerslang.com/noddy.html)" above), but is expensive due to its N8 computational order. Nevertheless, you should start with this algorithm to get your code working, and run timings (use the UNIX "time" command) for the test cases below to get an idea of its computational cost.
@@ -27,7 +35,11 @@ This approach is easy to implement (hence the word "[noddy](http://www.hackersla
Notice that none of the *C* coefficients in the above expression have any indices in common. Thus, the summation could be rearranged such that:
-
+
+
+
+
+
This means that each summation within brackets could be carried out separately,
starting from the innermost summation over σ, if we store the results at each step. This reduces the N8 algorithm above to four N5 steps.
@@ -41,7 +53,11 @@ After you have the noddy algorithm working and timed, modify it to use this smar
## Step #4: Compute the MP2 Energy
-
+
+
+
+
+
where *i* and *j* denote doubly-occupied orbitals and *a* and *b* unoccupied orbitals, and the denominator involves the MO energies.
diff --git a/Project#04/figures/dark/eri.png b/Project#04/figures/dark/eri.png
new file mode 100644
index 0000000..e2b799e
Binary files /dev/null and b/Project#04/figures/dark/eri.png differ
diff --git a/Project#04/figures/dark/mp2-energy.png b/Project#04/figures/dark/mp2-energy.png
new file mode 100644
index 0000000..f431df7
Binary files /dev/null and b/Project#04/figures/dark/mp2-energy.png differ
diff --git a/Project#04/figures/dark/noddy-transform.png b/Project#04/figures/dark/noddy-transform.png
new file mode 100644
index 0000000..c61cc81
Binary files /dev/null and b/Project#04/figures/dark/noddy-transform.png differ
diff --git a/Project#04/figures/dark/smart-transform.png b/Project#04/figures/dark/smart-transform.png
new file mode 100644
index 0000000..506fe95
Binary files /dev/null and b/Project#04/figures/dark/smart-transform.png differ
diff --git a/Project#04/figures/eri.pdf b/Project#04/figures/eri.pdf
new file mode 100644
index 0000000..acc61bf
Binary files /dev/null and b/Project#04/figures/eri.pdf differ
diff --git a/Project#04/figures/eri.png b/Project#04/figures/eri.png
index b1d8f52..e9705f7 100644
Binary files a/Project#04/figures/eri.png and b/Project#04/figures/eri.png differ
diff --git a/Project#04/figures/mp2-energy.pdf b/Project#04/figures/mp2-energy.pdf
new file mode 100644
index 0000000..d3eb886
Binary files /dev/null and b/Project#04/figures/mp2-energy.pdf differ
diff --git a/Project#04/figures/noddy-transform.pdf b/Project#04/figures/noddy-transform.pdf
new file mode 100644
index 0000000..cc0dcf4
Binary files /dev/null and b/Project#04/figures/noddy-transform.pdf differ
diff --git a/Project#04/figures/smart-transform.pdf b/Project#04/figures/smart-transform.pdf
new file mode 100644
index 0000000..2c7bc78
Binary files /dev/null and b/Project#04/figures/smart-transform.pdf differ