28 #ifndef _mpqc_src_lib_chemistry_qc_df_df_runtime_h
29 #define _mpqc_src_lib_chemistry_qc_df_df_runtime_h
31 #include <chemistry/qc/lcao/df.h>
32 #include <chemistry/qc/lcao/tbint_runtime.h>
33 #include <Eigen/Dense>
34 #include <util/misc/sharedptr.h>
56 const std::string& key()
const {
return key_; }
57 const std::string& space1()
const {
return space1_; }
58 const std::string& space2()
const {
return space2_; }
59 const std::string& fspace()
const {
return fspace_; }
60 const std::string& kernel()
const {
return kernel_pkey_.key(); }
61 const std::string& kernel_oper()
const {
return kernel_pkey_.oper(); }
62 const std::string& kernel_param()
const {
return kernel_pkey_.params(); }
63 bool ri()
const {
return ri_; }
66 static std::string key(
const std::string& space1,
67 const std::string& space2,
68 const std::string& fspace,
69 const std::string& kernel,
74 std::string space1_, space2_, fspace_;
91 #ifdef MPQC_NEW_FEATURES
92 typedef Eigen::VectorXd CoefResult;
93 typedef std::shared_ptr<Eigen::VectorXd> CoefResultRef;
94 typedef std::pair<int, int> IntPair;
95 typedef std::pair<std::string, IntPair> CoefKey;
96 #endif // MPQC_NEW_FEATURES
112 bool exists(
const std::string& key)
const;
114 #ifdef MPQC_NEW_FEATURES
117 bool exists(
const CoefKey& key)
const;
118 #endif // MPQC_NEW_FEATURES
126 ResultRef
get(
const std::string& key);
128 #ifdef MPQC_NEW_FEATURES
132 const CoefResultRef
get(
const CoefKey& key);
133 const CoefResultRef
get(
const std::string& dfkey,
int bf1,
int bf2){
return get(CoefKey(dfkey, IntPair(bf1, bf2))); }
134 #endif // MPQC_NEW_FEATURES
140 void remove_if(
const std::string& space_key);
152 bool force_aug =
false);
161 #ifdef MPQC_NEW_FEATURES
165 CoefResultRef get_coefficients(
const CoefKey& key);
167 typedef Eigen::HouseholderQR<Eigen::MatrixXd> Decomposition;
168 typedef std::map<IntPair, std::shared_ptr<Decomposition> > DecompositionMap;
169 DecompositionMap decomps_;
170 #endif // MPQC_NEW_FEATURES
173 const ResultRef& create_result(
const std::string& key);
194 const std::string& kernel = std::string(),
195 const std::string& solver = std::string(
"cholesky_inv"));
201 const std::string& kernel_key()
const {
return kernel_; }
202 DensityFitting::SolveMethod solver()
const {
return solver_; }
203 bool local_coulomb()
const {
return local_coulomb_; }
204 void local_coulomb(
bool val) { local_coulomb_ = val; }
205 bool local_exchange()
const {
return local_exchange_; }
206 void local_exchange(
bool val) { local_exchange_ = val; }
207 bool exact_diag_J()
const {
return exact_diag_J_; }
208 void exact_diag_J(
bool val) { exact_diag_J_ = val; }
209 bool exact_diag_K()
const {
return exact_diag_K_; }
210 void exact_diag_K(
bool val) { exact_diag_K_ = val; }
217 void print(std::ostream& o)
const;
222 bool local_exchange_;
227 DensityFitting::SolveMethod solver_;
231 return A.basis()->equiv(B.basis()) && A.kernel_key() == B.kernel_key() && A.solver() == B.solver();
241 params_(p), runtime_(r) {}
252 const Ref<DensityFittingRuntime>& runtime()
const {
return runtime_; }
258 Ref<DensityFittingParams> params_;
259 Ref<DensityFittingRuntime> runtime_;
261 static ClassDesc class_desc_;
264 inline bool operator==(
const DensityFittingInfo& A,
const DensityFittingInfo& B) {
266 return (*A.params() == *B.params()) && A.runtime() == B.runtime();
272 #endif // end of header guard
TwoBodyMOIntsRuntimeUnion23 packages 2-center and 3-center runtimes; it also keeps track of 2-center ...
Definition: tbint_runtime.h:523
DensityFittingParams defines parameters used by DensityFittingRuntime and other runtime components to...
Definition: df_runtime.h:182
DistArray4 contains a set of one or more distributed dense 4-index arrays.
Definition: distarray4.h:94
Parsed representation of a string key that represents a two-body operator set (TwoBodyOperSet + assoc...
Definition: tbint_runtime.h:77
A template class that maintains references counts.
Definition: ref.h:361
Parsed representation of a string key that represents fitting of a product of space1 and space2 into ...
Definition: df_runtime.h:52
Smart runtime support for managing DensityFitting objects.
Definition: df_runtime.h:84
void print(std::ostream &o) const
Print the object.
static std::string default_dfbs_name(const std::string &obs_name, int incX=0, bool force_aug=false)
tries to translate a library basis set label to the corresponding default value for the DF basis
void obsolete()
obsoletes this object
std::string intparams_key() const
returns the IntParams object corresponding to the fitting kernel_key
void save_data_state(StateOut &so)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
const Ref< MOIntsRuntime > & moints_runtime() const
returns the runtime used to compute results
Definition: df_runtime.h:137
ResultRef get(const std::string &key)
Returns the DistArray4 object corresponding to this key.
this class encapsulates objects needed to perform density fitting of a 4-center integral
Definition: df_runtime.h:235
This class is used to contain information about classes.
Definition: class.h:147
void save_data_state(StateOut &so)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
Definition: df_runtime.h:246
static SavableState * restore_state(StateIn &si)
Restores objects saved with save_state.
void remove_if(const std::string &space_key)
removes all entries that contain this space
const DensityFittingParams * dfparams() const
which density fitting solver will be used to compute?
Definition: df_runtime.h:108
Definition: stateout.h:71
void obsolete()
obsoletes all dependent runtimes
void save_state(StateOut &)
Save the state of the object as specified by the StateOut object.
DensityFittingParams(const Ref< GaussianBasisSet > &basis, const std::string &kernel=std::string(), const std::string &solver=std::string("cholesky_inv"))
TwoBodyOper::type kernel_otype() const
returns the TwoBodyInt::oper_type object that specifies the type of the operator kernel_key used for ...
type
types of known two-body operators
Definition: operator.h:318
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
Base class for objects that can save/restore state.
Definition: state.h:45
bool operator==(const Atom &a, const Atom &b)
bool exists(const std::string &key) const
Returns true if the given DensityFitting is available.
Contains all MPQC code up to version 3.
Definition: mpqcin.h:14
Registry wraps std::map and can be policy-configured to act as a Singleton or a regular object.
Definition: registry.h:112
Generated at Sun Jan 26 2020 23:23:58 for MPQC
3.0.0-alpha using the documentation package Doxygen
1.8.16.