Psi4
efp_solver.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 EFP_SOLVER_H
29 #define EFP_SOLVER_H
30 /*
31  * EFP header
32  */
33 
34 #include "psi4/libmints/molecule.h"
35 
36 
37 struct efp;
38 
39 namespace psi {
40  class Options;
41  class Vector;
42 }
43 
44 namespace psi {
45 
46 namespace efp {
47 
48 
49 class EFP {
50  // warning: options_ is pointer to current options object and may not reflect
51  // proper efp options outside of common_init()
53  protected:
54 
55 #ifdef USING_libefp
56  int nfrag_;
58 
60  struct efp * efp_;
61 
63  std::shared_ptr<Molecule> molecule_;
64 
66  bool elst_enabled_, pol_enabled_, disp_enabled_, exch_enabled_;
67  std::string elst_damping_, pol_damping_, disp_damping_;
68 
70  bool qm_elst_enabled_, qm_pol_enabled_;
71 
73  bool do_grad_, do_qm_;
74 
76  void common_init();
77 
79  SharedMatrix torque_;
80 #endif
81  public:
83  EFP(Options& options);
84 
86  ~EFP();
87 
89  int get_frag_count(void);
90 
91 #ifdef USING_libefp
92  void add_fragments(std::vector<std::string> fnames);
94 
96  void set_frag_coordinates(int frag_idx, int type, double * coords);
97 
99  void finalize_fragments();
100 
102  int get_frag_multiplicity(int frag_idx);
103 
105  double get_frag_charge(int frag_idx);
106 
108  int get_frag_atom_count(int frag_idx);
109 
111  double * get_frag_atom_Z(int frag_idx);
112 
114  double * get_frag_atom_mass(int frag_idx);
115 
117  std::vector<std::string> get_frag_atom_label(int frag_idx);
118 
120  double * get_frag_atom_coord(int frag_idx);
121 
124  void set_options();
125 
127  void set_qm_atoms();
128 
130  std::shared_ptr<Matrix> modify_Fock_permanent();
131 
133  std::shared_ptr<Matrix> modify_Fock_induced();
134 
136  double scf_energy_update();
137 
139  void compute();
140 
142  void print_efp_geometry();
143 
145  void print_out(void);
146 
148  void set_torque(const SharedMatrix& torq) { torque_ = torq; }
149 
151  SharedMatrix torque() const { return torque_; }
152 # endif // USING_libefp
153 };
154 
155 }
156 }
157 
158 // /// Returns the center of mass of a given fragment
159 // double * get_com(int frag_idx);
160 // /// Number of EFP atoms
161 // int efp_natom();
162 // /// Computes the nuclear potential integrals from the EFP fragments
163 // std::shared_ptr<Matrix> EFP_nuclear_potential();
164 // /// Wrapper to efp_get_point_charge_gradient
165 // std::shared_ptr<Vector> get_electrostatic_gradient();
166 // /// Add EFP fragment
167 // void add_fragment(std::string fname);
168 // /// Sets the geometry hints for all fragments at once
169 // void set_coordinates(int type, double * coords);
170 // /// Computes the nuclear repulsion between the QM and EFP regions
171 // double EFP_QM_nuclear_repulsion_energy();
172 
173 #endif
~EFP()
Destructor.
Definition: efp_solver.cc:60
int get_frag_count(void)
Returns the number of EFP fragments; wrapper to efp_get_frag_count.
Definition: efp_solver.cc:70
EFP(Options &options)
Constructor.
Definition: efp_solver.cc:53
Definition: liboptions.h:359
std::shared_ptr< Matrix > SharedMatrix
Definition: adc.h:50
Options & options_
Definition: efp_solver.h:52
Definition: efp_solver.h:49