Psi4
Classes | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
psi::DFHelper Class Reference

#include <dfhelper.h>

Classes

struct  StreamStruct
 

Public Member Functions

 DFHelper (std::shared_ptr< BasisSet > primary, std::shared_ptr< BasisSet > aux)
 
 ~DFHelper ()
 
void set_method (std::string method)
 
std::string get_method ()
 
void set_nthreads (size_t nthreads)
 
size_t get_nthreads ()
 
void set_memory (size_t doubles)
 
size_t get_memory ()
 
size_t get_AO_size ()
 Returns the number of doubles in the screened AO integrals. More...
 
double ao_sparsity ()
 Returns the amount of sparsity in the AO integrals. More...
 
void set_AO_core (bool core)
 
bool get_AO_core ()
 
void set_MO_core (bool core)
 
bool get_MO_core ()
 
void set_schwarz_cutoff (double cutoff)
 schwarz screening cutoff (defaults to 1e-12) More...
 
double get_schwarz_cutoff ()
 
void set_metric_pow (double pow)
 fitting metric power (defaults to -0.5) More...
 
double get_metric_pow ()
 
void hold_met (bool hold)
 
bool get_hold_met ()
 
void set_fitting_condition (double condition)
 
bool get_fitting_condition ()
 
void set_do_wK (bool do_wK)
 
size_t get_do_wK ()
 
void set_omega (double omega)
 
size_t get_omega ()
 
void initialize ()
 Initialize the object. More...
 
void print_header ()
 print tons of useful info More...
 
void add_space (std::string key, SharedMatrix space)
 
void add_transformation (std::string name, std::string key1, std::string key2, std::string order="Qpq")
 
void transform ()
 invoke transformations More...
 
void fill_tensor (std::string name, SharedMatrix M)
 
void fill_tensor (std::string name, SharedMatrix M, std::vector< size_t > a1)
 
void fill_tensor (std::string name, SharedMatrix M, std::vector< size_t > a1, std::vector< size_t > a2)
 
void fill_tensor (std::string name, SharedMatrix M, std::vector< size_t > a1, std::vector< size_t > a2, std::vector< size_t > a3)
 
void fill_tensor (std::string name, double *b, std::vector< size_t > a1, std::vector< size_t > a2, std::vector< size_t > a3)
 
void fill_tensor (std::string name, double *b, std::vector< size_t > a1, std::vector< size_t > a2)
 
void fill_tensor (std::string name, double *b, std::vector< size_t > a1)
 
void fill_tensor (std::string name, double *b)
 
SharedMatrix get_tensor (std::string name)
 
SharedMatrix get_tensor (std::string name, std::vector< size_t > a1)
 
SharedMatrix get_tensor (std::string name, std::vector< size_t > a1, std::vector< size_t > a2)
 
SharedMatrix get_tensor (std::string name, std::vector< size_t > a1, std::vector< size_t > a2, std::vector< size_t > a3)
 
void add_disk_tensor (std::string key, std::tuple< size_t, size_t, size_t > dimensions)
 
void write_disk_tensor (std::string name, SharedMatrix M)
 
void write_disk_tensor (std::string name, SharedMatrix M, std::vector< size_t > a1)
 
void write_disk_tensor (std::string name, SharedMatrix M, std::vector< size_t > a1, std::vector< size_t > a2)
 
void write_disk_tensor (std::string name, SharedMatrix M, std::vector< size_t > a1, std::vector< size_t > a2, std::vector< size_t > a3)
 
void write_disk_tensor (std::string name, double *b, std::vector< size_t > a1, std::vector< size_t > a2, std::vector< size_t > a3)
 
void write_disk_tensor (std::string name, double *b, std::vector< size_t > a1, std::vector< size_t > a2)
 
void write_disk_tensor (std::string name, double *b, std::vector< size_t > a1)
 
void write_disk_tensor (std::string name, double *b)
 
void transpose (std::string name, std::tuple< size_t, size_t, size_t > order)
 tranpose a tensor after it has been written More...
 
void clear_spaces ()
 clear spaces More...
 
void clear_all ()
 clears spaces and transformations More...
 
size_t get_space_size (std::string key)
 get sizes, shapes of tensors More...
 
size_t get_tensor_size (std::string key)
 
std::tuple< size_t, size_t,
size_t > 
get_tensor_shape (std::string key)
 
