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 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_ccmanybody_h
30 #define _psi_src_bin_psimrcc_ccmanybody_h
31 /***************************************************************************
32  * PSIMRCC : Copyright (C) 2007 by Francesco Evangelista and Andrew Simmonett
33  * frank@ccc.uga.edu andysim@ccc.uga.edu
34  * A multireference coupled cluster code
35  ***************************************************************************/
36 
37 /*********************************************************
38  CCManyBody Class
39  1) Purpose
40  This class is used to do the basic operations that any
41  manybody code requires: compute the Fock matrix, denominators.
42  However, this implementation is specifically designed to
43  handle multireference cases
44  2) Use
45  3) Details
46  4) Uses
47  MOInfo class
48  STL <vector>
49 
50 *********************************************************/
51 
52 #include <cmath>
53 #include <vector>
54 #include <string>
55 
57 #include "psi4/libciomr/libciomr.h"
58 #include "psi4/libqt/qt.h"
59 
60 namespace psi{ namespace psimrcc{
61 
62 
66 
67 
71 class CCManyBody{
72 public:
73  CCManyBody(SharedWavefunction ref_wfn, Options &options);
74  virtual ~CCManyBody();
75  void generate_integrals();
76  void generate_denominators();
78  void make_fock_matrix();
79  void make_denominators();
80  void print_method(const char* text);
81 // void zero_internal_amps();
82 // void zero_t1_internal_amps();
83 // void zero_internal_delta_amps();
84 protected:
87  // Effective Hamiltonian and the correpsonding eigenvectors
88  void print_eigensystem(int ndets, double** Heff,double*& eigenvector);
89  double diagonalize_Heff(int root,int ndets, double** Heff,double*& right_eigenvector,double*& left_eigenvector, bool initial);
90  void sort_eigensystem(int ndets,double*& real,double*& imaginary,double**& left,double**& right);
91  double c_H_c(int ndets, double** H,double*& c);
92 
96  double** Heff;
97  double** Heff_mrpt2;
98 
99  // Effective Hamiltonian and the correpsonding eigenvectors
101  double delta_energy;
102  double cas_energy;
103  double old_energy;
104 
105  double huge;
106 
107  double total_time;
108 
109  double norm_amps;
112 
113  bool pert_cbs;
117 
119  void generate_d3_ijk(double***& d3,bool alpha_i,bool alpha_j,bool alpha_k);
120  void generate_d3_abc(double***& d3,bool alpha_a,bool alpha_b,bool alpha_c);
122 
123  double*** d3_ooo;
124  double*** d3_ooO;
125  double*** d3_oOO;
126  double*** d3_OOO;
127  double*** d3_vvv;
128  double*** d3_vvV;
129  double*** d3_vVV;
130  double*** d3_VVV;
131 };
132 
133 }} /* End Namespaces */
134 
135 #endif // _psi_src_bin_psimrcc_ccmanybody_h
double *** d3_vvV
Definition: manybody.h:128
PsiReturnType psimrcc(SharedWavefunction, Options &)
Definition: psimrcc/main.cc:87
Definition: manybody.h:63
Definition: manybody.h:65
Definition: manybody.h:65
Definition: manybody.h:64
double real
Definition: svd.cc:34
double ** Heff
Definition: manybody.h:96
void generate_integrals()
Definition: manybody.cc:105
virtual ~CCManyBody()
Definition: manybody.cc:90
double ** Heff_mrpt2
Definition: manybody.h:97
double * right_eigenvector
Definition: manybody.h:94
Definition: manybody.h:64
double * zeroth_order_eigenvector
Definition: manybody.h:93
double *** d3_VVV
Definition: manybody.h:130
Definition: manybody.h:64
bool pert_cbs
Definition: manybody.h:113
double *** d3_vvv
Definition: manybody.h:127
double *** d3_ooo
Definition: manybody.h:123
Definition: manybody.h:63
Definition: manybody.h:71
Definition: manybody.h:63
Definition: manybody.h:64
double *** d3_ooO
Definition: manybody.h:124
double cas_energy
Definition: manybody.h:102
Definition: manybody.h:65
void generate_denominators()
Definition: manybody_denominators.cc:63
CCManyBody(SharedWavefunction ref_wfn, Options &options)
Definition: manybody.cc:67
TriplesCouplingType triples_coupling_type
Definition: manybody.h:116
double total_time
Definition: manybody.h:107
double *** d3_vVV
Definition: manybody.h:129
SharedWavefunction ref_wfn_
Definition: manybody.h:86
void print_method(const char *text)
Definition: manybody.cc:367
double diagonalize_Heff(int root, int ndets, double **Heff, double *&right_eigenvector, double *&left_eigenvector, bool initial)
Definition: manybody.cc:428
Definition: manybody.h:63
void generate_d3_ijk(double ***&d3, bool alpha_i, bool alpha_j, bool alpha_k)
Definition: manybody.cc:137
SpinCase
Definition: manybody.h:63
double delta_t2_amps
Definition: manybody.h:111
void compute_reference_energy()
Definition: manybody.cc:318
TriplesCouplingType
Definition: manybody.h:65
TriplesType
Definition: manybody.h:64
void deallocate_triples_denominators()
Definition: manybody.cc:290
Definition: liboptions.h:360
Definition: manybody.h:64
double current_energy
Definition: manybody.h:100
Options & options_
Definition: manybody.h:85
Definition: manybody.h:64
Header file for the Quantum Trio LibraryDavid Sherrill 1994.
Definition: manybody.h:63
TriplesType triples_type
Definition: manybody.h:115
double c_H_c(int ndets, double **H, double *&c)
Definition: manybody.cc:411
double delta_energy
Definition: manybody.h:101
void generate_d3_abc(double ***&d3, bool alpha_a, bool alpha_b, bool alpha_c)
Definition: manybody.cc:213
Definition: manybody.h:63
Definition: manybody.h:64
void sort_eigensystem(int ndets, double *&real, double *&imaginary, double **&left, double **&right)
Definition: manybody.cc:554
Definition: manybody.h:64
double norm_amps
Definition: manybody.h:109
double *** d3_OOO
Definition: manybody.h:126
void print_eigensystem(int ndets, double **Heff, double *&eigenvector)
Definition: manybody.cc:377
std::shared_ptr< Wavefunction > SharedWavefunction
Definition: typedefs.h:52
void generate_triples_denominators()
Definition: manybody.cc:125
double delta_t1_amps
Definition: manybody.h:110
double old_energy
Definition: manybody.h:103
bool pert_cbs_coupling
Definition: manybody.h:114
double huge
Definition: manybody.h:105
Definition: manybody.h:63
Definition: manybody.h:65
double *** d3_oOO
Definition: manybody.h:125
double * left_eigenvector
Definition: manybody.h:95