Psi4
manybody.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-2017 The Psi4 Developers.
7  *
8  * The copyrights for code used from other parties are included in
9  * the corresponding files.
10  *
11  * This program is free software; you can redistribute it and/or modify
12  * it under the terms of the GNU General Public License as published by
13  * the Free Software Foundation; either version 2 of the License, or
14  * (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License along
22  * with this program; if not, write to the Free Software Foundation, Inc.,
23  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24  *
25  * @END LICENSE
26  */
27 
28 #ifndef _psi_src_bin_psimrcc_ccmanybody_h
29 #define _psi_src_bin_psimrcc_ccmanybody_h
30 /***************************************************************************
31  * PSIMRCC : Copyright (C) 2007 by Francesco Evangelista and Andrew Simmonett
32  * frank@ccc.uga.edu andysim@ccc.uga.edu
33  * A multireference coupled cluster code
34  ***************************************************************************/
35 
36 /*********************************************************
37  CCManyBody Class
38  1) Purpose
39  This class is used to do the basic operations that any
40  manybody code requires: compute the Fock matrix, denominators.
41  However, this implementation is specifically designed to
42  handle multireference cases
43  2) Use
44  3) Details
45  4) Uses
46  MOInfo class
47  STL <vector>
48 
49 *********************************************************/
50 
51 #include <cmath>
52 #include <vector>
53 #include <string>
54 
56 #include "psi4/libciomr/libciomr.h"
57 #include "psi4/libqt/qt.h"
58 
59 namespace psi{ namespace psimrcc{
60 
61 
65 
66 
70 class CCManyBody{
71 public:
72  CCManyBody(SharedWavefunction ref_wfn, Options &options);
73  virtual ~CCManyBody();
74  void generate_integrals();
75  void generate_denominators();
77  void make_fock_matrix();
78  void make_denominators();
79  void print_method(const char* text);
80 // void zero_internal_amps();
81 // void zero_t1_internal_amps();
82 // void zero_internal_delta_amps();
83 protected:
86  // Effective Hamiltonian and the correpsonding eigenvectors
87  void print_eigensystem(int ndets, double** Heff,double*& eigenvector);
88  double diagonalize_Heff(int root,int ndets, double** Heff,double*& right_eigenvector,double*& left_eigenvector, bool initial);
89  void sort_eigensystem(int ndets,double*& real,double*& imaginary,double**& left,double**& right);
90  double c_H_c(int ndets, double** H,double*& c);
91 
95  double** Heff;
96  double** Heff_mrpt2;
97 
98  // Effective Hamiltonian and the correpsonding eigenvectors
100  double delta_energy;
101  double cas_energy;
102  double old_energy;
103 
104  double huge;
105 
106  double total_time;
107 
108  double norm_amps;
111 
112  bool pert_cbs;
116 
118  void generate_d3_ijk(double***& d3,bool alpha_i,bool alpha_j,bool alpha_k);
119  void generate_d3_abc(double***& d3,bool alpha_a,bool alpha_b,bool alpha_c);
121 
122  double*** d3_ooo;
123  double*** d3_ooO;
124  double*** d3_oOO;
125  double*** d3_OOO;
126  double*** d3_vvv;
127  double*** d3_vvV;
128  double*** d3_vVV;
129  double*** d3_VVV;
130 };
131 
132 }} /* End Namespaces */
133 
134 #endif // _psi_src_bin_psimrcc_ccmanybody_h
double *** d3_vvV
Definition: manybody.h:127
PsiReturnType psimrcc(SharedWavefunction, Options &)
Definition: psimrcc/main.cc:86
Definition: manybody.h:62
Definition: manybody.h:64
Definition: manybody.h:64
Definition: manybody.h:63
double real
Definition: svd.cc:33
double ** Heff
Definition: manybody.h:95
void generate_integrals()
Definition: manybody.cc:104
virtual ~CCManyBody()
Definition: manybody.cc:89
double ** Heff_mrpt2
Definition: manybody.h:96
double * right_eigenvector
Definition: manybody.h:93
Definition: manybody.h:63
double * zeroth_order_eigenvector
Definition: manybody.h:92
double *** d3_VVV
Definition: manybody.h:129
Definition: manybody.h:63
bool pert_cbs
Definition: manybody.h:112
double *** d3_vvv
Definition: manybody.h:126
double *** d3_ooo
Definition: manybody.h:122
Definition: manybody.h:62
Definition: manybody.h:70
Definition: manybody.h:62
Definition: manybody.h:63
double *** d3_ooO
Definition: manybody.h:123
double cas_energy
Definition: manybody.h:101
Definition: manybody.h:64
void generate_denominators()
Definition: manybody_denominators.cc:62
CCManyBody(SharedWavefunction ref_wfn, Options &options)
Definition: manybody.cc:66
TriplesCouplingType triples_coupling_type
Definition: manybody.h:115
double total_time
Definition: manybody.h:106
double *** d3_vVV
Definition: manybody.h:128
SharedWavefunction ref_wfn_
Definition: manybody.h:85
void print_method(const char *text)
Definition: manybody.cc:366
double diagonalize_Heff(int root, int ndets, double **Heff, double *&right_eigenvector, double *&left_eigenvector, bool initial)
Definition: manybody.cc:427
Definition: manybody.h:62
void generate_d3_ijk(double ***&d3, bool alpha_i, bool alpha_j, bool alpha_k)
Definition: manybody.cc:136
SpinCase
Definition: manybody.h:62
double delta_t2_amps
Definition: manybody.h:110
void compute_reference_energy()
Definition: manybody.cc:317
TriplesCouplingType
Definition: manybody.h:64
TriplesType
Definition: manybody.h:63
void deallocate_triples_denominators()
Definition: manybody.cc:289
Definition: liboptions.h:359
Definition: manybody.h:63
double current_energy
Definition: manybody.h:99
Options & options_
Definition: manybody.h:84
Definition: manybody.h:63
Header file for the Quantum Trio LibraryDavid Sherrill 1994.
Definition: manybody.h:62
TriplesType triples_type
Definition: manybody.h:114
double c_H_c(int ndets, double **H, double *&c)
Definition: manybody.cc:410
double delta_energy
Definition: manybody.h:100
void generate_d3_abc(double ***&d3, bool alpha_a, bool alpha_b, bool alpha_c)
Definition: manybody.cc:212
Definition: manybody.h:62
Definition: manybody.h:63
void sort_eigensystem(int ndets, double *&real, double *&imaginary, double **&left, double **&right)
Definition: manybody.cc:553
Definition: manybody.h:63
double norm_amps
Definition: manybody.h:108
double *** d3_OOO
Definition: manybody.h:125
void print_eigensystem(int ndets, double **Heff, double *&eigenvector)
Definition: manybody.cc:376
std::shared_ptr< Wavefunction > SharedWavefunction
Definition: typedefs.h:50
void generate_triples_denominators()
Definition: manybody.cc:124
double delta_t1_amps
Definition: manybody.h:109
double old_energy
Definition: manybody.h:102
bool pert_cbs_coupling
Definition: manybody.h:113
double huge
Definition: manybody.h:104
Definition: manybody.h:62
Definition: manybody.h:64
double *** d3_oOO
Definition: manybody.h:124
double * left_eigenvector
Definition: manybody.h:94