size_t get_naux ()
 
void build_JK (std::vector< SharedMatrix > Cleft, std::vector< SharedMatrix > Cright, std::vector< SharedMatrix > D, std::vector< SharedMatrix > J, std::vector< SharedMatrix > K, size_t max_nocc, bool do_J, bool do_K, bool do_wK, bool lr_symmetric)
 builds J/K More...
 

Protected Types

typedef struct
psi::DFHelper::StreamStruct 
Stream
 

Protected Member Functions

void AO_core ()
 
void prepare_AO ()
 
void prepare_AO_core ()
 
void compute_dense_Qpq_blocking_Q (const size_t start, const size_t stop, double *Mp, std::vector< std::shared_ptr< TwoBodyAOInt >> eri)
 
void compute_sparse_pQq_blocking_Q (const size_t start, const size_t stop, double *Mp, std::vector< std::shared_ptr< TwoBodyAOInt >> eri)
 
void compute_sparse_pQq_blocking_p (const size_t start, const size_t stop, double *Mp, std::vector< std::shared_ptr< TwoBodyAOInt >> eri)
 
void compute_sparse_pQq_blocking_p_symm (const size_t start, const size_t stop, double *Mp, std::vector< std::shared_ptr< TwoBodyAOInt >> eri)
 
void contract_metric_AO_core_symm (double *Qpq, double *metp, size_t begin, size_t end)
 
void grab_AO (const size_t start, const size_t stop, double *Mp)
 
void first_transform_pQq (size_t nao, size_t naux, size_t bsize, size_t bcount, size_t block_size, double *Mp, double *Tp, double *Bp, std::vector< std::vector< double >> &C_buffers)
 
void prepare_blocking ()
 
std::pair< size_t, size_t > pshell_blocks_for_AO_build (const size_t mem, size_t symm, std::vector< std::pair< size_t, size_t >> &b)
 
std::pair< size_t, size_t > Qshell_blocks_for_transform (const size_t mem, size_t wtmp, size_t wfinal, std::vector< std::pair< size_t, size_t >> &b)
 
void metric_contraction_blocking (std::vector< std::pair< size_t, size_t >> &steps, size_t blocking_index, size_t block_sizes, size_t total_mem, size_t memory_factor, size_t memory_bump)
 
void prepare_sparsity ()
 
void prepare_metric ()
 
void prepare_metric_core ()
 
double * metric_prep_core (double pow)
 
std::string return_metfile (double pow)
 
std::string compute_metric (double pow)
 
void contract_metric_Qpq (std::string file, double *metp, double *Mp, double *Fp, const size_t tots)
 
void contract_metric (std::string file, double *metp, double *Mp, double *Fp, const size_t tots)
 
void contract_metric_core (std::string file)
 
void contract_metric_AO (double *Mp)
 
void contract_metric_AO_core (double *Qpq, double *metp)
 
std::pair< size_t, size_t > identify_order ()
 
void print_order ()
 
void put_transformations_Qpq (int naux, int begin, int end, int wsize, int bsize, double *Fp, int ind, bool bleft)
 
void put_transformations_pQq (int naux, int begin, int end, int block_size, int bcount, int wsize, int bsize, double *Np, double *Fp, int ind, bool bleft)
 
FILE * stream_check (std::string filename, std::string op)
 
void put_tensor (std::string file, double *b, std::pair< size_t, size_t > a1, std::pair< size_t, size_t > a2, std::pair< size_t, size_t > a3, std::string op)
 
void put_tensor (std::string file, double *b, const size_t start1, const size_t stop1, const size_t start2, const size_t stop2, std::string op)
 
void get_tensor_ (std::string file, double *b, std::pair< size_t, size_t > a1, std::pair< size_t, size_t > a2, std::pair< size_t, size_t > a3)
 
void get_tensor_ (std::string file, double *b, const size_t start1, const size_t stop1, const size_t start2, const size_t stop2)
 
void put_tensor_AO (std::string file, double *Mp, size_t size, size_t start, std::string op)
 
void get_tensor_AO (std::string file, double *Mp, size_t size, size_t start)
 
std::string start_filename (std::string start)
 
void filename_maker (std::string name, size_t a0, size_t a1, size_t a2, size_t op=0)
 
void AO_filename_maker (size_t i)
 
void check_file_key (std::string)
 
