Psi4
mrcc.h
Go to the documentation of this file.
1 /*
2  * @BEGIN LICENSE
3  *
4  * Psi4: an open-source quantum chemistry software package
5  *
6  * Copyright (c) 2007-2018 The Psi4 Developers.
7  *
8  * The copyrights for code used from other parties are included in
9  * the corresponding files.
10  *
11  * This file is part of Psi4.
12  *
13  * Psi4 is free software; you can redistribute it and/or modify
14  * it under the terms of the GNU Lesser General Public License as published by
15  * the Free Software Foundation, version 3.
16  *
17  * Psi4 is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU Lesser General Public License for more details.
21  *
22  * You should have received a copy of the GNU Lesser General Public License along
23  * with Psi4; if not, write to the Free Software Foundation, Inc.,
24  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
25  *
26  * @END LICENSE
27  */
28 
29 #ifndef _psi_src_bin_psimrcc_mrcc_h_
30 #define _psi_src_bin_psimrcc_mrcc_h_
31 
33 
34 #include "manybody.h"
35 #include "heff.h"
36 
37 namespace psi {
38 namespace psimrcc {
39 
40 class Updater;
41 
42 class CCMRCC : public CCManyBody {
43  public:
44  // Constructor and destructor
45  CCMRCC(SharedWavefunction ref_wfn, Options &options);
46  ~CCMRCC() override;
47 
48  // CCSD
49  void compute_energy(Updater *updater);
50 
51  // CCSD(T)
53 
54  // Perturbative correction for CBS
56  void perturbative_cbs();
57 
58  private:
60 
62 
63  void add_matrices();
64 
65  // These are used to call member functions
66 
68 
69  void diis(int cycle);
70  void diis_save_t_amps();
71 
72  void synchronize_amps();
73  void compute_delta_amps();
74  void add_ccsd_matrices();
75 
77 
78  void build_F_intermediates();
89 
90  // Intermediates required by triples
93 
94  void build_W_intermediates();
104 
105  void build_Z_intermediates();
106 
107  void build_t1_amplitudes();
108  void build_t1_ia_amplitudes();
109  void build_t1_IA_amplitudes();
113 
114  void build_t2_amplitudes();
128 
130 
131  bool build_diagonalize_Heff(int cycle, double time);
132  void build_Heff_diagonal();
133  void build_Heff_offdiagonal();
134 
135  void update_amps();
136  void update_t1_amps();
137  void update_t2_amps();
138  void update_t3_amps();
139  void update_t3_ijkabc_amps();
140  void update_t3_ijKabC_amps();
141  void update_t3_iJKaBC_amps();
142  void update_t3_IJKABC_amps();
143 
144  void update_amps_bwccsd();
145  void update_t1_amps_bwccsd();
146  void update_t2_amps_bwccsd();
147 
148  void update_amps_mkccsd();
149  void update_t1_amps_mkccsd();
150  void update_t2_amps_mkccsd();
152  void update_t3_amps_mkccsd();
157 
162 
163  void print_mrccsd_energy(int cycle);
164 
165  // CCSD(T)
166  std::vector<double> compute_ooo_triples();
167  std::vector<double> compute_OOO_triples();
168  std::vector<double> compute_ooO_triples();
169  std::vector<double> compute_oOO_triples();
170 };
171 
172 } // namespace psimrcc
173 } // namespace psi
174 
175 #endif // _psi_src_bin_psimrcc_mrcc_h_
std::vector< double > compute_OOO_triples()
void build_F_prime_mi_intermediates()
Definition: mrcc_f_int.cc:297
void build_F_mi_intermediates()
Definition: mrcc_f_int.cc:141
PsiReturnType psimrcc(SharedWavefunction, Options &)
Definition: psimrcc/main.cc:86
void build_W_mNiJ_intermediates()
Definition: mrcc_w_int.cc:77
void compute_delta_amps()
Definition: mrcc_t_amps.cc:84
void update_t2_amps_mkccsd_residual()
void build_W_JBME_intermediates()
Definition: mrcc_w_int.cc:212
std::vector< double > compute_ooo_triples()
void build_t2_IJAB_amplitudes_triples_diagram1()
Computes the contraction as described in Fig. 1 of Phys. Chem. Chem. Phys. vol. 2, pg. 2047 (2000). This algorithm hence performs .
Definition: mrcc_t2_amps.cc:726
void update_amps_mkccsd_residual()
void build_t1_ia_amplitudes()
Definition: mrcc_t1_amps.cc:54
void build_W_jBmE_intermediates()
Definition: mrcc_w_int.cc:158
CCMRCC(SharedWavefunction ref_wfn, Options &options)
Definition: psimrcc/mrcc.cc:42
void build_Heff_offdiagonal()
Definition: mrcc_Heff.cc:112
void update_t3_ijkabc_amps()
Definition: mrcc_t_amps.cc:111
void build_t2_iJaB_amplitudes_triples_diagram3()
Computes the contraction as described in Fig. 1 of Phys. Chem. Chem. Phys. vol. 2, pg. 2047 (2000). This algorithm hence performs .
Definition: mrcc_t2_amps.cc:1397
void update_t3_iJKaBC_amps_mkccsd()
void update_t3_IJKABC_amps_mkccsd()
void form_similarity_transformed_hamiltonian()
void build_F_ae_intermediates()
Definition: mrcc_f_int.cc:79
void build_t1_amplitudes()
Definition: mrcc_t1_amps.cc:49
void build_t1_IA_amplitudes()
Definition: mrcc_t1_amps.cc:112
void build_F_me_intermediates()
Definition: mrcc_f_int.cc:205
void build_W_jbME_intermediates()
Definition: mrcc_w_int.cc:176
void build_t2_iJaB_amplitudes_triples_diagram2()
Computes the contraction as described in Fig. 1 of Phys. Chem. Chem. Phys. vol. 2, pg. 2047 (2000). This algorithm hence performs .
Definition: mrcc_t2_amps.cc:998
void update_t3_IJKABC_amps()
Definition: mrcc_t_amps.cc:196
void build_F_prime_ae_intermediates()
Definition: mrcc_f_int.cc:263
Definition: manybody.h:71
void build_t2_iJaB_amplitudes()
Definition: mrcc_t2_amps.cc:158
void build_W_JbMe_intermediates()
Definition: mrcc_w_int.cc:195
void update_t3_ijKabC_amps_mkccsd()
void build_t2_IJAB_amplitudes()
Definition: mrcc_t2_amps.cc:271
void build_Z_intermediates()
Definition: mrcc_z_int.cc:44
void build_t1_IA_amplitudes_triples()
Computes the contraction as described in Fig. 1 of Phys. Chem. Chem. Phys. vol. 2, pg. 2047 (2000). This algorithm hence performs .
Definition: mrcc_t1_amps.cc:230
void build_W_JBme_intermediates()
Definition: mrcc_w_int.cc:138
bool ap_correction
Definition: mrcc.h:61
void build_t2_amplitudes_triples()
Definition: mrcc_t2_amps.cc:327
void build_W_intermediates()
Definition: mrcc_w_int.cc:46
bool build_diagonalize_Heff(int cycle, double time)
Definition: mrcc_Heff.cc:52
void update_t1_t2_amps_mkccsd_residual()
void build_W_jbme_intermediates()
Definition: mrcc_w_int.cc:112
void build_t2_ijab_amplitudes()
Definition: mrcc_t2_amps.cc:57
void build_t2_ijab_amplitudes_triples_diagram1()
Computes the contraction as described in Fig. 1 of Phys. Chem. Chem. Phys. vol. 2, pg. 2047 (2000). This algorithm hence performs .
Definition: mrcc_t2_amps.cc:356
std::vector< double > compute_ooO_triples()
void update_t3_ijKabC_amps()
Definition: mrcc_t_amps.cc:138
void build_t1_amplitudes_triples()
Definition: mrcc_t1_amps.cc:144
void build_F_MI_intermediates()
Definition: mrcc_f_int.cc:179
void perturbative_cbs()
Definition: mrcc_pert_cbs.cc:84
void build_t2_iJaB_amplitudes_triples_diagram1()
Computes the contraction as described in Fig. 1 of Phys. Chem. Chem. Phys. vol. 2, pg. 2047 (2000). This algorithm hence performs .
Definition: mrcc_t2_amps.cc:493
void print_mrccsd_energy(int cycle)
Definition: mrcc_energy.cc:42
void build_t2_ijab_amplitudes_triples_diagram2()
Computes the contraction as described in Fig. 1 of Phys. Chem. Chem. Phys. vol. 2, pg. 2047 (2000). This algorithm hence performs .
Definition: mrcc_t2_amps.cc:866
void diis(int cycle)
void build_F_prime_MI_intermediates()
Definition: mrcc_f_int.cc:314
Definition: liboptions.h:352
void build_t2_IJAB_amplitudes_triples_diagram2()
Computes the contraction as described in Fig. 1 of Phys. Chem. Chem. Phys. vol. 2, pg. 2047 (2000). This algorithm hence performs .
Definition: mrcc_t2_amps.cc:1200
void build_W_MNIJ_intermediates()
Definition: mrcc_w_int.cc:95
void compute_energy(Updater *updater)
Definition: mrcc_compute.cc:61
void build_F_intermediates()
Computes the contractions as described in J. Phys. Chem. vol. 94, pg. 4334 (1991). See J. Phys. Chem. vol. 127, 024102 (2007) supplementary material for the spin-factored equations.
Definition: mrcc_f_int.cc:58
void compute_first_order_amps()
Definition: mrcc_pert_cbs.cc:37
Definition: mrcc.h:42
Definition: heff.h:37
void update_t3_amps()
Definition: mrcc_t_amps.cc:104
void build_t2_ijab_amplitudes_triples_diagram3()
Computes the contraction as described in Fig. 1 of Phys. Chem. Chem. Phys. vol. 2, pg. 2047 (2000). This algorithm hence performs .
Definition: mrcc_t2_amps.cc:1331
void build_t1_ia_amplitudes_triples()
Computes the contraction as described in Fig. 1 of Phys. Chem. Chem. Phys. vol. 2, pg. 2047 (2000). This algorithm hence performs .
Definition: mrcc_t1_amps.cc:157
void update_t1_amps_mkccsd_residual()
void build_tau_intermediates()
Computes the contractions as described in J. Phys. Chem. vol. 94, pg. 4334 (1991). See J. Phys. Chem. vol. 127, 024102 (2007) supplementary material for the spin-factored equations.
Definition: mrcc_tau.cc:57
Options & options_
Definition: mrcc.h:59
void build_t2_IJAB_amplitudes_triples_diagram3()
Computes the contraction as described in Fig. 1 of Phys. Chem. Chem. Phys. vol. 2, pg. 2047 (2000). This algorithm hence performs .
Definition: mrcc_t2_amps.cc:1463
void update_t3_ijkabc_amps_mkccsd()
void update_t3_iJKaBC_amps()
Definition: mrcc_t_amps.cc:165
void synchronize_amps()
Definition: mrcc_t_amps.cc:49
void update_t1_t2_amps_mkccsd()
void build_F_AE_intermediates()
Definition: mrcc_f_int.cc:115
void build_F2_me_intermediates()
Definition: mrcc_f_int.cc:331
void build_F_ME_intermediates()
Definition: mrcc_f_int.cc:235
void build_F2_ME_intermediates()
Definition: mrcc_f_int.cc:361
void build_t2_amplitudes()
Definition: mrcc_t2_amps.cc:51
std::shared_ptr< Wavefunction > SharedWavefunction
Definition: typedefs.h:54
Hamiltonian h_eff
Definition: mrcc.h:67
Containts the procedure for updating the amplitudes.
Definition: updater.h:48
void add_matrices()
Definition: mrcc_add_matrices.cc:43
~CCMRCC() override
Definition: psimrcc/mrcc.cc:81
void compute_perturbative_triples()
Definition: mrcc_pert_triples.cc:58
std::vector< double > compute_oOO_triples()
void build_W_mnij_intermediates()
Definition: mrcc_w_int.cc:59
void build_Heff_diagonal()
Definition: mrcc_Heff.cc:97
void build_F_prime_AE_intermediates()
Definition: mrcc_f_int.cc:280