mirror of
https://github.com/TREX-CoE/irpjast.git
synced 2025-01-05 11:00:39 +01:00
63 lines
1.8 KiB
Org Mode
63 lines
1.8 KiB
Org Mode
* IRPJAST
|
|
|
|
CHAMP's Jastrow factor computation using the IRPF90 method
|
|
|
|
Original equation:
|
|
|
|
$$
|
|
\sum_{i=2}^{Ne} \sum_{j=1}^i \sum_{pkl} \sum_a^{Nn} c_{apkl}\, r_{ij}^k\, ( R_{ia}^l + R_{ja}^l) ( R_{ia} R_{ja})^m
|
|
$$
|
|
|
|
Expanding, one obtains:
|
|
|
|
$$
|
|
\sum_{i=2}^{Ne} \sum_{j=1}^i \sum_{pkl} \sum_a^{Nn} c_{apkl} R_{ia}^{p-k-l}\, r_{ij}^k\, R_{ja}^{p-k+l} + c_{apkl} R_{ia}^{p-k+l}\, r_{ij}^k\, R_{ja}^{p-k-l}
|
|
$$
|
|
|
|
The equation is symmetric if we exchange $i$ and $j$, so we can rewrite
|
|
|
|
$$
|
|
\sum_{i=1}^{Ne} \sum_{j=1}^{Ne} \sum_{pkl} \sum_a^{Nn} c_{apkl} R_{ia}^{p-k-l}\, r_{ij}^k\, R_{ja}^{p-k+l}
|
|
$$
|
|
|
|
If we reshape $R_{ja}^p$ as a matrix $R_{j,al}$ of size
|
|
$N_e \times N_n(N_c+1)$,
|
|
for every $k$, we can pre-compute the matrix product
|
|
|
|
$$
|
|
C_{i,al}^{k} = \sum_j r_{ij}^k\, R_{i,al}
|
|
$$
|
|
which can be computed efficiently with BLAS.
|
|
We can express the total Jastrow as:
|
|
|
|
$$
|
|
\sum_{i=1}^{Ne} \sum_{pkl} \sum_a^{Nn}
|
|
c_{apkl} R_{ia}^{p-k-l}\, C_{i,a(p-k+l)}^k
|
|
$$
|
|
|
|
** Rank reduction
|
|
|
|
*** Idea
|
|
|
|
The idea is to use SVD and fast-updates to reduce the rank of the
|
|
intermediate \(r^k_{ij} = \Gamma_{i,j,k}\) like so.
|
|
|
|
\[
|
|
\Gamma_{i,j,k} = U_{i,d,k} \cdot D_{d,d,k} \cdot V^T_{d,j,k}
|
|
\]
|
|
|
|
Where \( D_{d,d,k}\) is a diagonal in indices \(i,j\) and is of rank \(d \ll Min(i,j)\).
|
|
|
|
Algorithms for fast rank-1 updates of a r-thin SVD has been published in the following papers:
|
|
|
|
1. https://doi.org/10.1016/j.laa.2005.07.021
|
|
|
|
2. https://doi.org/10.1002/pamm.200810827
|
|
|
|
** Auto-generate derivatives
|
|
|
|
*** Idea
|
|
|
|
The calculation of first and second derivatives of
|
|
a network of tensors contracted using BLAS can also be expressed as a sum of BLAS contractions. However, there are many pitfalls. Here we shall consider an automated generation of contraction scheme to optimize the order in which the BLAS contraction is performed.
|