void check_file_tuple (std::string name, std::pair< size_t, size_t > t0, std::pair< size_t, size_t > t1, std::pair< size_t, size_t > t2)
 
void check_matrix_size (std::string name, SharedMatrix M, std::pair< size_t, size_t > t0, std::pair< size_t, size_t > t1, std::pair< size_t, size_t > t2)
 
void transpose_core (std::string name, std::tuple< size_t, size_t, size_t > order)
 
void transpose_disk (std::string name, std::tuple< size_t, size_t, size_t > order)
 
void compute_JK (std::vector< SharedMatrix > Cleft, std::vector< SharedMatrix > Cright, std::vector< SharedMatrix > D, std::vector< SharedMatrix > J, std::vector< SharedMatrix > K, size_t max_nocc, bool do_J, bool do_K, bool do_wK, bool lr_symmetric)
 
void compute_D (std::vector< SharedMatrix > D, std::vector< SharedMatrix > Cleft, std::vector< SharedMatrix > Cright)
 
void compute_J (std::vector< SharedMatrix > D, std::vector< SharedMatrix > J, double *Mp, double *T1p, double *T2p, std::vector< std::vector< double >> &D_buffers, size_t bcount, size_t block_size)
 
void compute_J_symm (std::vector< SharedMatrix > D, std::vector< SharedMatrix > J, double *Mp, double *T1p, double *T2p, std::vector< std::vector< double >> &D_buffers, size_t bcount, size_t block_size)
 
void compute_K (std::vector< SharedMatrix > Cleft, std::vector< SharedMatrix > Cright, std::vector< SharedMatrix > K, double *Tp, double *Jtmp, double *Mp, size_t bcount, size_t block_size, std::vector< std::vector< double >> &C_buffers, bool lr_symmetric)
 
std::tuple< size_t, size_t > Qshell_blocks_for_JK_build (std::vector< std::pair< size_t, size_t >> &b, size_t max_nocc, bool lr_symmetric)
 
void fill (double *b, size_t count, double value)
 

Protected Attributes

std::shared_ptr< BasisSetprimary_
 
std::shared_ptr< BasisSetaux_
 
size_t nao_
 
size_t naux_
 
size_t memory_ = 256000000
 
std::string method_ = "STORE"
 
bool direct_
 
bool direct_iaQ_
 
bool symm_compute_
 
bool AO_core_ = true
 
bool MO_core_ = false
 
size_t nthreads_ = 1
 
double cutoff_ = 1e-12
 
double condition_ = 1e-12
 
double mpower_ = -0.5
 
bool hold_met_ = false
 
bool built_ = false
 
bool transformed_ = false
 
std::pair< size_t, size_t > info_
 
bool ordered_ = false
 
bool do_wK_ = false
 
double omega_
 
bool debug_ = false
 
std::vector< double > Ppq_
 
std::map< double, SharedMatrixmetrics_
 
std::vector< size_t > small_skips_
 
std::vector< size_t > big_skips_
 
std::vector< size_t > symm_ignored_columns_
 
std::vector< size_t > symm_small_skips_
 
std::vector< size_t > symm_big_skips_
 
size_t pshells_
 
size_t Qshells_
 
double Qshell_max_
 
std::vector< size_t > pshell_aggs_
 
std::vector< size_t > Qshell_aggs_
 
std::vector< size_t > schwarz_fun_mask_
 
std::vector< size_t > schwarz_shell_mask_
 
std::vector< size_t > schwarz_fun_count_
 
std::vector< std::pair< double,
std::string > > 
metric_keys_
 
std::map< std::string,
std::tuple< SharedMatrix,
size_t > > 
spaces_
 
std::map< std::string,
std::tuple< std::string,
std::string, size_t > > 
transf_
 
std::map< std::string,
std::vector< double > > 
transf_core_
 
std::vector< std::pair
< std::string, size_t > > 
sorted_spaces_
 
std::vector< std::string > order_
 
std::vector< std::string > bspace_
 
std::vector< size_t > strides_
 
std::map< std::string,
std::shared_ptr< Stream > > 
file_streams_
 
std::map< std::string,
std::tuple< std::string,
std::string > > 
files_
 
std::map< std::string,
std::tuple< size_t, size_t,
size_t > > 
sizes_
 
std::map< std::string,
std::tuple< size_t, size_t,
size_t > > 
tsizes_
 
std::map< std::string,
std::string > 
AO_files_
 
