Psi4
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
psi::FastDFJK Class Reference

#include <jk.h>

Inheritance diagram for psi::FastDFJK:
psi::JK

Public Member Functions

 FastDFJK (std::shared_ptr< BasisSet > primary, std::shared_ptr< BasisSet > auxiliary)
 
virtual ~FastDFJK ()
 Destructor. More...
 
void set_condition (double condition)
 
void set_df_metric (const std::string &metric)
 
void set_df_domains (const std::string domains)
 
void set_df_bump_R0 (double R0)
 
void set_df_bump_R1 (double R1)
 
void set_df_theta (double theta)
 
void set_unit (unsigned int unit)
 
void set_df_ints_io (const std::string &val)
 
void set_df_ints_num_threads (int val)
 
virtual void print_header () const
 
- Public Member Functions inherited from psi::JK
 JK (std::shared_ptr< BasisSet > primary)
 
virtual ~JK ()
 Destructor. More...
 
void set_allow_desymmetrization (bool t_f)
 
void set_cutoff (double cutoff)
 
void set_memory (unsigned long int memory)
 
void set_omp_nthread (int omp_nthread)
 
void set_print (int print)
 Print flag (defaults to 1) More...
 
void set_debug (int debug)
 Debug flag (defaults to 0) More...
 
void set_bench (int bench)
 Bench flag (defaults to 0) More...
 
void set_do_J (bool do_J)
 
void set_do_K (bool do_K)
 
void set_do_wK (bool do_wK)
 
void set_omega (double omega)
 
void initialize ()
 
void compute ()
 
void finalize ()
 
virtual SharedVector iaia (SharedMatrix Ci, SharedMatrix Ca)
 
std::vector< SharedMatrix > & C_left ()
 
std::vector< SharedMatrix > & C_right ()
 
const std::vector< SharedMatrix > & J () const
 
const std::vector< SharedMatrix > & K () const
 
const std::vector< SharedMatrix > & wK () const
 
const std::vector< SharedMatrix > & D () const
 

Protected Member Functions

virtual bool C1 () const
 Do we need to backtransform to C1 under the hood? More...
 
virtual void preiterations ()
 Setup integrals, files, etc. More...
 
virtual void compute_JK ()
 Compute J/K for current C/D. More...
 
virtual void postiterations ()
 Delete integrals, files, etc. More...
 
void common_init ()
 Common initialization. More...
 
std::shared_ptr< Matrixbuild_Z (double omega)
 
void build_atom_pairs ()
 
void build_shell_pairs ()
 
void build_auxiliary_partition ()
 
void build_Bpq ()
 
void bump (std::shared_ptr< Matrix > J, const std::vector< double > &bump_atoms, const std::vector< int > &auxiliary_atoms, bool bump_diagonal)
 
void build_J (std::shared_ptr< Matrix > Z, const std::vector< std::shared_ptr< Matrix > > &D, const std::vector< std::shared_ptr< Matrix > > &J)
 
void build_K (std::shared_ptr< Matrix > Z, const std::vector< std::shared_ptr< Matrix > > &D, const std::vector< std::shared_ptr< Matrix > > &K)
 
- Protected Member Functions inherited from psi::JK
void compute_D ()
 Build the pseudo-density D_, before compute_JK() More...
 
void USO2AO ()
 Transform current C_left_/C_right_/D_ to C_left_ao_/C_right_ao_/D_ao_, before compute_JK() More...
 
void AO2USO ()
 Transform finished J_ao_/K_ao_ to J_/K_, after compute_JK() More...
 
void allocate_JK ()
 Allocate J_/K_ should we be using SOs. More...
 
void common_init ()
 
unsigned long int memory_overhead () const
 Memory (doubles) used to hold J/K/wK/C/D and ao versions, at current moment. More...
 

Protected Attributes

std::shared_ptr< BasisSetauxiliary_
 Auxiliary basis set. More...
 
std::shared_ptr< PSIOpsio_
 PSIO object. More...
 
std::string df_ints_io_
 Cache action for three-index integrals. More...
 
int df_ints_num_threads_
 Number of threads for DF integrals. More...
 
double condition_
 Condition cutoff in fitting metric, defaults to 1.0E-12. More...
 
unsigned int unit_
 File number for (Q|mn) tensor. More...
 
bool is_core_
 Core or disk? More...
 
std::shared_ptr< ERISievesieve_
 Sieve, must be static throughout the life of the object. More...
 
std::string metric_
 Fitting metric (COULOMB or EWALD) [EWALD is SR]. More...
 
double theta_
 Ewald metric range parameter. More...
 
std::string domains_
 Geometric atom domain selection algorithm. More...
 
double bump_R0_
 Flat radius in MHG bump function. More...
 
double bump_R1_
 Annihilation radius in MHG bump function. More...
 
std::vector< std::pair< int,
int > > 
atom_pairs_
 Significant atom pairs (reduced triangular indexing A >= B) More...
 
std::vector< std::vector
< std::pair< int, int > > > 
shell_pairs_
 Significant shell pairs (reduced triangular indexing P >= Q) More...
 
