Psi4
extern.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_lib_libmints_extern_potential_h_
29 #define _psi_src_lib_libmints_extern_potential_h_
30 
31 #include <vector>
32 #include <utility>
33 #include <string>
34 #include <tuple>
35 #include "typedefs.h"
36 
37 namespace psi {
38 
39 class Matrix;
40 class Molecule;
41 class BasisSet;
42 
49 protected:
50 
52  int debug_;
54  int print_;
55 
57  std::string name_;
59  std::vector<std::tuple<double,double,double,double> > charges_;
61  std::vector<std::pair<std::shared_ptr<BasisSet>, SharedVector> > bases_;
62 
63 public:
68 
70  void setName(const std::string & name) { name_ = name; }
71 
73  void addCharge(double Z,double x, double y, double z);
75  void addBasis(std::shared_ptr<BasisSet> basis, SharedVector coefs);
76 
78  void clear();
79 
81  SharedMatrix computePotentialMatrix(std::shared_ptr<BasisSet> basis);
83  SharedMatrix computePotentialGradients(std::shared_ptr<BasisSet> basis, std::shared_ptr<Matrix> Dt);
85  double computeNuclearEnergy(std::shared_ptr<Molecule> mol);
86 
88  void print(std::string OutFileRMR = "outfile") const;
89 
91  void py_print() const { print("outfile"); }
92 
94  void set_print(int print) { print_ = print; }
96  void set_debug(int debug) { debug_ = debug; }
97 
98 };
99 
100 }
101 
102 #endif
void set_print(int print)
Print flag.
Definition: extern.h:94
std::string name_
Name of potential.
Definition: extern.h:57
std::shared_ptr< BasisSet > basis
Definition: dx_write.cc:58
int debug_
Debug flag.
Definition: extern.h:52
double computeNuclearEnergy(std::shared_ptr< Molecule > mol)
Compute the contribution to the nuclear repulsion energy for the given molecule.
Definition: extern.cc:325
void print(std::string OutFileRMR="outfile") const
Print a trace of the external potential.
Definition: extern.cc:70
~ExternalPotential()
Destructor, does nothing.
Definition: extern.cc:50
std::vector< std::pair< std::shared_ptr< BasisSet >, SharedVector > > bases_
Auxiliary basis sets (with accompanying molecules and coefs) of diffuse charges.
Definition: extern.h:61
void addCharge(double Z, double x, double y, double z)
Add a charge Z at (x,y,z)
Definition: extern.cc:60
SharedMatrix computePotentialGradients(std::shared_ptr< BasisSet > basis, std::shared_ptr< Matrix > Dt)
Compute the gradients due to the external potential.
Definition: extern.cc:179
void clear()
Reset the field to zero (eliminates all entries)
Definition: extern.cc:54
Definition: extern.h:48
void set_debug(int debug)
Debug flag.
Definition: extern.h:96
void addBasis(std::shared_ptr< BasisSet > basis, SharedVector coefs)
Add a basis of S auxiliary functions with DF coefficients.
Definition: extern.cc:65
SharedMatrix computePotentialMatrix(std::shared_ptr< BasisSet > basis)
Compute the external potential matrix in the given basis set.
Definition: extern.cc:106
void setName(const std::string &name)
Set name.
Definition: extern.h:70
std::shared_ptr< Matrix > SharedMatrix
Definition: adc.h:50
ExternalPotential()
Constructur, does nothing.
Definition: extern.cc:45
void py_print() const
Python print helper.
Definition: extern.h:91
int print_
Print flag.
Definition: extern.h:54
std::shared_ptr< Vector > SharedVector
Definition: adc.h:52
std::vector< std::tuple< double, double, double, double > > charges_
&lt;Z,x,y,z&gt; array of charges
Definition: extern.h:59