std::vector< size_t > AO_file_sizes_
 
std::vector< std::string > AO_names_
 

Member Typedef Documentation

Constructor & Destructor Documentation

psi::DFHelper::DFHelper ( std::shared_ptr< BasisSet primary,
std::shared_ptr< BasisSet aux 
)
psi::DFHelper::~DFHelper ( )

Member Function Documentation

void psi::DFHelper::add_disk_tensor ( std::string  key,
std::tuple< size_t, size_t, size_t >  dimensions 
)

Add a 3-index disk tensor (that is not a transformation)

Parameters
namename of tensor - used to be accessed later
dimensionsshape of tensor
void psi::DFHelper::add_space ( std::string  key,
SharedMatrix  space 
)

Add transformation space with key

Parameters
keyused to access space orbitals
spaceorbital space matrix
void psi::DFHelper::add_transformation ( std::string  name,
std::string  key1,
std::string  key2,
std::string  order = "Qpq" 
)

Add transformation with name using two space keys

Parameters
nameused to access transformed integrals
key1left oribtal space
key2right oribtal space
orderfor direct builds of "Qpq" and "pqQ" forms only
void psi::DFHelper::AO_core ( )
protected
void psi::DFHelper::AO_filename_maker ( size_t  i)
protected
double psi::DFHelper::ao_sparsity ( )
inline

Returns the amount of sparsity in the AO integrals.

void psi::DFHelper::build_JK ( std::vector< SharedMatrix Cleft,
std::vector< SharedMatrix Cright,
std::vector< SharedMatrix D,
std::vector< SharedMatrix J,
std::vector< SharedMatrix K,
size_t  max_nocc,
bool  do_J,
bool  do_K,
bool  do_wK,
bool  lr_symmetric 
)

builds J/K

void psi::DFHelper::check_file_key ( std::string  name)
protected
void psi::DFHelper::check_file_tuple ( std::string  name,
std::pair< size_t, size_t >  t0,
std::pair< size_t, size_t >  t1,
std::pair< size_t, size_t >  t2 
)
protected
void psi::DFHelper::check_matrix_size ( std::string  name,
SharedMatrix  M,
std::pair< size_t, size_t >  t0,
std::pair< size_t, size_t >  t1,
std::pair< size_t, size_t >  t2 
)
protected
void psi::DFHelper::clear_all ( )

clears spaces and transformations

void psi::DFHelper::clear_spaces ( )

clear spaces

void psi::DFHelper::compute_D ( std::vector< SharedMatrix D,
std::vector< SharedMatrix Cleft,
std::vector< SharedMatrix Cright 
)
protected
void psi::DFHelper::compute_dense_Qpq_blocking_Q ( const size_t  start,
const size_t  stop,
double *  Mp,
std::vector< std::shared_ptr< TwoBodyAOInt >>  eri 
)
protected
void psi::DFHelper::compute_J ( std::vector< SharedMatrix D,
std::vector< SharedMatrix J,
double *  Mp,
double *  T1p,
double *  T2p,
std::vector< std::vector< double >> &  D_buffers,
size_t  bcount,
size_t  block_size 
)
protected
void psi::DFHelper::compute_J_symm ( std::vector< SharedMatrix D,
std::vector< SharedMatrix J,
double *  Mp,
double *  T1p,
double *  T2p,
std::vector< std::vector< double >> &  D_buffers,
size_t  bcount,
size_t  block_size 
)
protected
void psi::DFHelper::compute_JK ( std::vector< SharedMatrix Cleft,
std::vector< SharedMatrix Cright,
std::vector< SharedMatrix D,
std::vector< SharedMatrix J,
std::vector< SharedMatrix K,
size_t  max_nocc,
bool  do_J,
bool  do_K,
bool  do_wK,
bool  lr_symmetric 
)
protected
void psi::DFHelper::compute_K ( std::vector< SharedMatrix Cleft,
std::vector< SharedMatrix Cright,
std::vector< SharedMatrix K,
double *  Tp,
double *  Jtmp,
double *  Mp,
size_t  bcount,
size_t  block_size,
std::vector< std::vector< double >> &  C_buffers,
bool  lr_symmetric 
)
protected
std::string psi::DFHelper::compute_metric ( double  pow)
protected
void psi::DFHelper::compute_sparse_pQq_blocking_p ( const size_t  start,
const size_t  stop,
double *  Mp,
std::vector< std::shared_ptr< TwoBodyAOInt >>  eri 
)
protected
void psi::DFHelper::compute_sparse_pQq_blocking_p_symm ( const size_t  start,
const size_t  stop,
double *  Mp,
std::vector< std::shared_ptr< TwoBodyAOInt >>  eri 
)
protected
void psi::DFHelper::compute_sparse_pQq_blocking_Q ( const size_t  start,
const size_t  stop,
double *  Mp,
std::vector< std::shared_ptr< TwoBodyAOInt >>  eri 
)
protected
void psi::DFHelper::contract_metric ( std::string  file,
double *  metp,
double *  Mp,
double *  Fp,
const size_t  tots 
)
protected
void psi::DFHelper::contract_metric_AO ( double *  Mp)
protected
void psi::DFHelper::contract_metric_AO_core ( double *  Qpq,
double *  metp 
)
protected
void psi::DFHelper::contract_metric_AO_core_symm ( double *  Qpq,
double *  metp,
size_t  begin,
size_t  end 
)
protected
void psi::DFHelper::contract_metric_core ( std::string  file)
protected
void psi::DFHelper::contract_metric_Qpq ( std::string  file,
double *  metp,
double *  Mp,
double *  Fp,
const size_t  tots 
)
protected
void psi::DFHelper::filename_maker ( std::string  name,
size_t  a0,
size_t  a1,
size_t  a2,
size_t  op = 0 
)
protected
void psi::DFHelper::fill ( double *  b,
size_t  count,
double  value 
)
protected
void psi::DFHelper::fill_tensor ( std::string  name,
SharedMatrix  M 
)