std::vector< std::vector< int > > auxiliary_atoms_
 Auxiliary basis centers for each atom pair. More...
 
std::vector< std::vector
< double > > 
bump_atoms_
 Modified MHG bump function, by atom pair and auxiliary basis center. More...
 
std::vector< std::shared_ptr
< Matrix > > 
Bpq_
 Three-index tensors (pq|A)(A|B)^-1 for each atom pair. More...
 
std::shared_ptr< MatrixZ_
 The DF Z operator. More...
 
std::shared_ptr< MatrixZ_LR_
 The DF long-range Z operator. More...
 
- Protected Attributes inherited from psi::JK
int print_
 Print flag, defaults to 1. More...
 
int debug_
 Debug flag, defaults to 0. More...
 
int bench_
 Bench flag, defaults to 0. More...
 
unsigned long int memory_
 Memory available, in doubles, defaults to 256 MB (32 M doubles) More...
 
int omp_nthread_
 Number of OpenMP threads (defaults to 1 in no OpenMP, Process::environment.get_n_threads() otherwise) More...
 
double cutoff_
 Integral cutoff (defaults to 0.0) More...
 
bool allow_desymmetrization_
 Whether to all desymmetrization, for cases when it's already been performed elsewhere. More...
 
bool do_J_
 Do J matrices? Defaults to true. More...
 
bool do_K_
 Do K matrices? Defaults to true. More...
 
bool do_wK_
 Do wK matrices? Defaults to false. More...
 
double omega_
 Omega, defaults to 0.0. More...
 
bool lr_symmetric_
 Left-right symmetric? Determined in each call of compute() More...
 
std::vector< SharedMatrixC_left_
 Pseudo-occupied C matrices, left side. More...
 
std::vector< SharedMatrixC_right_
 Pseudo-occupied C matrices, right side. More...
 
std::vector< SharedMatrixD_
 Pseudo-density matrices $D_{ls}=C_{li}^{left}C_{si}^{right}$. More...
 
std::vector< SharedMatrixJ_
 J matrices: $J_{mn}=(mn|ls)C_{li}^{left}C_{si}^{right}$. More...
 
std::vector< SharedMatrixK_
 K matrices: $K_{mn}=(ml|ns)C_{li}^{left}C_{si}^{right}$. More...
 
std::vector< SharedMatrixwK_
 wK matrices: $K_{mn}(\omega)=(ml|\omega|ns)C_{li}^{left}C_{si}^{right}$ More...
 
std::shared_ptr< BasisSetprimary_
 Primary basis set. More...
 
SharedMatrix AO2USO_
 AO2USO transformation matrix. More...
 
std::vector< SharedMatrixC_left_ao_
 Pseudo-occupied C matrices, left side. More...
 
std::vector< SharedMatrixC_right_ao_
 Pseudo-occupied C matrices, right side. More...
 
std::vector< SharedMatrixD_ao_
 Pseudo-density matrices. More...
 
std::vector< SharedMatrixJ_ao_
 J matrices: J_mn = (mn|ls) C_li^left C_si^right. More...
 
std::vector< SharedMatrixK_ao_
 K matrices: K_mn = (ml|ns) C_li^left C_si^right. More...
 
std::vector< SharedMatrixwK_ao_
 wK matrices: wK_mn = (ml|w|ns) C_li^left C_si^right More...
 

Additional Inherited Members

- Static Public Member Functions inherited from psi::JK
static std::shared_ptr< JKbuild_JK (std::shared_ptr< BasisSet > primary, std::shared_ptr< BasisSet > auxiliary, Options &options)
 
static std::shared_ptr< JKbuild_JK (std::shared_ptr< BasisSet > primary, std::shared_ptr< BasisSet > auxiliary, Options &options, std::string jk_type)
 

Detailed Description

Class FastDFJK

JK implementation using sieved, threaded density-fitted technology

Constructor & Destructor Documentation

psi::FastDFJK::FastDFJK ( std::shared_ptr< BasisSet primary,
std::shared_ptr< BasisSet auxiliary 
)
Parameters
primaryprimary basis set for this system. AO2USO transforms will be built with the molecule contained in this basis object, so the incoming C matrices must have the same spatial symmetry structure as this molecule
auxiliaryauxiliary basis set for this system.
psi::FastDFJK::~FastDFJK ( )
virtual

Destructor.

Member Function Documentation

void psi::FastDFJK::build_atom_pairs ( )
protected
void psi::FastDFJK::build_auxiliary_partition ( )
protected
void psi::FastDFJK::build_Bpq ( )
protected
void psi::FastDFJK::build_J ( std::shared_ptr< Matrix Z,
const std::vector< std::shared_ptr< Matrix > > &  D,
const std::vector< std::shared_ptr< Matrix > > &  J 
)
protected
void psi::FastDFJK::build_K ( std::shared_ptr< Matrix Z,
const std::vector< std::shared_ptr< Matrix > > &  D,
const std::vector< std::shared_ptr< Matrix > > &  K 
)
protected
void psi::FastDFJK::build_shell_pairs ( )
protected
std::shared_ptr< Matrix > psi::FastDFJK::build_Z ( double  omega)
protected
void psi::FastDFJK::bump ( std::shared_ptr< Matrix J,
const std::vector< double > &  bump_atoms,
const std::vector< int > &  auxiliary_atoms,
bool  bump_diagonal 
)
protected
virtual bool psi::FastDFJK::C1 ( ) const
inlineprotectedvirtual

