MPQC 3.0.0-alpha
Loading...
Searching...
No Matches
wfnworld.h
1//
2// wfnworld.h
3//
4// Copyright (C) 2009 Edward Valeev
5//
6// Author: Edward Valeev <evaleev@vt.edu>
7// Maintainer: EV
8//
9// This file is part of the SC Toolkit.
10//
11// The SC Toolkit is free software; you can redistribute it and/or modify
12// it under the terms of the GNU Library General Public License as published by
13// the Free Software Foundation; either version 2, or (at your option)
14// any later version.
15//
16// The SC Toolkit 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 Library General Public License for more details.
20//
21// You should have received a copy of the GNU Library General Public License
22// along with the SC Toolkit; see the file COPYING.LIB. If not, write to
23// the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
24//
25// The U.S. Government is granted a limited license as per AL 91-7.
26//
27
28#ifndef _mpqc_src_lib_chemistry_qc_lcao_wfnworld_h
29#define _mpqc_src_lib_chemistry_qc_lcao_wfnworld_h
30
31#include <chemistry/qc/wfn/wfn.h>
32#include <chemistry/qc/lcao/moints_runtime.h>
33#include <chemistry/qc/lcao/fockbuild_runtime.h>
34
35namespace sc {
36
37 class XMLWriter;
38
40class WavefunctionWorld : virtual public SavableState
41#ifdef MPQC_NEW_FEATURES
42, virtual public DescribedXMLWritable
43#endif // MPQC_NEW_FEATURES
44{
45
46 // change to 0 to use the old set of OrbitalSpace keys
47 static const int USE_NEW_ORBITALSPACE_KEYS = 1;
48
49public:
50
53
135
137
138#ifdef MPQC_NEW_FEATURES
139 virtual boost::property_tree::ptree& write_xml(boost::property_tree::ptree& parent, const XMLWriter& writer);
140#endif // MPQC_NEW_FEATURES
141
145 void obsolete();
146
148 void dynamic(bool dynamic) { dynamic_ = dynamic; };
150 void print_percent(double print_percent) { print_percent_ = print_percent; };
152 void debug_level(int debug) { debug_ = debug; };
155 void ints_method(const StoreMethod::type method) { ints_method_ = method; };
158 void ints_file(const std::string& filename) { ints_file_ = filename; };
159
160 Wavefunction* wfn() const { return wfn_; }
161 void set_wfn(Wavefunction* w);
162
163 bool df() const { return df_; }
164 const Ref<GaussianBasisSet>& basis_df() const { return bs_df_; };
165
166 const Ref<MemoryGrp>& mem() const { return mem_;};
167 const Ref<MessageGrp>& msg() const { return msg_;};
168 const Ref<ThreadGrp>& thr() const { return thr_;};
169 Ref<Integral> integral() const { return wfn()->integral(); }
170
171 bool dynamic() const { return dynamic_; };
172 double print_percent() const { return print_percent_; };
173 int debug_level() const { return debug_; };
174 StoreMethod::type ints_method() const { return ints_method_; };
175 const std::string& ints_file() const;
176 double ints_precision() const { return ints_precision_; }
177
179 const Ref<MOIntsTransformFactory>& tfactory() const { return tfactory_; };
181 const Ref<MOIntsRuntime>& moints_runtime() const { return moints_runtime_; };
182 //convenient shortcut
183 const Ref<TwoBodyFourCenterMOIntsRuntime>& moints_runtime4() const { return moints_runtime_->runtime_4c(); };
185 const Ref<FockBuildRuntime>& fockbuild_runtime() const { return fockbuild_runtime_; };
186
187
188 void print(std::ostream& o) const;
189
190 // call this after obsolete
191 void initialize_ao_spaces();
192
193private:
194
195#ifdef MPQC_NEW_FEATURES
196 void xml_data_local(bool do_integrals, boost::property_tree::ptree& pt, const XMLWriter& writer);
197 void xml_data_nonlocal(bool do_integrals, boost::property_tree::ptree& pt, const XMLWriter& writer);
198#endif // MPQC_NEW_FEATURES
199
201 Wavefunction* wfn_;
202 bool df_;
203 Ref<GaussianBasisSet> bs_df_;
204 std::string df_kernel_;
205 TwoBodyOperSet::type df_kernel_opertype_;
206 Ref<IntParams> df_kernel_params_;
207 std::string df_solver_;
208 Ref<MessageGrp> msg_;
209 Ref<MemoryGrp> mem_;
210 Ref<ThreadGrp> thr_;
211#ifdef MPQC_NEW_FEATURES
212 typedef enum {
213 DFBasis,
214 DFCoefficients,
215 DFIntegralsERI,
216 ExactIntegralsERI
217 } _XMLOutputData;
218 std::vector<_XMLOutputData> out_data_;
219#endif // MPQC_NEW_FEATURES
220
221 bool dynamic_;
222 double print_percent_;
223 int debug_;
224 StoreMethod::type ints_method_;
225 std::string ints_file_;
226 double ints_precision_;
227
228 bool df_local_coulomb_;
229 bool df_local_exchange_;
230 bool exact_diag_J_;
231 bool exact_diag_K_;
232
236 Ref<MOIntsRuntime> moints_runtime_;
238 Ref<FockBuildRuntime> fockbuild_runtime_;
239
240 void initialize(); // called by constructors
241
243 static std::pair<TwoBodyOperSet::type, Ref<IntParams> > init_df_kernel(std::string kernel_key);
244
245};
246
247} // end of namespace sc
248
249#endif // end of header guard
250
251
252// Local Variables:
253// mode: c++
254// c-file-style: "CLJ-CONDENSED"
255// End:
Definition xml.h:50
A template class that maintains references counts.
Definition ref.h:361
Base class for objects that can save/restore state.
Definition state.h:45
Restores fundamental and user-defined types from images created with StateOut.
Definition statein.h:79
Serializes fundamental and user-defined types.
Definition stateout.h:71
Class WavefunctionWorld describes the environment of a Wavefunction.
Definition wfnworld.h:44
void debug_level(int debug)
Set debug level. Default is 0.
Definition wfnworld.h:152
void ints_file(const std::string &filename)
Sets name of the file used to store transformed integrals.
Definition wfnworld.h:158
const Ref< MOIntsTransformFactory > & tfactory() const
Returns the MOIntsTransformFactory object.
Definition wfnworld.h:179
const Ref< FockBuildRuntime > & fockbuild_runtime() const
Returns the FockBuildRuntime object that can build Fock matrices.
Definition wfnworld.h:185
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
void print_percent(double print_percent)
Sets how frequently updates of progress are printed out. Default is 10%.
Definition wfnworld.h:150
void print(std::ostream &o) const
Print the object.
MOIntsTransform::StoreMethod StoreMethod
Describes the method of storing transformed MO integrals.
Definition wfnworld.h:52
void ints_method(const StoreMethod::type method)
Sets the method of storing transformed MO integrals.
Definition wfnworld.h:155
WavefunctionWorld(const Ref< KeyVal > &keyval)
KeyVal constructor uses the following keywords.
const Ref< MOIntsRuntime > & moints_runtime() const
Returns the MOIntsRuntime object.
Definition wfnworld.h:181
void obsolete()
obsoletes this object every wavefunction that owns a WavefunctionWorld must call this method when it'...
void dynamic(bool dynamic)
Sets whether to use dynamic load balancing in parallel MO transformations.
Definition wfnworld.h:148
A Wavefunction is a MolecularEnergy that utilizies a GaussianBasisSet.
Definition wfn.h:52
Ref< Integral > integral()
Returns the integral evaluator.
Definition xmlwriter.h:223
Contains all MPQC code up to version 3.
Definition mpqcin.h:14
Describes the method of storing transformed MO integrals.
Definition transform.h:37
type
Definition operator.h:344

Generated at Wed Sep 25 2024 02:45:29 for MPQC 3.0.0-alpha using the documentation package Doxygen 1.12.0.