Fill a SharedMatrix with three index pairs. Slice the same way you do in python.

Parameters
namename of transformation to be accessed
MSharedMatrix you want to be filled Recursive signitures were added if you want a full 3rd index, 2nd and 3rd index, etc. For example, fill_tensor("ia", M, (0, 15)) will get you ia[0:15, :, :] I will check to make sure your slice sizes are not larger than the matrix bounds, but be prepared for a runtime throw.
void psi::DFHelper::fill_tensor ( std::string  name,
SharedMatrix  M,
std::vector< size_t >  a1 
)
void psi::DFHelper::fill_tensor ( std::string  name,
SharedMatrix  M,
std::vector< size_t >  a1,
std::vector< size_t >  a2 
)
void psi::DFHelper::fill_tensor ( std::string  name,
SharedMatrix  M,
std::vector< size_t >  a1,
std::vector< size_t >  a2,
std::vector< size_t >  a3 
)
void psi::DFHelper::fill_tensor ( std::string  name,
double *  b,
std::vector< size_t >  a1,
std::vector< size_t >  a2,
std::vector< size_t >  a3 
)

Fill a buffer with three index pairs. Same concept as fill_tensor.

Parameters
namename of transformation to be accessed
bpointer to allocated memory Be cautious, this function does not bound check your buffer against the tuples provied.
void psi::DFHelper::fill_tensor ( std::string  name,
double *  b,
std::vector< size_t >  a1,
std::vector< size_t >  a2 
)
void psi::DFHelper::fill_tensor ( std::string  name,
double *  b,
std::vector< size_t >  a1 
)
void psi::DFHelper::fill_tensor ( std::string  name,
double *  b 
)
void psi::DFHelper::first_transform_pQq ( size_t  nao,
size_t  naux,
size_t  bsize,
size_t  bcount,
size_t  block_size,
double *  Mp,
double *  Tp,
double *  Bp,
std::vector< std::vector< double >> &  C_buffers 
)
protected
bool psi::DFHelper::get_AO_core ( )
inline
size_t psi::DFHelper::get_AO_size ( )
inline

Returns the number of doubles in the screened AO integrals.

size_t psi::DFHelper::get_do_wK ( )
inline
bool psi::DFHelper::get_fitting_condition ( )
inline
bool psi::DFHelper::get_hold_met ( )
inline
size_t psi::DFHelper::get_memory ( )
inline
std::string psi::DFHelper::get_method ( )
inline
double psi::DFHelper::get_metric_pow ( )
inline
bool psi::DFHelper::get_MO_core ( )
inline
size_t psi::DFHelper::get_naux ( )
inline
size_t psi::DFHelper::get_nthreads ( )
inline
size_t psi::DFHelper::get_omega ( )
inline
double psi::DFHelper::get_schwarz_cutoff ( )
inline
size_t psi::DFHelper::get_space_size ( std::string  key)

