mirror of
https://github.com/TREX-CoE/trexio.git
synced 2024-12-22 12:23:54 +01:00
Document RDM
This commit is contained in:
parent
1aaca05b51
commit
4c6b84685c
24
examples.org
24
examples.org
@ -23,19 +23,19 @@ program print_energy
|
||||
This program computes the energy as:
|
||||
|
||||
\[
|
||||
E = E_{\text{NN}} + \sum_{ij} D_{ij}\, \langle i | h | j \rangle\,
|
||||
+\, \frac{1}{2} \sum_{ijkl} \Gamma_{ijkl}\, \langle i j | k l
|
||||
E = E_{\text{NN}} + \sum_{ij} \gamma_{ij}\, \langle j | h | i \rangle\,
|
||||
+\, \frac{1}{2} \sum_{ijkl} \Gamma_{ijkl}\, \langle k l | i j
|
||||
\rangle\; \textrm{ with } \; 0 < i,j,k,l \le n
|
||||
\]
|
||||
|
||||
One needs to read from the TREXIO file:
|
||||
|
||||
- $n$ :: The number of molecular orbitals
|
||||
- $E_{\text{NN}}$ :: The nuclear repulsion energy
|
||||
- $D_{ij}$ :: The one-body reduced density matrix
|
||||
- $\langle i |h| j \rangle$ :: The one-electron Hamiltonian integrals
|
||||
- $\gamma_{ij}$ :: The one-body reduced density matrix
|
||||
- $\langle j |h| i \rangle$ :: The one-electron Hamiltonian integrals
|
||||
- $\Gamma_{ijkl}$ :: The two-body reduced density matrix
|
||||
- $\langle i j | k l \rangle$ :: The electron repulsion integrals
|
||||
- $\langle k l | i j \rangle$ :: The electron repulsion integrals
|
||||
|
||||
|
||||
#+begin_src f90
|
||||
integer :: n
|
||||
@ -228,7 +228,17 @@ program print_energy
|
||||
|
||||
*** Compute the energy
|
||||
|
||||
As $(n,m)$ 2D arrays are stored in memory as $(\n times m)$ 1D
|
||||
When the orbitals are real, we can use
|
||||
\begin{eqnarray*}
|
||||
E &=& E_{\text{NN}} + \sum_{ij} \gamma_{ij}\, \langle j | h | i \rangle\,
|
||||
+\, \frac{1}{2} \sum_{ijkl} \Gamma_{ijkl}\, \langle k l | i j
|
||||
\rangle \\
|
||||
&=& E_{\text{NN}} + \sum_{ij} \gamma_{ij}\, \langle i | h | j \rangle\,
|
||||
+\, \frac{1}{2} \sum_{ijkl} \Gamma_{ijkl}\, \langle i j | k l
|
||||
\rangle \\
|
||||
\end{eqnarray*}
|
||||
|
||||
As $(n,m)$ 2D arrays are stored in memory as $(n \times m)$ 1D
|
||||
arrays, we could pass the matrices to the ~ddot~ BLAS function to
|
||||
perform the summations in a single call for the 1-electron quantities.
|
||||
Instead, we prefer to interleave the 1-electron (negative) and
|
||||
|
41
trex.org
41
trex.org
@ -631,6 +631,45 @@ prim_factor =
|
||||
* TODO Slater determinants
|
||||
* Reduced density matrices (rdm group)
|
||||
|
||||
The reduced density matrices are defined in the basis of molecular
|
||||
orbitals.
|
||||
|
||||
The $\uparrow$-spin and $\downarrow$-spin components of the one-body
|
||||
density matrix are given by
|
||||
\begin{eqnarray*}
|
||||
\gamma_{ij}^{\uparrow} &=& \langle \Psi | a^{\dagger}_{j\alpha}\, a_{i\alpha} | \Psi \rangle \\
|
||||
\gamma_{ij}^{\downarrow} &=& \langle \Psi | a^{\dagger}_{j\beta} \, a_{i\beta} | \Psi \rangle
|
||||
\end{eqnarray*}
|
||||
and the spin-summed one-body density matrix is
|
||||
\[
|
||||
\gamma_{ij} = \gamma^{\uparrow}_{ij} + \gamma^{\downarrow}_{ij}
|
||||
\]
|
||||
|
||||
The $\uparrow \uparrow$, $\downarrow \downarrow$, $\uparrow \downarrow$, $\downarrow \uparrow$
|
||||
components of the two-body density matrix are given by
|
||||
\begin{eqnarray*}
|
||||
\Gamma_{ijkl}^{\uparrow \uparrow} &=&
|
||||
\langle \Psi | a^{\dagger}_{k\alpha}\, a^{\dagger}_{l\alpha} a_{j\alpha}\, a_{i\alpha} | \Psi \rangle \\
|
||||
\Gamma_{ijkl}^{\downarrow \downarrow} &=&
|
||||
\langle \Psi | a^{\dagger}_{k\beta}\, a^{\dagger}_{l\beta} a_{j\beta}\, a_{i\beta} | \Psi \rangle \\
|
||||
\Gamma_{ijkl}^{\uparrow \downarrow} &=&
|
||||
+\langle \Psi | a^{\dagger}_{k\alpha}\, a^{\dagger}_{l\beta} a_{j\beta}\, a_{i\alpha} | \Psi \rangle \\
|
||||
\Gamma_{ijkl}^{\downarrow \uparrow} &=&
|
||||
\langle \Psi | a^{\dagger}_{k\beta}\, a^{\dagger}_{l\alpha} a_{j\alpha}\, a_{i\beta} | \Psi \rangle \\
|
||||
\end{eqnarray*}
|
||||
and the spin-summed one-body density matrix is
|
||||
\[
|
||||
\Gamma_{ijkl} = \Gamma_{ijkl}^{\uparrow \uparrow} +
|
||||
\Gamma_{ijkl}^{\downarrow \downarrow} + \Gamma_{ijkl}^{\uparrow \downarrow}
|
||||
\Gamma_{ijkl}^{\downarrow \uparrow}
|
||||
\]
|
||||
|
||||
The total energy can be computed as:
|
||||
\[
|
||||
E = E_{\text{NN}} + \sum_{ij} \gamma_{ij} \langle j|h|i \rangle +
|
||||
\frac{1}{2} \sum_{ijlk} \Gamma_{ijkl} \langle k l | i j \rangle
|
||||
\]
|
||||
|
||||
#+NAME: rdm
|
||||
| Variable | Type | Dimensions | Description |
|
||||
|-----------+----------------+------------------------------------+-----------------------------------------------------------------------|
|
||||
@ -641,6 +680,7 @@ prim_factor =
|
||||
| ~2e_upup~ | ~float sparse~ | ~(mo.num, mo.num, mo.num, mo.num)~ | \uparrow\uparrow component of the two-body reduced density matrix |
|
||||
| ~2e_dndn~ | ~float sparse~ | ~(mo.num, mo.num, mo.num, mo.num)~ | \downarrow\downarrow component of the two-body reduced density matrix |
|
||||
| ~2e_updn~ | ~float sparse~ | ~(mo.num, mo.num, mo.num, mo.num)~ | \uparrow\downarrow component of the two-body reduced density matrix |
|
||||
| ~2e_dnup~ | ~float sparse~ | ~(mo.num, mo.num, mo.num, mo.num)~ | \downarrow\uparrow component of the two-body reduced density matrix |
|
||||
|
||||
#+CALL: json(data=rdm, title="rdm", last=1)
|
||||
|
||||
@ -655,6 +695,7 @@ prim_factor =
|
||||
, "2e_upup" : [ "float sparse", [ "mo.num", "mo.num", "mo.num", "mo.num" ] ]
|
||||
, "2e_dndn" : [ "float sparse", [ "mo.num", "mo.num", "mo.num", "mo.num" ] ]
|
||||
, "2e_updn" : [ "float sparse", [ "mo.num", "mo.num", "mo.num", "mo.num" ] ]
|
||||
, "2e_dnup" : [ "float sparse", [ "mo.num", "mo.num", "mo.num", "mo.num" ] ]
|
||||
}
|
||||
#+end_src
|
||||
:end:
|
||||
|
Loading…
Reference in New Issue
Block a user