From afd4936df79b3a73e0cf5f6d7ccc3d00a6fbbcff Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Fri, 30 Dec 2022 19:47:23 +0100 Subject: [PATCH 1/3] CC amplitudes --- trex.org | 85 ++++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 80 insertions(+), 5 deletions(-) diff --git a/trex.org b/trex.org index fabce8a..a892100 100644 --- a/trex.org +++ b/trex.org @@ -679,7 +679,7 @@ prim_factor = The Cholesky decomposition of the integrals can also be stored: \[ - \A_{ijkl} = \sum_{\alpha} G_{il\alpha} G_{jl\alpha} + A_{ijkl} = \sum_{\alpha} G_{il\alpha} G_{jl\alpha} \] #+NAME: mo_2e_int @@ -792,6 +792,81 @@ prim_factor = #+end_src :end: +* Amplitudes (amplitude group) + + The wave function may be expressed in terms of action of the cluster + operator $\hat{T}$: + + \[ + \hat{T} = \hat{T}_1 + \hat{T}_2 + \hat{T}_3 + \dots + \] + + on a reference wave function $\Psi$, where $\hat{T}_1$ is the single excitation operator, + + \[ + \hat{T}_1 = \sum_{ia} t_{i}^{a}\, \hat{a}^\dagger_a \hat{a}_i + \], + + $\hat{T}_2$ is the double excitation operator, + + \[ + \hat{T}_2 = \frac{1}{4} \sum_{ijab} t_{ij}^{ab}\, \hat{a}^\dagger_a \hat{a}^\dagger_b \hat{a}_j \hat{a}_i + \], + + /etc/. + + Wave functions obtained with perturbation theory of configuration + interaction are of the form + [\ + \Phi = \hat{T} \Psi + \] + + and coupled-cluster wave functions are of the form + [\ + \Phi = e^{\hat{T}} \Psi + \] + + The reference wave function is stored using the ~determinant~ and/or + ~csf~ groups, and the amplitudes are stored using the current group. + The attributes with the ~exp~ suffix correspond to exponentialized operators. + + The order of the indices is chosen such that + - ~t(i,a)~ = $t_{i}^{a}$. + - ~t(i,j,a,b)~ = $t_{ij}^{ab}$, + - ~t(i,j,k,a,b,c)~ = $t_{ijk}^{abc}$, + - ~t(i,j,k,l,a,b,c,d)~ = $t_{ijkl}^{abcd}$, + - $\dots$ + + #+NAME: amplitude + | Variable | Type | Dimensions | Description | + |-----------------+----------------+-------------------------------------------------------------+-------------------------------------------------| + | ~single~ | ~float~ | ~(mo.num,mo.num)~ | Single excitation amplitudes | + | ~single_exp~ | ~float~ | ~(mo.num,mo.num)~ | Exponentialized single excitation amplitudes | + | ~double~ | ~float sparse~ | ~(mo.num,mo.num,mo.num,mo.num)~ | Double excitation amplitudes | + | ~double_exp~ | ~float sparse~ | ~(mo.num,mo.num,mo.num,mo.num)~ | Exponentialized double excitation amplitudes | + | ~triple~ | ~float sparse~ | ~(mo.num,mo.num,mo.num,mo.num,mo.num,mo.num)~ | Triple excitation amplitudes | + | ~triple_exp~ | ~float sparse~ | ~(mo.num,mo.num,mo.num,mo.num,mo.num,mo.num)~ | Exponentialized triple excitation amplitudes | + | ~quadruple~ | ~float sparse~ | ~(mo.num,mo.num,mo.num,mo.num,mo.num,mo.num,mo.num,mo.num)~ | Quadruple excitation amplitudes | + | ~quadruple_exp~ | ~float sparse~ | ~(mo.num,mo.num,mo.num,mo.num,mo.num,mo.num,mo.num,mo.num)~ | Exponentialized quadruple excitation amplitudes | + + #+CALL: json(data=amplitude, title="amplitude") + + #+RESULTS: + :results: + #+begin_src python :tangle trex.json + "amplitude": { + "single" : [ "float" , [ "mo.num", "mo.num" ] ] + , "single_exp" : [ "float" , [ "mo.num", "mo.num" ] ] + , "double" : [ "float sparse", [ "mo.num", "mo.num", "mo.num", "mo.num" ] ] + , "double_exp" : [ "float sparse", [ "mo.num", "mo.num", "mo.num", "mo.num" ] ] + , "triple" : [ "float sparse", [ "mo.num", "mo.num", "mo.num", "mo.num", "mo.num", "mo.num" ] ] + , "triple_exp" : [ "float sparse", [ "mo.num", "mo.num", "mo.num", "mo.num", "mo.num", "mo.num" ] ] + , "quadruple" : [ "float sparse", [ "mo.num", "mo.num", "mo.num", "mo.num", "mo.num", "mo.num", "mo.num", "mo.num" ] ] + , "quadruple_exp" : [ "float sparse", [ "mo.num", "mo.num", "mo.num", "mo.num", "mo.num", "mo.num", "mo.num", "mo.num" ] ] + } , + #+end_src + :end: + * Excited states (state group) This group contains information about excited states. Since only a @@ -967,10 +1042,10 @@ prim_factor = defined in this group. #+NAME: pbc - | Variable | Type | Dimensions | Description | - |---------------+---------+------------+-------------------------| - | ~periodic~ | ~int~ | | ~1~: true or ~0~: false | - | ~k_point~ | ~float~ | ~(3)~ | $k$-point sampling | + | Variable | Type | Dimensions | Description | + |------------+---------+------------+-------------------------| + | ~periodic~ | ~int~ | | ~1~: true or ~0~: false | + | ~k_point~ | ~float~ | ~(3)~ | $k$-point sampling | #+CALL: json(data=pbc, title="pbc") From 8b1af1a8f60bbf9b3ec96652c95e16bc57a1edf6 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Sun, 1 Jan 2023 14:57:28 +0100 Subject: [PATCH 2/3] Documentation --- trex.org | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/trex.org b/trex.org index a892100..134da11 100644 --- a/trex.org +++ b/trex.org @@ -813,18 +813,16 @@ prim_factor = \hat{T}_2 = \frac{1}{4} \sum_{ijab} t_{ij}^{ab}\, \hat{a}^\dagger_a \hat{a}^\dagger_b \hat{a}_j \hat{a}_i \], - /etc/. + /etc/. Indices $i,j,a,b$ denote molecular orbital indices. Wave functions obtained with perturbation theory of configuration interaction are of the form - [\ - \Phi = \hat{T} \Psi - \] + + \[ |\Phi\rangle = \hat{T}|\Psi\rangle \] and coupled-cluster wave functions are of the form - [\ - \Phi = e^{\hat{T}} \Psi - \] + + \[ |\Phi\rangle = e^{\hat{T}}| \Psi \rangle \] The reference wave function is stored using the ~determinant~ and/or ~csf~ groups, and the amplitudes are stored using the current group. @@ -840,8 +838,8 @@ prim_factor = #+NAME: amplitude | Variable | Type | Dimensions | Description | |-----------------+----------------+-------------------------------------------------------------+-------------------------------------------------| - | ~single~ | ~float~ | ~(mo.num,mo.num)~ | Single excitation amplitudes | - | ~single_exp~ | ~float~ | ~(mo.num,mo.num)~ | Exponentialized single excitation amplitudes | + | ~single~ | ~float sparse~ | ~(mo.num,mo.num)~ | Single excitation amplitudes | + | ~single_exp~ | ~float sparse~ | ~(mo.num,mo.num)~ | Exponentialized single excitation amplitudes | | ~double~ | ~float sparse~ | ~(mo.num,mo.num,mo.num,mo.num)~ | Double excitation amplitudes | | ~double_exp~ | ~float sparse~ | ~(mo.num,mo.num,mo.num,mo.num)~ | Exponentialized double excitation amplitudes | | ~triple~ | ~float sparse~ | ~(mo.num,mo.num,mo.num,mo.num,mo.num,mo.num)~ | Triple excitation amplitudes | @@ -855,8 +853,8 @@ prim_factor = :results: #+begin_src python :tangle trex.json "amplitude": { - "single" : [ "float" , [ "mo.num", "mo.num" ] ] - , "single_exp" : [ "float" , [ "mo.num", "mo.num" ] ] + "single" : [ "float sparse", [ "mo.num", "mo.num" ] ] + , "single_exp" : [ "float sparse", [ "mo.num", "mo.num" ] ] , "double" : [ "float sparse", [ "mo.num", "mo.num", "mo.num", "mo.num" ] ] , "double_exp" : [ "float sparse", [ "mo.num", "mo.num", "mo.num", "mo.num" ] ] , "triple" : [ "float sparse", [ "mo.num", "mo.num", "mo.num", "mo.num", "mo.num", "mo.num" ] ] From 62f76c00549979f7dd65f738d86850aced6ddc15 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Sun, 1 Jan 2023 14:57:52 +0100 Subject: [PATCH 3/3] ChangeLog --- ChangeLog | 1 + 1 file changed, 1 insertion(+) diff --git a/ChangeLog b/ChangeLog index e4afa32..9670a4b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -19,6 +19,7 @@ CHANGES - Added OCaml binding - Added spin and energy in MOs - Added CSF group +- Added Amplitude group - Added Cholesky-decomposed two-electron integrals - Added Cholesky-decomposed RDMs for Gammcor - Added `trexio_flush` functionality