get sizes, shapes of tensors

SharedMatrix psi::DFHelper::get_tensor ( std::string  name)

return a SharedMatrix, I take care of sizing for you.

Parameters
namename of transformation to be accessed I always compound the 2nd and 3rd indices. For example, get_tensor("ia", (0:15), (0:5), (0:5)) will return a SharedMatrix of size (15, 25), so be careful if you plan to use Matrix::gemm
SharedMatrix psi::DFHelper::get_tensor ( std::string  name,
std::vector< size_t >  a1 
)
SharedMatrix psi::DFHelper::get_tensor ( std::string  name,
std::vector< size_t >  a1,
std::vector< size_t >  a2 
)
SharedMatrix psi::DFHelper::get_tensor ( std::string  name,
std::vector< size_t >  a1,
std::vector< size_t >  a2,
std::vector< size_t >  a3 
)
void psi::DFHelper::get_tensor_ ( std::string  file,
double *  b,
std::pair< size_t, size_t >  a1,
std::pair< size_t, size_t >  a2,
std::pair< size_t, size_t >  a3 
)
protected
void psi::DFHelper::get_tensor_ ( std::string  file,
double *  b,
const size_t  start1,
const size_t  stop1,
const size_t  start2,
const size_t  stop2 
)
protected
void psi::DFHelper::get_tensor_AO ( std::string  file,
double *  Mp,
size_t  size,
size_t  start 
)
protected
std::tuple< size_t, size_t, size_t > psi::DFHelper::get_tensor_shape ( std::string  key)
size_t psi::DFHelper::get_tensor_size ( std::string  key)
void psi::DFHelper::grab_AO ( const size_t  start,
const size_t  stop,
double *  Mp 
)
protected
void psi::DFHelper::hold_met ( bool  hold)
inline

Sets the fitting metric to be held in core (defaults to FALSE)

Parameters
holdTRUE if metrics are to be held in core. Memory contraints adapt accordingly.
std::pair< size_t, size_t > psi::DFHelper::identify_order ( )
protected
void psi::DFHelper::initialize ( )

Initialize the object.

void psi::DFHelper::metric_contraction_blocking ( std::vector< std::pair< size_t, size_t >> &  steps,
size_t  blocking_index,
size_t  block_sizes,
size_t  total_mem,
size_t  memory_factor,
size_t  memory_bump 
)
protected
double * psi::DFHelper::metric_prep_core ( double  pow)
protected
void psi::DFHelper::prepare_AO ( )
protected
void psi::DFHelper::prepare_AO_core ( )
protected
void psi::DFHelper::prepare_blocking ( )
protected
void psi::DFHelper::prepare_metric ( )
protected
void psi::DFHelper::prepare_metric_core ( )
protected
void psi::DFHelper::prepare_sparsity ( )
protected
void psi::DFHelper::print_header ( )

print tons of useful info

void psi::DFHelper::print_order ( )
protected
std::pair< size_t, size_t > psi::DFHelper::pshell_blocks_for_AO_build ( const size_t  mem,
size_t  symm,
std::vector< std::pair< size_t, size_t >> &  b 
)
protected
void psi::DFHelper::put_tensor ( std::string  file,
double *  b,
std::pair< size_t, size_t >  a1,
std::pair< size_t, size_t >  a2,
std::pair< size_t, size_t >  a3,
std::string  op 
)
protected
void psi::DFHelper::put_tensor ( std::string  file,
double *  b,
const size_t  start1,
const size_t  stop1,
const size_t  start2,
const size_t  stop2,
std::string  op 
)
protected
void psi::DFHelper::put_tensor_AO ( std::string  file,
double *  Mp,
size_t  size,
size_t  start,
std::string  op 
)
protected
void psi::DFHelper::put_transformations_pQq ( int  naux,
int  begin,
int  end,
int  block_size,
int  bcount,
int  wsize,
int  bsize,
double *  Np,
double *  Fp,
int  ind,
bool  bleft 
)
protected
void psi::DFHelper::put_transformations_Qpq ( int  naux,
int  begin,
int  end,
int  wsize,
int  bsize,
double *  Fp,
int  ind,
bool  bleft 
)
protected
std::tuple< size_t, size_t > psi::DFHelper::Qshell_blocks_for_JK_build ( std::vector< std::pair< size_t, size_t >> &  b,
size_t  max_nocc,
bool  lr_symmetric 
)
protected
std::pair< size_t, size_t > psi::DFHelper::Qshell_blocks_for_transform ( const size_t  mem,
size_t  wtmp,
size_t  wfinal,
std::vector< std::pair< size_t, size_t >> &  b 
)
protected
std::string psi::DFHelper::return_metfile ( double  pow)
protected
void psi::DFHelper::set_AO_core ( bool  core)
inline

