Skip to content

Commit

Permalink
small edit to citation generator
Browse files Browse the repository at this point in the history
  • Loading branch information
tjira committed Oct 3, 2024
1 parent e99c7ae commit 2251daf
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 17 deletions.
4 changes: 2 additions & 2 deletions docs/pages/coupledcluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ taking advantage of the exponential form of the wavefunction. We could then proc

## Implementation of CCD and CCSD

The derivation of the equations that are actually used to perform the calculations is quite lengthy and involves a lot of algebra. We will not go into the details here, but we will provide the final expressions for the Coupled Cluster Doubles and Coupled Cluster Singles and Doubles methods. The Coupled Cluster Doubles and Coupled Cluster Singles and Doubles methods are the most commonly used Coupled Cluster methods, and they are often used as benchmarks for other methods. All we need for the evaluation of the expressions below are the Coulomb integrals in the MS basis and physicists' notation, Fock matrix in the MS basis and the orbital energies obtained from the Hartree--Fock calculation. All these transformations are already explained [here](hartreefockmethod.html#the-integral-transforms) in the Hartree--Fock section. The expressions for the Coupled Cluster Doubles can be written as
The derivation of the equations that are actually used to perform the calculations is quite lengthy and involves a lot of algebra. We will not go into the details here, but we will provide the final expressions for the Coupled Cluster Doubles and Coupled Cluster Singles and Doubles methods.<!--\cite{10.1063/1.460620}--> The Coupled Cluster Doubles and Coupled Cluster Singles and Doubles methods are the most commonly used Coupled Cluster methods, and they are often used as benchmarks for other methods. All we need for the evaluation of the expressions below are the Coulomb integrals in the MS basis and physicists' notation, Fock matrix in the MS basis and the orbital energies obtained from the Hartree--Fock calculation. All these transformations are already explained [here](hartreefockmethod.html#the-integral-transforms) in the Hartree--Fock section. The expressions for the Coupled Cluster Doubles can be written as

