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 
56 #include "psi4/libmints/typedefs.h"
58 #include "psi4/libciomr/libciomr.h"
59 #include "psi4/libqt/qt.h"
60 
61 namespace psi{ namespace psimrcc{
62 
63 
67 
68 
72 class CCManyBody{
73 public:
74  CCManyBody(SharedWavefunction ref_wfn, Options &options);
75  virtual ~CCManyBody();
76  void generate_integrals();
77  void generate_denominators();
79  void make_fock_matrix();
80  void make_denominators();
81  void print_method(const char* text);
82 // void zero_internal_amps();
83 // void zero_t1_internal_amps();
84 // void zero_internal_delta_amps();
85 protected:
88  // Effective Hamiltonian and the correpsonding eigenvectors
89  void print_eigensystem(int ndets, double** Heff,double*& eigenvector);
90  double diagonalize_Heff(int root,int ndets, double** Heff,double*& right_eigenvector,double*& left_eigenvector, bool initial);
91  void sort_eigensystem(int ndets,double*& real,double*& imaginary,double**& left,double**& right);
92  double c_H_c(int ndets, double** H,double*& c);
93 
97  double** Heff;
98  double** Heff_mrpt2;
99 
100  // Effective Hamiltonian and the correpsonding eigenvectors
102  double delta_energy;
103  double cas_energy;
104  double old_energy;
105 
106  double huge;
107 
108  double total_time;
109 
110  double norm_amps;
113 
114  bool pert_cbs;
118 
120  void generate_d3_ijk(double***& d3,bool alpha_i,bool alpha_j,bool alpha_k);
121  void generate_d3_abc(double***& d3,bool alpha_a,bool alpha_b,bool alpha_c);
123 
124  double*** d3_ooo;
125  double*** d3_ooO;
126  double*** d3_oOO;
127  double*** d3_OOO;
128  double*** d3_vvv;
129  double*** d3_vvV;
130  double*** d3_vVV;
131  double*** d3_VVV;
132 };
133 
134 }} /* End Namespaces */
135 
136 #endif // _psi_src_bin_psimrcc_ccmanybody_h
double *** d3_vvV
Definition: manybody.h:129
PsiReturnType psimrcc(SharedWavefunction, Options &)
Definition: psimrcc/main.cc:87
Definition: manybody.h:64
Definition: manybody.h:66
Definition: manybody.h:66
Definition: manybody.h:65
double real
Definition: svd.cc:34
double ** Heff
Definition: manybody.h:97
void generate_integrals()
Definition: manybody.cc:103
virtual ~CCManyBody()
Definition: manybody.cc:88
double ** Heff_mrpt2
Definition: manybody.h:98
double * right_eigenvector
Definition: manybody.h:95
Definition: manybody.h:65
double * zeroth_order_eigenvector
Definition: manybody.h:94
double *** d3_VVV
Definition: manybody.h:131
Definition: manybody.h:65
bool pert_cbs
Definition: manybody.h:114
double *** d3_vvv
Definition: manybody.h:128
double *** d3_ooo
Definition: manybody.h:124
Definition: manybody.h:64
Definition: manybody.h:72
Definition: manybody.h:64
Definition: manybody.h:65
double *** d3_ooO
Definition: manybody.h:125
double cas_energy
Definition: manybody.h:103
Definition: manybody.h:66
void generate_denominators()
Definition: manybody_denominators.cc:61
CCManyBody(SharedWavefunction ref_wfn, Options &options)
Definition: manybody.cc:65
TriplesCouplingType triples_coupling_type
Definition: manybody.h:117
double total_time
Definition: manybody.h:108
double *** d3_vVV
Definition: manybody.h:130
SharedWavefunction ref_wfn_
Definition: manybody.h:87
void print_method(const char *text)
Definition: manybody.cc:365
double diagonalize_Heff(int root, int ndets, double **Heff, double *&right_eigenvector, double *&left_eigenvector, bool initial)
Definition: manybody.cc:426
Definition: manybody.h:64
void generate_d3_ijk(double ***&d3, bool alpha_i, bool alpha_j, bool alpha_k)
Definition: manybody.cc:135
SpinCase
Definition: manybody.h:64
double delta_t2_amps
Definition: manybody.h:112
void compute_reference_energy()
Definition: manybody.cc:316
TriplesCouplingType
Definition: manybody.h:66
TriplesType
Definition: manybody.h:65
void deallocate_triples_denominators()
Definition: manybody.cc:288
Definition: liboptions.h:355
Definition: manybody.h:65
double current_energy
Definition: manybody.h:101
Options & options_
Definition: manybody.h:86
Definition: manybody.h:65
Header file for the Quantum Trio LibraryDavid Sherrill 1994.
Definition: manybody.h:64
TriplesType triples_type
Definition: manybody.h:116
double c_H_c(int ndets, double **H, double *&c)
Definition: manybody.cc:409
double delta_energy
Definition: manybody.h:102
void generate_d3_abc(double ***&d3, bool alpha_a, bool alpha_b, bool alpha_c)
Definition: manybody.cc:211
Definition: manybody.h:64
Definition: manybody.h:65
void sort_eigensystem(int ndets, double *&real, double *&imaginary, double **&left, double **&right)
Definition: manybody.cc:552
Definition: manybody.h:65
double norm_amps
Definition: manybody.h:110
double *** d3_OOO
Definition: manybody.h:127
void print_eigensystem(int ndets, double **Heff, double *&eigenvector)
Definition: manybody.cc:375
std::shared_ptr< Wavefunction > SharedWavefunction
Definition: typedefs.h:54
void generate_triples_denominators()
Definition: manybody.cc:123
double delta_t1_amps
Definition: manybody.h:111
double old_energy
Definition: manybody.h:104
bool pert_cbs_coupling
Definition: manybody.h:115
double huge
Definition: manybody.h:106
Definition: manybody.h:64
Definition: manybody.h:66
double *** d3_oOO
Definition: manybody.h:126
double * left_eigenvector
Definition: manybody.h:96