MPQC 3.0.0-alpha
Loading...
Searching...
No Matches
transform_factory.h
1//
2// transform_factory.h
3//
4// Copyright (C) 2004 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 _chemistry_qc_lcao_transformfactory_h
29#define _chemistry_qc_lcao_transformfactory_h
30
31#include <string>
32#include <util/ref/ref.h>
33#include <util/group/memory.h>
34#include <chemistry/molecule/energy.h>
35#include <chemistry/qc/basis/integral.h>
36#include <chemistry/qc/basis/intdescr.h>
37#include <chemistry/qc/wfn/orbitalspace.h>
38#include <chemistry/qc/lcao/transform.h>
39
40namespace sc {
41
48 public:
52
54 bool data_persistent() const
55 {
56 return data_persistent_;
57 }
58 void data_persistent(bool data_persistent_)
59 {
60 this->data_persistent_ = data_persistent_;
61 }
62
63 private:
64 bool data_persistent_;
65 };
66
67class TwoBodyMOIntsTransform;
68class TwoBodyThreeCenterMOIntsTransform;
69class DensityFittingInfo;
70namespace detail {
71 template <bool DF> struct MakeTwoBodyTransform;
72};
73
76class MOIntsTransformFactory : virtual public SavableState {
77
78 public:
80
81private:
82
85
86 Ref<MolecularEnergy> top_mole_; // Top-level molecular energy to enable checkpointing
87
88 Ref<Integral> integral_;
89 Ref<MessageGrp> msg_;
90 Ref<MemoryGrp> mem_;
91 Ref<ThreadGrp> thr_;
92
93 Ref<TwoBodyIntDescr> tbintdescr_;
94
97 Ref<OrbitalSpace> space1_;
98 Ref<OrbitalSpace> space2_;
99 Ref<OrbitalSpace> space3_;
100 Ref<OrbitalSpace> space4_;
101 DensityFittingInfo* df_info_;
102
104 bool dynamic_;
105 double print_percent_;
106 int debug_;
107 MOIntsTransform::StoreMethod::type ints_method_;
108 std::string file_prefix_;
109 double log2_precision_; //< numerical precision of the integrals
110
111 template <typename TransformType> Ref<TwoBodyMOIntsTransform>
112 twobody_transform(const std::string& name,
113 const Ref<TwoBodyIntDescr>& descrarg);
114 template <typename TransformType> Ref<TwoBodyThreeCenterMOIntsTransform>
115 twobody_transform(const std::string& name,
116 const Ref<TwoBodyThreeCenterIntDescr>& descrarg);
117
118 // this class helps to form correct transform constructor calls
119 template <bool DF> friend struct sc::detail::MakeTwoBodyTransform;
120
121public:
122
126
128
130 void obsolete();
131
134 const Ref<OrbitalSpace>& space3 = 0, const Ref<OrbitalSpace>& space4 = 0);
136 const DensityFittingInfo* df_info() const { return const_cast<const DensityFittingInfo*>(df_info_); }
137 void df_info(const DensityFittingInfo* i) { df_info_ = const_cast<DensityFittingInfo*>(i); }
138
140 void set_top_mole(const Ref<MolecularEnergy>& top_mole) { top_mole_ = top_mole; }
142 void tbintdescr(const Ref<TwoBodyIntDescr>& descr) { tbintdescr_ = descr; }
144 void set_ints_method(const MOIntsTransform::StoreMethod::type method) { ints_method_ = method; }
146 void set_file_prefix(const std::string& prefix) { file_prefix_ = prefix; }
147 void set_debug(int debug);
148 void set_print_percent(double print_percent);
149 void set_dynamic(bool dynamic) { dynamic_ = dynamic; }
154 void set_log2_precision(double prec) { log2_precision_ = prec; }
155
157 Ref<MemoryGrp> mem() const { return mem_; }
159 Ref<MessageGrp> msg() const { return msg_; }
161 const Ref<Integral>& integral() const { return integral_; }
163 const Ref<OrbitalSpaceRegistry>& orbital_registry() const { return oreg_; }
165 const Ref<AOSpaceRegistry>& ao_registry() const { return aoreg_; }
167 Ref<TwoBodyIntDescr> tbintdescr() const { return tbintdescr_; }
169 MOIntsTransform::StoreMethod::type ints_method() const { return ints_method_; }
170 const CreateTransformHints& hints() const { return hints_; }
171 CreateTransformHints& hints() { return hints_; }
173 std::string file_prefix() const { return file_prefix_; }
174 int debug() const { return debug_; }
175 double print_percent() const { return print_percent_; }
176 bool dynamic() const { return dynamic_; }
181 double log2_precision() const { return log2_precision_; }
182
191
195 twobody_transform_13(const std::string& id, const Ref<TwoBodyIntDescr>& descr = 0);
196
200 twobody_transform_12(const std::string& id, const Ref<TwoBodyIntDescr>& descr = 0);
201
202#if 1
206 twobody_transform(StorageType storage, const std::string& id,
207 const Ref<TwoBodyIntDescr>& descr = 0);
208#endif
209
212 const std::string& name,
213 const Ref<TwoBodyIntDescr>& descrarg);
216 const std::string& name,
217 const Ref<TwoBodyThreeCenterIntDescr>& descrarg);
218
219};
220
221}
222
223#include <chemistry/qc/lcao/transform_tbint.h>
224
225#endif
226
227// Local Variables:
228// mode: c++
229// c-file-style: "CLJ"
230// End:
231
232
Provides hints to the constructors of a Transform class that help configure its implementation.
Definition transform_factory.h:47
bool data_persistent() const
will this transform's data need to be used multiple times?
Definition transform_factory.h:54
MOIntsTransformFactory is a factory that produces MOIntsTransform objects.
Definition transform_factory.h:76
void set_log2_precision(double prec)
Definition transform_factory.h:154
void set_file_prefix(const std::string &prefix)
Sets the name of the file to hold the integrals.
Definition transform_factory.h:146
Ref< OrbitalSpace > space1() const
Returns OrbitalSpace object 1.
Ref< TwoBodyThreeCenterMOIntsTransform > twobody_transform(MOIntsTransform::TwoBodyTransformType T, const std::string &name, const Ref< TwoBodyThreeCenterIntDescr > &descrarg)
Creates an TwoBodyThreeCenterMOIntsTransform object of type T.
const Ref< OrbitalSpaceRegistry > & orbital_registry() const
returns the OrbitalSpaceRegistry
Definition transform_factory.h:163
MOIntsTransform::StoreMethod::type ints_method() const
Returns the method of storing transformed MO integrals.
Definition transform_factory.h:169
const DensityFittingInfo * df_info() const
provides the DensityFittingInfo object
Definition transform_factory.h:136
const Ref< AOSpaceRegistry > & ao_registry() const
returns the AOSpaceRegistry
Definition transform_factory.h:165
std::string file_prefix() const
Sets the name of the file to hold the integrals.
Definition transform_factory.h:173
Ref< TwoBodyMOIntsTransform > twobody_transform(MOIntsTransform::TwoBodyTransformType T, const std::string &name, const Ref< TwoBodyIntDescr > &descrarg)
Creates an TwoBodyMOIntsTransform object of type T.
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_ints_method(const MOIntsTransform::StoreMethod::type method)
Sets the method of storing transformed MO integrals. Default method is mem_posix.
Definition transform_factory.h:144
void set_spaces(const Ref< OrbitalSpace > &space1, const Ref< OrbitalSpace > &space2=0, const Ref< OrbitalSpace > &space3=0, const Ref< OrbitalSpace > &space4=0)
Sets the orbital spaces.
Ref< OrbitalSpace > space3() const
Returns OrbitalSpace object 3.
Ref< MemoryGrp > mem() const
Returns the MemoryGrp object.
Definition transform_factory.h:157
void tbintdescr(const Ref< TwoBodyIntDescr > &descr)
Changes the default TwoBodyIntDescr used to produce integrals.
Definition transform_factory.h:142
Ref< TwoBodyMOIntsTransform > twobody_transform_12(const std::string &id, const Ref< TwoBodyIntDescr > &descr=0)
Creates an TwoBodyMOIntsTransform object that will compute (pq|rs) integrals stored in rs blocks for ...
double log2_precision() const
Definition transform_factory.h:181
void obsolete()
obsolete this object
Ref< TwoBodyMOIntsTransform > twobody_transform_13(const std::string &id, const Ref< TwoBodyIntDescr > &descr=0)
Creates an TwoBodyMOIntsTransform object that will compute (pq|rs) integrals stored in qs blocks for ...
void set_top_mole(const Ref< MolecularEnergy > &top_mole)
Specifies the top-level MolecularEnergy object to use for checkpointing.
Definition transform_factory.h:140
const Ref< Integral > & integral() const
Returns the Integral factory.
Definition transform_factory.h:161
Ref< MessageGrp > msg() const
Returns the MessageGrp object.
Definition transform_factory.h:159
Ref< TwoBodyMOIntsTransform > twobody_transform(StorageType storage, const std::string &id, const Ref< TwoBodyIntDescr > &descr=0)
Creates an TwoBodyMOIntsTransform object that will compute (pq|rs) integrals stored according to stor...
Ref< OrbitalSpace > space2() const
Returns OrbitalSpace object 2.
Ref< OrbitalSpace > space4() const
Returns OrbitalSpace object 4.
Ref< TwoBodyIntDescr > tbintdescr() const
Returns the default TwoBodyIntDescr used to produce integrals.
Definition transform_factory.h:167
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
Implements descriptors for various two-body evaluators.
Definition intdescr.h:93
SpinCase1 other(SpinCase1 S)
given 1-spin return the other 1-spin
Contains all MPQC code up to version 3.
Definition mpqcin.h:14
this class encapsulates objects needed to perform density fitting of a 4-center integral
Definition df_runtime.h:235
TwoBodyTransformType
enumerates all known 4-center transform types
Definition transform.h:44
StorageType
How integrals are stored. Type_13 means (ix|jy) integrals are stored as (ij|xy)
Definition transform.h:41
Definition transform_factory.timpl.h:39

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