\begin{equation}
E\_{\text{CCD}}=\frac{1}{4}\braket{ij||ab}t\_{ij}^{ab}
Expand Down Expand Up @@ -109,7 +109,7 @@ t\_{ij}^{ab}=&\braket{ab||ij}+\hat{P}\_{(a/b)}\sum\_et\_{ij}^{ae}\left(\mathscr{
&+\hat{P}\_{(i/j)}\sum\_et\_i^e\braket{ab||ej}-\hat{P}\_{(a/b)}\sum\_mt\_m^a\braket{mb||ij}
\end{align}

The Coupled Cluster Singles and Doubles amplitude equations are, again, nonlinear and require iterative solution methods to obtain the final amplitudes. The initial guess for the amplitudes is often set to zero, and the equations are solved iteratively until convergence is achieved.<!--\cite{10.1063/1.460620}-->
The Coupled Cluster Singles and Doubles amplitude equations are, again, nonlinear and require iterative solution methods to obtain the final amplitudes. The initial guess for the amplitudes is often set to zero, and the equations are solved iteratively until convergence is achieved.

{:.cite}
> Stanton, John F., Jürgen Gauss, John D. Watts, and Rodney J. Bartlett. 1991. “A Direct Product Decomposition Approach for Symmetry Exploitation in Many-Body Methods. I. Energy Calculations.” *The Journal of Chemical Physics* 94: 4334–45. <https://doi.org/10.1063/1.460620>.
Expand Down
4 changes: 3 additions & 1 deletion docs/pages/hartreefockmethod.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ and the two-electron Coulomb repulsion integrals
J\_{\mu\nu\kappa\lambda}=\braket{\phi\_{\mu}\phi\_{\mu}|\hat{J}|\phi\_{\kappa}\phi\_{\lambda}},
\end{equation}

which play crucial roles in the Hartree--Fock calculation. The Hartree--Fock method revolves around solving the Roothaan equations \ref{eq:roothaan} iteratively. The Fock matrix is defined as
which play crucial roles in the Hartree--Fock calculation.<!--\cite{10.1016/S0065-3276!08!60019-2}--> The Hartree--Fock method revolves around solving the Roothaan equations \ref{eq:roothaan} iteratively. The Fock matrix is defined as

\begin{equation}\label{eq:fock}
F\_{\mu\nu}=H\_{\mu\nu}^{core}+D\_{\kappa\lambda}(J\_{\mu\nu\kappa\lambda}-\frac{1}{2}J\_{\mu\lambda\kappa\nu})
Expand Down Expand Up @@ -148,3 +148,5 @@ A\_{pq}^{MS}=C\_{\mu p}^{MS}(\mathbf{I}\_{2}\otimes\_K\mathbf{A})\_{\mu\nu}C\_{\
where $\mathbf{A}$ is an arbitrary one-electron integral.

{:.cite}
> Gill, Peter M. W. 1994. “Molecular Integrals over Gaussian Basis Functions.” In, edited by John R. Sabin and Michael C. Zerner, 25:141–205. Advances in Quantum Chemistry. Academic Press. <https://doi.org/10.1016/S0065-3276(08)60019-2>.
>
6 changes: 3 additions & 3 deletions docs/pages/mollerplessetperturbationtheory.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@ where $s$ runs over all doubly excited determinants, $H\_{0s}^{'}$ is the matrix

## Implementation of 2nd and 3rd Order Corrections

Having the antisymmetrized Coulomb integrals in the MS basis and physicists' notation defined [here](hartreefockmethod.html#the-integral-transforms), we can now proceed with the calculation of the correlation energy. We wil use the convention, that the indices $i$, $j$, $k$, and $l$ run over occupied spinorbitals, while the indices $a$, $b$, $c$, and $d$ run over virtual spinorbitals. The 2nd-order and 3rd-order correlation energies are given by the following expressions.
Having the antisymmetrized Coulomb integrals in the MS basis and physicists' notation defined [here](hartreefockmethod.html#the-integral-transforms), we can now proceed with the calculation of the correlation energy. We wil use the convention, that the indices $i$, $j$, $k$, and $l$ run over occupied spinorbitals, while the indices $a$, $b$, $c$, and $d$ run over virtual spinorbitals. The 2nd-order and 3rd-order correlation energies are given by the following expressions.<!--\cite{10.1021/acs.jpclett.9b01641}-->

The 2nd-order correlation energy:<!--\cite{10.1021/acs.jpclett.9b01641}-->
The 2nd-order correlation energy:

\begin{equation}
E_{corr}^{MP2}=\frac{1}{4}\sum_{ijab}\frac{\braket{ab||ij}\braket{ij||ab}}{\varepsilon_i+\varepsilon_j-\varepsilon_a-\varepsilon_b}
\end{equation}

The 3rd-order correlation energy:<!--\cite{10.1021/acs.jpclett.9b01641}-->
The 3rd-order correlation energy:

\begin{align}
E_{corr}^{MP3}=&\frac{1}{8}\sum_{ijab}\frac{\braket{ab||ij}\braket{cd||ab}\braket{ij||cd}}{(\varepsilon_i+\varepsilon_j-\varepsilon_a-\varepsilon_b)(\varepsilon_i+\varepsilon_j-\varepsilon_c-\varepsilon_d)}+\nonumber \\\\\
Expand Down
2 changes: 1 addition & 1 deletion docs/tex/library.bib
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ @article{10.1021/acs.jpclett.9b01641
doi = {10.1021/acs.jpclett.9b01641},
}

@incollection{molecular-integrals-over-gaussian-basis-functions,
@incollection{10.1016/S0065-3276!08!60019-2,
title = {Molecular integrals Over Gaussian Basis Functions},
editor = {John R. Sabin and Michael C. Zerner},
series = {Advances in Quantum Chemistry},
Expand Down
25 changes: 15 additions & 10 deletions script/docstopdf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,25 @@ ACRONYMS=(

# create the main LaTeX document
cat > docs/tex/main.tex << EOL
\documentclass[open=any,parskip=half,11pt]{scrbook}
\documentclass[,headsepline=true,parskip=half,open=any,11pt]{scrbook}
\usepackage{amsmath}
\usepackage{braket}
\usepackage[left=2cm,top=2.5cm,right=2cm,bottom=2.5cm]{geometry}
\usepackage[colorlinks=true,linkcolor=blue]{hyperref}
\usepackage{mathrsfs}
\usepackage{amsmath} % all the math environments and symbols
\usepackage{braket} % braket notation
\usepackage[left=2cm,top=2.5cm,right=2cm,bottom=2.5cm]{geometry} % page layout
\usepackage[colorlinks=true,linkcolor=blue]{hyperref} % hyperlinks
\usepackage{mathrsfs} % mathscr environment
\usepackage[backend=biber,style=chem-acs]{biblatex}
\usepackage[backend=biber,style=chem-acs]{biblatex} % bibliography
\addbibresource{library.bib}
\usepackage[acronym,automake,nogroupskip,toc]{glossaries}
\usepackage[acronym,automake,nogroupskip,toc]{glossaries} % acronyms
\makeglossaries
\usepackage[automark]{scrlayer-scrpage} % page numbering in header
\clearpairofpagestyles
\ohead{\headmark}
\ihead{\pagemark}
\title{Algorithms of Quantum Chemistry}
\author{Tom\'a\v s J\'ira}
EOL
Expand Down Expand Up @@ -123,14 +128,14 @@ for PAGE in ${PAGES[@]}; do
awk '/{:.cite}/ {exit} {print}' docs/pages/$PAGE.md > temp.md && mv temp.md docs/pages/$PAGE.md && echo "{:.cite}" >> docs/pages/$PAGE.md

# get the citations
CITATIONS=($(grep -o "cite{.*}" docs/pages/$PAGE.md | sed 's/cite{// ; s/}//'))
CITATIONS=($(grep -o "cite{.*}--" docs/pages/$PAGE.md | sed 's/cite{// ; s/}--//'))

# remove duplicates from the citations
CITATIONS=($(echo "${CITATIONS[@]}" | tr " " "\n" | sort -u | tr "\n" " "))

# find and append the citation
for CITATION in ${CITATIONS[@]}; do
grep $CITATION docs/tex/library.md | awk '{print "> " $0 "\n>"}' >> docs/pages/$PAGE.md
grep $(echo "$CITATION" | sed 's/!/(/ ; s/!/)/') docs/tex/library.md | awk '{print "> " $0 "\n>"}' >> docs/pages/$PAGE.md
done
done

Expand Down

0 comments on commit 2251daf

Please sign in to comment.