28#ifndef _chemistry_qc_lcao_transformtbint_h
29#define _chemistry_qc_lcao_transformtbint_h
32#include <util/ref/ref.h>
33#include <util/misc/scexception.h>
34#include <chemistry/molecule/energy.h>
35#include <chemistry/qc/basis/intdescr.h>
36#include <chemistry/qc/basis/distshpair.h>
37#include <math/distarray4/distarray4.h>
38#include <chemistry/qc/wfn/orbitalspace.h>
39#include <chemistry/qc/lcao/transform_factory.h>
54 virtual void init_acc() = 0;
57 virtual distsize_t compute_transform_dynamic_memory_(
int ni)
const = 0;
65 enum {Space1, Space2, Space3, Space4};
91 MOIntsTransform::StoreMethod::type ints_method_;
92 std::string file_prefix_;
97 size_t static_memory_;
109 void alloc_mem(
const size_t localmem);
117 int compute_transform_batchsize_(
size_t mem_static,
int rank_i);
120 static int compute_nij(
const int rank_i,
const int rank_j,
const int nproc,
const int me);
157 std::string
name()
const {
return name_;}
159 virtual std::string
type()
const =0;
221 static void set_print_percent(
double pp) { print_percent_ = pp; }
222 static double print_percent() {
return print_percent_; }
223 static void set_debug(
int d) { debug_ = d; }
224 static int debug() {
return debug_; }
227 static double print_percent_;
253 std::string
name()
const {
return name_; }
255 virtual std::string
type()
const =0;
305 int restart_orbital_;
308 MOIntsTransform::StoreMethod::type ints_method_;
309 std::string file_prefix_;
310 double log2_epsilon_;
314 size_t static_memory_;
322 virtual void init_vars();
324 virtual void init_acc() =0;
328 void alloc_mem(
const size_t localmem);
356 static void set_print_percent(
double pp) { print_percent_ = pp; }
357 static double print_percent() {
return print_percent_; }
358 static void set_debug(
int d) { debug_ = d; }
359 static int debug() {
return debug_; }
362 static double print_percent_;
366 virtual void extra_memory_report(std::ostream& os =
ExEnv::out0())
const =0;
This is used to store data that must be shared between all cooperating shell pairs.
Definition distshpair.h:46
static std::ostream & out0()
Return an ostream that writes from node 0.
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
TwoBodyMOIntsTransform computes two-body integrals in MO basis using parallel integrals-direct AO->MO...
Definition transform_tbint.h:49
std::string name() const
Returns the name of the transform.
Definition transform_tbint.h:157
bool dynamic() const
Returns whether to use dynamic load balancing.
unsigned int restart_orbital() const
returns index in range of space1_ where to start the transformation
const Ref< OrbitalSpace > & space4() const
Returns OrbitalSpace object 4.
const Ref< MemoryGrp > & mem() const
Returns the MemoryGrp object.
const Ref< OrbitalSpace > & space2() const
Returns OrbitalSpace object 2.
int batchsize() const
Returns the batchsize for each pass of the transformation.
const Ref< OrbitalSpace > & space3() const
Returns OrbitalSpace object 3.
const Ref< OrbitalSpace > & space1() const
Returns OrbitalSpace object 1.
virtual void check_int_symm(double threshold=TwoBodyMOIntsTransform::zero_integral)=0
Check symmetry of transformed integrals.
void set_top_mole(const Ref< MolecularEnergy > &top_mole)
Specifies the top-level MolecularEnergy object to use for checkpointing.
Definition transform_tbint.h:206
const Ref< DistArray4 > & ints_distarray4()
Returns the DistArray4 object that holds the integrals.
double log2_epsilon() const
Definition transform_tbint.h:181
DistShellPair::SharedData * shell_pair_data()
Returns a that data that must be shared between all DistShellPair objects.
Definition transform_tbint.h:218
virtual size_t memgrp_blksize() const =0
Returns the number of bytes allocated for each ij-block of integrals of one type in MemoryGrp.
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
const Ref< MessageGrp > & msg() const
Returns the MessageGrp object.
size_t peak_memory() const
Returns the maximum amount of memory that will be used by this object.
void memory_report(std::ostream &os=ExEnv::out0()) const
Generates a report on memory for the transform : user-specified limits, projected and actual use.
void print_header(std::ostream &os=ExEnv::out0()) const
Prints out standard header.
virtual void compute()=0
Computes transformed integrals.
void set_log2_epsilon(double prec)
virtual void partially_transformed_ints(const Ref< DistArray4 > &)
Supplies the partially transformed integrals.
static double zero_integral
By default, integrals smaller than zero_integral are considered zero.
Definition transform_tbint.h:62
void print_footer(std::ostream &os=ExEnv::out0()) const
Prints out standard footer.
unsigned int num_te_types() const
Returns the number of types of two body integrals computed.
void mospace_report(std::ostream &os=ExEnv::out0()) const
Generates a report on MO spaces for the transform.
virtual void obsolete()
Make the transform obsolete. Next call to compute() will recompute.
size_t memory() const
Returns amount of memory used by this object after compute() has been called.
const Ref< MOIntsTransformFactory > & factory() const
factory who created this
Definition transform_tbint.h:155
const Ref< TwoBodyIntDescr > & intdescr() const
Returns the integral set descriptor.
virtual std::string type() const =0
Returns a short label which uniquely identifies the type of transform.
TwoBodyThreeCenterMOIntsTransform computes (xy|z) integrals, using parallel integral-direct AO->MO tr...
Definition transform_tbint.h:240
void set_log2_epsilon(double prec)
virtual std::string type() const =0
Returns a short label which uniquely identifies the type of transform.
size_t memory() const
Returns amount of memory used by this object after compute() has been called.
void memory_report(std::ostream &os=ExEnv::out0()) const
Generates a report on memory for the transform : user-specified limits, projected and actual use.
double log2_epsilon() const
Definition transform_tbint.h:276
const Ref< OrbitalSpace > & space2() const
Returns OrbitalSpace object 2.
Definition transform_tbint.h:268
unsigned int num_te_types() const
Returns the number of types of two body integrals computed.
unsigned int restart_orbital() const
returns index in range of space1_ where to start the transformation
const Ref< TwoBodyThreeCenterIntDescr > & intdescr() const
Returns the integral set descriptor.
Definition transform_tbint.h:262
const Ref< OrbitalSpace > & space1() const
Returns OrbitalSpace object 1.
Definition transform_tbint.h:266
const Ref< OrbitalSpace > & space3() const
Returns OrbitalSpace object 3.
Definition transform_tbint.h:270
std::string name() const
Returns the name of the transform.
Definition transform_tbint.h:253
const Ref< MOIntsTransformFactory > & factory() const
factory who created this
Definition transform_tbint.h:258
void mospace_report(std::ostream &os=ExEnv::out0()) const
Generates a report on MO spaces for the transform.
void print_header(std::ostream &os=ExEnv::out0()) const
Prints out standard header.
virtual void compute()=0
Computes transformed integrals.
const Ref< DistArray4 > & ints_acc()
Returns the integrals accumulator object.
virtual distsize_t compute_transform_dynamic_memory(int batchsize=-1) const =0
Compute required dynamic memory for the given batchsize.
void print_footer(std::ostream &os=ExEnv::out0()) const
Prints out standard footer.
void obsolete()
Make the transform obsolete. Next call to compute() will recompute.
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
const Ref< MemoryGrp > & mem() const
MemoryGrp object.
Definition transform_tbint.h:260
size_t peak_memory() const
Returns the maximum amount of memory that will be used by this object.
Contains all MPQC code up to version 3.
Definition mpqcin.h:14
Predefined enumerated type for the MO spaces.
Definition transform_tbint.h:64