PerturbativeTriples
Table of Contents
1. Brief description
This algorithm can evaluate the (T) or the (cT) perturbative contribution to the correlation energy.
In the case of evaluating the (cT) contribution, it needs to
evaluate first the (cT) intermediate tensor using the
PerturbativeCT algorithm (see below).
In this case, when the PerturbativeTriples algorithm is ran,
both the (T) and (cT) contributions are provided as an output.
2. Algorithm call
A typical input file snippet to call the PerturbativeTriples algorithm is given below.
- name: PerturbativeTriples in: coulombIntegrals: CoulombIntegrals amplitudes: Amplitudes slicedEigenEnergies: EigenEnergies mp2PairEnergies: Mp2PairEnergies out: {}
Note that in order to save memory, this algorithm should occur as a last step in the calculation. This allows CC4S to free up some tensors in order to save memory since no other algorithm is ran after this one.
2.1. (cT) contribution
A typical input file snippet to call the PerturbativeTriples algorithm to output the (T) and (cT)
energies is the following:
# Calculate the ctintermediate tensor - name: PerturbativeCT in: coulombIntegrals: CoulombIntegrals amplitudes: Amplitudes coulombVertex: CoulombVertex out: cTIntermediate: ctintermediate # use the ctintermediate tensor as input for cTIntermediate - name: PerturbativeTriples in: cTIntermediate: ctintermediate coulombIntegrals: CoulombIntegrals amplitudes: Amplitudes slicedEigenEnergies: EigenEnergies mp2PairEnergies: Mp2PairEnergies out: {}
Note that the first part of the snippet computes the (cT) intermediate tensors,
which are provided as input to the PerturbativeTriples algorithm.
3. Algorithm input
| Keyword | Value |
|---|---|
amplitudes |
Singles and doubles amplitudes |
cTIntermediate (optional) |
(cT) intermediate tensors |
coulombIntegrals |
Coulomb Integrals |
slicedEigenEnergies |
Sliced one-electron energies |
mp2PairEnergies |
MP2 pair energies matrix |
useCheckpoint |
Checkpoint and restarts |
3.1. Checkpoint and restarts for CCSD(T)
The PerturbativeTriples algorithm can be restarted at a later stage
if the calculation has been interrupted by a variety of factors before completion.
By default, the algorithm writes the file PerturbativeTriples.checkpoint, where information
about the current state of the algorithm is stored.
If the calculation has been interrupted, Cc4s will start from where the last checkpoint was written.
In order for this to happen you must add the following line to the PerturbativeTriples invocation in the
input yaml file
- name: PerturbativeTriples in: useCheckpoint: 1 ...
Note that the PerturbativeTriples.checkpoint is never rewritten, Cc4s always appends to it.
When restarting a calculation from a checkpoint file, the number of nodes and cores has to be the same as in the original calculation that created the checkpoint file.
4. Algorithm output
4.1. Sample stdout
Below an example standard output stream is shown for a successful PerturbativeTriples algorithm run.
step: 7, PerturbativeTriples
Progress(%) time(s) GFLOP/s
1 0 4.187
10 0 5.657
20 0 5.789
30 0 5.919
40 0 5.916
50 0 5.938
60 0 5.913
70 0 5.877
80 0 5.850
90 0 5.857
100 0 5.845
(T) correlation energy: -0.822530510989498
realtime 2.592587863 s
--
If the (cT) contribution is calculated, an additional output containing the (cT) energy is printed:
... 100 0 5.845 (T) correlation energy: -0.822530510989498 (cT) correlation energy: -0.822530510989498 realtime 2.592587863 s --
5. Sample yaml output
Below an example yaml output stream is shown for a successful PerturbativeTriples algorithm run.
floatingPointOperations: 11703705600 flops: 729564426.2969619 in: amplitudes: 0x24cd038 coulombIntegrals: 0x247f2b8 slicedEigenEnergies: 0x2487f38 name: PerturbativeTriples out: energy: correlation: -0.82253051098949848 unit: 0.036749322175638782 realtime: 2.592587863
When (cT) is being calculated, the energy output contains two extra fields, ct and t
in order to clearly differentiate between both energies:
... out: energy: correlation: -0.82253051098949848 ct: -0.82253051098949848 t: -0.82253051098949848
6. Computational complexity
The computational cost is \(\mathcal{O}{(N_o^3 N_v^3(N_o+N_v))}\) with \(N_o\) and \(N_v\) being the number of occupied and virtual orbitals, respectively. The memory footprint is mainly determined by the storage of the PPPH-integral, which is of size \(\mathcal{O}{N_o N_v^3}\).
The computational cost to compute both the (cT) and (T) energies is roughly two times that of the (T) computation alone. The memory footprint involves additionally storing a \( J^{ab}_{ci} \) tensor of the same dimensions of the \( V^{ab}_{ci} \) integrals.
7. Theory
The implemented expressions of (T) correspond to those from Ref. (Raghavachari et al. 1989). For more details see Ref. (Bartlett and Musiał 2007) and references therin. The implemented expressions of (cT) correspond to those from Ref. (Masios et al. 2023).
8. Reference implementation
In addition to the PerturbativeTriples algorithm, there is also a slower
reference implementation called PerturbativeTriplesReference which
is used in the same way as PerturbativeTriples.
To use it, you should just change the name PerturbativeTriples by PerturbativeTriplesReference.