Sets the AO integrals to in-core. (Defaults to TRUE)

Parameters
coreTrue to indicate in-core DFHelper will keep track of this memory. NOTE: DFHelper will automatically revert to on-disk if the sizes of the AO integrals is greater than 90% of the memory it controlls.
void psi::DFHelper::set_do_wK ( bool  do_wK)
inline

Lets me know whether to compute those other type of integrals

Parameters
do_wKboolean indicating to compute other integrals
void psi::DFHelper::set_fitting_condition ( double  condition)
inline

Sets the fitting metric condition

Parameters
condition,:tolerrence for metric^pow
void psi::DFHelper::set_memory ( size_t  doubles)
inline

Indicates the memory (in doubles) DFHelper gets to control specifies number of doubles given for memory defaults to 256,000,000 (2.04GB)

void psi::DFHelper::set_method ( std::string  method)
inline

Specify workflow for transforming and contracting integrals

Parameters
method(STORE or DIRECT or DIRECT_iaQ) to indicate workflow STORE: contract and save AO integrals before transforming DIRECT: pre-transform integrals before metric contraction DIRECT_iaQ: special workflow when using integrals of the iaQ form (defaults to STORE)
void psi::DFHelper::set_metric_pow ( double  pow)
inline

fitting metric power (defaults to -0.5)

void psi::DFHelper::set_MO_core ( bool  core)
inline

Sets the MO integrals to in-core. (Defaults to FALSE)

Parameters
coreTrue to indicate in-core DFHelper will not keep track of this memory. If a seg fault occurs, the MOs were bigger than you thought!
void psi::DFHelper::set_nthreads ( size_t  nthreads)
inline

Tells DFHelper how many threads to spawn in parallel regions

Parameters
nthreadsspecifies number of threads to use oversubcription is possible
void psi::DFHelper::set_omega ( double  omega)
inline

sets the parameter for the other type of integrals

Parameters
omegadouble indicating parameter for other type
void psi::DFHelper::set_schwarz_cutoff ( double  cutoff)
inline

schwarz screening cutoff (defaults to 1e-12)

std::string psi::DFHelper::start_filename ( std::string  start)
protected
FILE * psi::DFHelper::stream_check ( std::string  filename,
std::string  op 
)
protected
void psi::DFHelper::transform ( )

invoke transformations

void psi::DFHelper::transpose ( std::string  name,
std::tuple< size_t, size_t, size_t >  order 
)

tranpose a tensor after it has been written

void psi::DFHelper::transpose_core ( std::string  name,
std::tuple< size_t, size_t, size_t >  order 
)
protected
void psi::DFHelper::transpose_disk ( std::string  name,
std::tuple< size_t, size_t, size_t >  order 
)
protected
void psi::DFHelper::write_disk_tensor ( std::string  name,
SharedMatrix  M 
)

Write to a 3-index disk tensor from a SharedMatrix Can be a transformation if you want to overwrite one.

Parameters
namename of tensor - used to be accessed later
MSharedMatrix with contents to write to disk tensor Bound checks are performed
void psi::DFHelper::write_disk_tensor ( std::string  name,
SharedMatrix  M,
std::vector< size_t >  a1 
)
void psi::DFHelper::write_disk_tensor ( std::string  name,
SharedMatrix  M,
std::vector< size_t >  a1,
std::vector< size_t >  a2 
)
void psi::DFHelper::write_disk_tensor ( std::string  name,
SharedMatrix  M,
std::vector< size_t >  a1,
std::vector< size_t >  a2,
std::vector< size_t >  a3 
)
void psi::DFHelper::write_disk_tensor ( std::string  name,
double *  b,
std::vector< size_t >  a1,
std::vector< size_t >  a2,
std::vector< size_t >  a3 
)