Do we need to backtransform to C1 under the hood?

Implements psi::JK.

void psi::FastDFJK::common_init ( void  )
protected

Common initialization.

void psi::FastDFJK::compute_JK ( )
protectedvirtual

Compute J/K for current C/D.

Implements psi::JK.

void psi::FastDFJK::postiterations ( )
protectedvirtual

Delete integrals, files, etc.

Implements psi::JK.

void psi::FastDFJK::preiterations ( )
protectedvirtual

Setup integrals, files, etc.

Implements psi::JK.

void psi::FastDFJK::print_header ( ) const
virtual

Print header information regarding JK type on output file

Implements psi::JK.

void psi::FastDFJK::set_condition ( double  condition)
inline

Minimum relative eigenvalue to retain in fitting inverse All eigenvectors with < condition * will be discarded

Parameters
conditionminimum relative eigenvalue allowed, defaults to 1.0E-12
void psi::FastDFJK::set_df_bump_R0 ( double  R0)
inline

Bump function R0 parameter in a.u. (should be <= R1)

Parameters
R0defaults to 0.0
void psi::FastDFJK::set_df_bump_R1 ( double  R1)
inline

Bump function R1 parameter in a.u. (should be <= R1)

Parameters
R1defaults to 0.0
void psi::FastDFJK::set_df_domains ( const std::string  domains)
inline

Fitting domain selection algorithm

Parameters
domainsDIATOMIC, SPHERES defaults to DIATOMIC
void psi::FastDFJK::set_df_ints_io ( const std::string &  val)
inline

What action to take for caching three-index integrals

Parameters
valOne of NONE, LOAD, or SAVE
void psi::FastDFJK::set_df_ints_num_threads ( int  val)
inline

What number of threads to compute integrals on

Parameters
vala positive integer
void psi::FastDFJK::set_df_metric ( const std::string &  metric)
inline

Metric for FastDF fitting

Parameters
metricCOULOMB or EWALD, defaults to COULOMB
void psi::FastDFJK::set_df_theta ( double  theta)
inline

Range-Separation parameter for EWALD metric fitting

Parameters
thetatheta ~ 0 is COULOMB, theta ~ INF is OVERLAP, defaults to 1.0
void psi::FastDFJK::set_unit ( unsigned int  unit)
inline

Which file number should the (Q|mn) integrals go in

Parameters
unitUnit number

Member Data Documentation

std::vector<std::pair<int, int> > psi::FastDFJK::atom_pairs_
protected

Significant atom pairs (reduced triangular indexing A >= B)

std::shared_ptr<BasisSet> psi::FastDFJK::auxiliary_
protected

Auxiliary basis set.

std::vector<std::vector<int> > psi::FastDFJK::auxiliary_atoms_
protected

Auxiliary basis centers for each atom pair.

std::vector<std::shared_ptr<Matrix> > psi::FastDFJK::Bpq_
protected

Three-index tensors (pq|A)(A|B)^-1 for each atom pair.

std::vector<std::vector<double> > psi::FastDFJK::bump_atoms_
protected

Modified MHG bump function, by atom pair and auxiliary basis center.

double psi::FastDFJK::bump_R0_
protected

Flat radius in MHG bump function.

double psi::FastDFJK::bump_R1_
protected

Annihilation radius in MHG bump function.

double psi::FastDFJK::condition_
protected

Condition cutoff in fitting metric, defaults to 1.0E-12.

std::string psi::FastDFJK::df_ints_io_
protected

Cache action for three-index integrals.

int psi::FastDFJK::df_ints_num_threads_
protected

Number of threads for DF integrals.

std::string psi::FastDFJK::domains_
protected

Geometric atom domain selection algorithm.

bool psi::FastDFJK::is_core_
protected

Core or disk?

std::string psi::FastDFJK::metric_
protected

Fitting metric (COULOMB or EWALD) [EWALD is SR].

std::shared_ptr<PSIO> psi::FastDFJK::psio_
protected

PSIO object.

std::vector<std::vector<std::pair<int, int> > > psi::FastDFJK::shell_pairs_
protected

Significant shell pairs (reduced triangular indexing P >= Q)

std::shared_ptr<ERISieve> psi::FastDFJK::sieve_
protected

Sieve, must be static throughout the life of the object.

double psi::FastDFJK::theta_
protected

Ewald metric range parameter.

unsigned int psi::FastDFJK::unit_
protected

File number for (Q|mn) tensor.

std::shared_ptr<Matrix> psi::FastDFJK::Z_
protected

The DF Z operator.

std::shared_ptr<Matrix> psi::FastDFJK::Z_LR_
protected

The DF long-range Z operator.


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