Psi4
psipcm.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-2018 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 PCM_H
30 #define PCM_H
31 #ifdef USING_PCMSolver
32 
34 #include "psi4/libmints/typedefs.h"
35 
36 #include <PCMSolver/pcmsolver.h>
37 
38 #include <memory>
39 #include <string>
40 #include <utility>
41 #include <vector>
42 
43 namespace psi {
44 class BasisSet;
45 class Options;
46 class PCMPotentialInt;
47 
48 class PCM final {
49  public:
50  enum class CalcType : int { Total, NucAndEle, EleOnly };
51  PCM() = default;
52  PCM(const std::string &pcmsolver_parsed_fname, int print_level, std::shared_ptr<BasisSet> basisset);
53  PCM(const PCM *);
54  ~PCM() {}
59  std::pair<double, SharedMatrix> compute_PCM_terms(const SharedMatrix &D, CalcType type = CalcType::Total) const;
60 
61  private:
63  int ntess_;
65  int ntessirr_;
66  Dimension tesspi_;
68  SharedMatrix tess_Zxyz_;
70  SharedVector MEP_n_;
72  SharedVector compute_electronic_MEP(const SharedMatrix &D) const;
74  double compute_E_total(const SharedVector &MEP_e) const;
76  double compute_E_separate(const SharedVector &MEP_e) const;
78  double compute_E_electronic(const SharedVector &MEP_e) const;
83  SharedMatrix compute_V(const SharedVector &ASC) const;
84 
86  std::shared_ptr<BasisSet> basisset_;
87 
90  SharedMatrix my_aotoso_;
91 
93  PCMPotentialInt *potential_int_;
94 
96  std::shared_ptr<pcmsolver_context_t> context_;
97 
99  std::string pcmsolver_parsed_fname_;
100 
102  int pcm_print_;
103 };
104 
105 namespace detail {
106 std::pair<std::vector<double>, std::vector<double>> collect_atoms(std::shared_ptr<Molecule>);
107 
108 PCMInput pcmsolver_input();
109 
110 void host_writer(const char *);
111 
112 std::shared_ptr<pcmsolver_context_t> init_PCMSolver(const std::string &pcmsolver_parsed_fname,
113  const std::shared_ptr<Molecule> &molecule);
114 } // namespace detail
115 } // namespace psi
116 #endif
117 #endif
std::shared_ptr< Molecule > molecule
Definition: dx_write.cc:58
std::shared_ptr< Matrix > SharedMatrix
Definition: adc.h:49
std::shared_ptr< Vector > SharedVector
Definition: adc.h:51