Write to a 3-index disk tensor from a buffer Can be a transformation if you want to overwrite one.

Parameters
namename of tensor - used to be accessed later
bbuffer to write to disk tensor No bound checking on buffer is performed, use caution!
void psi::DFHelper::write_disk_tensor ( std::string  name,
double *  b,
std::vector< size_t >  a1,
std::vector< size_t >  a2 
)
void psi::DFHelper::write_disk_tensor ( std::string  name,
double *  b,
std::vector< size_t >  a1 
)
void psi::DFHelper::write_disk_tensor ( std::string  name,
double *  b 
)

Member Data Documentation

bool psi::DFHelper::AO_core_ = true
protected
std::vector<size_t> psi::DFHelper::AO_file_sizes_
protected
std::map<std::string, std::string> psi::DFHelper::AO_files_
protected
std::vector<std::string> psi::DFHelper::AO_names_
protected
std::shared_ptr<BasisSet> psi::DFHelper::aux_
protected
std::vector<size_t> psi::DFHelper::big_skips_
protected
std::vector<std::string> psi::DFHelper::bspace_
protected
bool psi::DFHelper::built_ = false
protected
double psi::DFHelper::condition_ = 1e-12
protected
double psi::DFHelper::cutoff_ = 1e-12
protected
bool psi::DFHelper::debug_ = false
protected
bool psi::DFHelper::direct_
protected
bool psi::DFHelper::direct_iaQ_
protected
bool psi::DFHelper::do_wK_ = false
protected
std::map<std::string, std::shared_ptr<Stream> > psi::DFHelper::file_streams_
protected
std::map<std::string, std::tuple<std::string, std::string> > psi::DFHelper::files_
protected
bool psi::DFHelper::hold_met_ = false
protected
std::pair<size_t, size_t> psi::DFHelper::info_
protected
size_t psi::DFHelper::memory_ = 256000000
protected
std::string psi::DFHelper::method_ = "STORE"
protected
std::vector<std::pair<double, std::string> > psi::DFHelper::metric_keys_
protected
std::map<double, SharedMatrix> psi::DFHelper::metrics_
protected
bool psi::DFHelper::MO_core_ = false
protected
double psi::DFHelper::mpower_ = -0.5
protected
size_t psi::DFHelper::nao_
protected
size_t psi::DFHelper::naux_
protected
size_t psi::DFHelper::nthreads_ = 1
protected
double psi::DFHelper::omega_
protected
std::vector<std::string> psi::DFHelper::order_
protected
bool psi::DFHelper::ordered_ = false
protected
std::vector<double> psi::DFHelper::Ppq_
protected
std::shared_ptr<BasisSet> psi::DFHelper::primary_
protected
std::vector<size_t> psi::DFHelper::pshell_aggs_
protected
size_t psi::DFHelper::pshells_
protected
std::vector<size_t> psi::DFHelper::Qshell_aggs_
protected
double psi::DFHelper::Qshell_max_
protected
size_t psi::DFHelper::Qshells_
protected
std::vector<size_t> psi::DFHelper::schwarz_fun_count_
protected
std::vector<size_t> psi::DFHelper::schwarz_fun_mask_
protected
std::vector<size_t> psi::DFHelper::schwarz_shell_mask_
protected
std::map<std::string, std::tuple<size_t, size_t, size_t> > psi::DFHelper::sizes_
protected
std::vector<size_t> psi::DFHelper::small_skips_
protected
std::vector<std::pair<std::string, size_t> > psi::DFHelper::sorted_spaces_
protected
std::map<std::string, std::tuple<SharedMatrix, size_t> > psi::DFHelper::spaces_
protected
std::vector<size_t> psi::DFHelper::strides_
protected
std::vector<size_t> psi::DFHelper::symm_big_skips_
protected
bool psi::DFHelper::symm_compute_
protected
std::vector<size_t> psi::DFHelper::symm_ignored_columns_
protected
std::vector<size_t> psi::DFHelper::symm_small_skips_
protected
std::map<std::string, std::tuple<std::string, std::string, size_t> > psi::DFHelper::transf_
protected
std::map<std::string, std::vector<double> > psi::DFHelper::transf_core_
protected
bool psi::DFHelper::transformed_ = false
protected
std::map<std::string, std::tuple<size_t, size_t, size_t> > psi::DFHelper::tsizes_
protected

The documentation for this class was generated from the following files: