MPQC 2.3.1
transform_factory.h
1//
2// transform_factory.h
3//
4// Copyright (C) 2004 Edward Valeev
5//
6// Author: Edward Valeev <edward.valeev@chemistry.gatech.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#ifdef __GNUG__
29#pragma interface
30#endif
31
32#ifndef _chemistry_qc_mbptr12_transformfactory_h
33#define _chemistry_qc_mbptr12_transformfactory_h
34
35#include <string>
36#include <util/ref/ref.h>
37#include <util/group/memory.h>
38#include <chemistry/molecule/energy.h>
39#include <chemistry/qc/basis/integral.h>
40#include <chemistry/qc/mbptr12/moindexspace.h>
41
42using namespace std;
43
44namespace sc {
45
46class TwoBodyMOIntsTransform;
47
50class MOIntsTransformFactory : virtual public SavableState {
51
52public:
53
55 enum StoreMethod { mem_posix = 0, posix = 1, mem_mpi = 2, mpi = 3, mem_only = 4 };
56
57private:
58
59 Ref<MolecularEnergy> top_mole_; // Top-level molecular energy to enable checkpointing
60
61 Ref<Integral> integral_;
62 Ref<MessageGrp> msg_;
63 Ref<MemoryGrp> mem_;
64 Ref<ThreadGrp> thr_;
65
66 Ref<MOIndexSpace> space1_;
67 Ref<MOIndexSpace> space2_;
68 Ref<MOIndexSpace> space3_;
69 Ref<MOIndexSpace> space4_;
70
71 size_t memory_;
72 bool dynamic_;
73 double print_percent_;
74 int debug_;
75 StoreMethod ints_method_;
76 std::string file_prefix_;
77
78public:
79
83 const Ref<MOIndexSpace>& space3 = 0, const Ref<MOIndexSpace>& space4 = 0);
85
87
90 const Ref<MOIndexSpace>& space3 = 0, const Ref<MOIndexSpace>& space4 = 0);
91
93 void set_top_mole(const Ref<MolecularEnergy>& top_mole) { top_mole_ = top_mole; }
95 void set_ints_method(const StoreMethod method) { ints_method_ = method; }
97 void set_file_prefix(const std::string& prefix) { file_prefix_ = prefix; }
98 void set_debug(int debug) { debug_ = debug; }
99 void set_dynamic(bool dynamic) { dynamic_ = dynamic; }
100 void set_print_percent(double print_percent) { print_percent_ = print_percent; }
101 void set_memory(size_t nbytes) { memory_ = nbytes; }
102
104 Ref<Integral> integral() const { return integral_; };
106 const StoreMethod ints_method() const { return ints_method_; }
108 const std::string file_prefix() const { return file_prefix_; }
109 const int debug() const { return debug_; }
110 const bool dynamic() const { return dynamic_; }
111 const double print_percent() const { return print_percent_; }
112 const size_t memory() const { return memory_; }
113
122
126
130
131};
132
133}
134
135#include <chemistry/qc/mbptr12/transform_tbint.h>
136
137#endif
138
139// Local Variables:
140// mode: c++
141// c-file-style: "CLJ"
142// End:
143
144
MOIntsTransformFactory is a factory that produces MOIntsTransform objects.
Definition: transform_factory.h:50
Ref< TwoBodyMOIntsTransform > twobody_transform_12(const std::string &id)
Creates an TwoBodyMOIntsTransform object that will compute (pq|rs) integrals stored in rs blocks for ...
Ref< MOIndexSpace > space1() const
Returns MOIndexSpace object 1.
Ref< MOIndexSpace > space3() const
Returns MOIndexSpace object 3.
void set_file_prefix(const std::string &prefix)
Sets the name of the file to hold the integrals.
Definition: transform_factory.h:97
Ref< TwoBodyMOIntsTransform > twobody_transform_13(const std::string &id)
Creates an TwoBodyMOIntsTransform object that will compute (pq|rs) integrals stored in qs blocks for ...
const StoreMethod ints_method() const
Returns the method of storing transformed MO integrals.
Definition: transform_factory.h:106
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 set_spaces(const Ref< MOIndexSpace > &space1, const Ref< MOIndexSpace > &space2=0, const Ref< MOIndexSpace > &space3=0, const Ref< MOIndexSpace > &space4=0)
Sets the orbital spaces.
void set_ints_method(const StoreMethod method)
Sets the method of storing transformed MO integrals. Default method is mem_posix.
Definition: transform_factory.h:95
StoreMethod
Describes the method of storing transformed MO integrals.
Definition: transform_factory.h:55
Ref< MOIndexSpace > space2() const
Returns MOIndexSpace object 2.
const std::string file_prefix() const
Sets the name of the file to hold the integrals.
Definition: transform_factory.h:108
void set_top_mole(const Ref< MolecularEnergy > &top_mole)
Specifies the top-level MolecularEnergy object to use for checkpointing.
Definition: transform_factory.h:93
Ref< Integral > integral() const
Returns the Integral factory.
Definition: transform_factory.h:104
Ref< MOIndexSpace > space4() const
Returns MOIndexSpace object 4.
A template class that maintains references counts.
Definition: ref.h:332
Base class for objects that can save/restore state.
Definition: state.h:46
Restores objects that derive from SavableState.
Definition: statein.h:70
Serializes objects that derive from SavableState.
Definition: stateout.h:61

Generated at Thu Jan 19 2023 00:00:00 for MPQC 2.3.1 using the documentation package Doxygen 1.9.5.