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