Psi4
laplace.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 LAPLACE_H
29 #define LAPLACE_H
30 
31 #include "psi4/libmints/typedefs.h"
32 
33 namespace psi {
34 
35 class Tensor;
36 class CoreTensor;
37 
54 class LaplaceDenom {
55 
56 protected:
57 
58  // => Input Spec <= //
59 
61  std::shared_ptr<Vector> eps_occ_;
63  std::shared_ptr<Vector> eps_vir_;
65  double delta_;
67  double omega_;
69  int rank_;
70 
71  // => Output Spec <= //
72 
74  int npoints_;
76  std::shared_ptr<Tensor> tau_occ_;
78  std::shared_ptr<Tensor> tau_vir_;
79 
80 public:
81 
82  // => Constructors <= //
83 
85  LaplaceDenom(std::shared_ptr<Vector> eps_occ,
86  std::shared_ptr<Vector> eps_vir,
87  double delta = 1.0E-6,
88  double omega = 0.0,
89  int rank = 2);
90 
92  virtual ~LaplaceDenom();
93 
94  // => Computers <= //
95 
97  void compute(const std::string& occ_name = "U", const std::string& vir_name = "V", double power = 1.0);
98 
99  // => Accessors <= //
100 
102  int npoints() const { return npoints_; }
104  std::shared_ptr<Tensor> tau_occ() const { return tau_occ_; }
106  std::shared_ptr<Tensor> tau_vir() const { return tau_vir_; }
107 
108 };
109 
110 
111 } // End namespace
112 
113 #endif
std::shared_ptr< Tensor > tau_occ() const
Laplace factor for occupied space, N_w x N_i.
Definition: laplace.h:104
int rank_
Number of times the occupied or virtual indices occur (e.g., 2 for MP2)
Definition: laplace.h:69
int npoints() const
Number of Laplace points.
Definition: laplace.h:102
double omega_
Bias (careful if negative)
Definition: laplace.h:67
std::shared_ptr< Tensor > tau_vir_
Laplace factor for virtual space, N_w x N_a.
Definition: laplace.h:78
LaplaceDenom(std::shared_ptr< Vector > eps_occ, std::shared_ptr< Vector > eps_vir, double delta=1.0E-6, double omega=0.0, int rank=2)
Master constructor.
Definition: laplace.cc:61
Definition: laplace.h:54
void compute(const std::string &occ_name="U", const std::string &vir_name="V", double power=1.0)
Compute the Laplace factors, assigning tensor names by occ_name and vir_name.
Definition: laplace.cc:76
std::shared_ptr< Vector > eps_vir_
Active virtual orbital eigenvalues.
Definition: laplace.h:63
int delta(const int i, const int j)
Definition: bend.cc:175
std::shared_ptr< Vector > eps_occ_
Active occupied orbital eigenvalues.
Definition: laplace.h:61
std::shared_ptr< Tensor > tau_vir() const
Laplace factor for virtual space, N_w x N_a.
Definition: laplace.h:106
std::shared_ptr< Tensor > tau_occ_
Laplace factor for occupied space, N_w x N_i.
Definition: laplace.h:76
Definition: pointgrp.h:105
int npoints_
Number of Laplace points selected.
Definition: laplace.h:74
double delta_
Allowed maximum error.
Definition: laplace.h:65
virtual ~LaplaceDenom()
Master destructor.
Definition: laplace.cc:73