Psi4
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
psi::scfgrad::JKGrad Class Referenceabstract

#include <jk_grad.h>

Inheritance diagram for psi::scfgrad::JKGrad:
psi::scfgrad::DFJKGrad psi::scfgrad::DirectJKGrad

Public Member Functions

 JKGrad (int deriv, std::shared_ptr< BasisSet > primary)
 
virtual ~JKGrad ()
 
void set_Ca (SharedMatrix Ca)
 
void set_Cb (SharedMatrix Cb)
 
void set_Da (SharedMatrix Da)
 
void set_Db (SharedMatrix Db)
 
void set_Dt (SharedMatrix Dt)
 
void set_cutoff (double cutoff)
 
void set_memory (size_t memory)
 
void set_omp_num_threads (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)
 
std::map< std::string,
SharedMatrix > & 
gradients ()
 
std::map< std::string,
SharedMatrix > & 
hessians ()
 
virtual void compute_gradient ()=0
 
virtual void compute_hessian ()=0
 
virtual void print_header () const =0
 

Static Public Member Functions

static std::shared_ptr< JKGradbuild_JKGrad (int deriv, std::shared_ptr< BasisSet > primary, std::shared_ptr< BasisSet > auxiliary)
 

Protected Member Functions

void common_init ()
 

Protected Attributes

int print_
 Print flag, defaults to 1. More...
 
int debug_
 Debug flag, defaults to 0. More...
 
int bench_
 Bench flag, defaults to 0. More...
 
size_t memory_
 Memory available, in doubles, defaults to 256 MB (32 M doubles) More...
 
int omp_num_threads_
 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...
 
int deriv_
 Maximum derivative level. More...
 
std::shared_ptr< BasisSetprimary_
 
std::shared_ptr< ERISievesieve_
 Sieve, must be static throughout the life of the object. More...
 
SharedMatrix Ca_
 
SharedMatrix Cb_
 
SharedMatrix Da_
 
SharedMatrix Db_
 
SharedMatrix Dt_
 
bool do_J_
 
bool do_K_
 
bool do_wK_
 
double omega_
 
std::map< std::string,
SharedMatrix
gradients_
 
std::map< std::string,
SharedMatrix
hessians_
 

Constructor & Destructor Documentation

psi::scfgrad::JKGrad::JKGrad ( int  deriv,
std::shared_ptr< BasisSet primary 
)
psi::scfgrad::JKGrad::~JKGrad ( )
virtual

Member Function Documentation

std::shared_ptr< JKGrad > psi::scfgrad::JKGrad::build_JKGrad ( int  deriv,
std::shared_ptr< BasisSet primary,
std::shared_ptr< BasisSet auxiliary 
)
static

Static instance constructor, used to get prebuilt DFJK/DirectJK objects using knobs in options.

Parameters
optionsOptions reference, with preset parameters
Returns
abstract JK object, tuned in with preset options
void psi::scfgrad::JKGrad::common_init ( void  )
protected
virtual void psi::scfgrad::JKGrad::compute_gradient ( )
pure virtual
virtual void psi::scfgrad::JKGrad::compute_hessian ( )
pure virtual
std::map<std::string, SharedMatrix>& psi::scfgrad::JKGrad::gradients ( )
inline
std::map<std::string, SharedMatrix>& psi::scfgrad::JKGrad::hessians ( )
inline
virtual void psi::scfgrad::JKGrad::print_header ( ) const
pure virtual
void psi::scfgrad::JKGrad::set_bench ( int  bench)
inline

Bench flag (defaults to 0)

void psi::scfgrad::JKGrad::set_Ca ( SharedMatrix  Ca)
inline
void psi::scfgrad::JKGrad::set_Cb ( SharedMatrix  Cb)
inline
void psi::scfgrad::JKGrad::set_cutoff ( double  cutoff)
inline

Cutoff for individual contributions to the J/K matrices Eventually we hope to use Schwarz/MBIE/Density cutoffs, for now just Schwarz

Parameters
cutoffceiling of magnitude of elements to be ignored if possible
void psi::scfgrad::JKGrad::set_Da ( SharedMatrix  Da)
inline
void psi::scfgrad::JKGrad::set_Db ( SharedMatrix  Db)
inline
void psi::scfgrad::JKGrad::set_debug ( int  debug)
inline

Debug flag (defaults to 0)

void psi::scfgrad::JKGrad::set_do_J ( bool  do_J)
inline

Set to do J tasks

Parameters
do_Jdo J matrices or not, defaults to true
void psi::scfgrad::JKGrad::set_do_K ( bool  do_K)
inline

Set to do K tasks

Parameters
do_Kdo K matrices or not, defaults to true
void psi::scfgrad::JKGrad::set_do_wK ( bool  do_wK)
inline

Set to do wK tasks

Parameters
do_wKdo wK matrices or not, defaults to false
void psi::scfgrad::JKGrad::set_Dt ( SharedMatrix  Dt)
inline
void psi::scfgrad::JKGrad::set_memory ( size_t  memory)
inline

Maximum memory to use, in doubles (for tensor-based methods, integral generation objects typically ignore this)

Parameters
memorymaximum number of doubles to allocate
void psi::scfgrad::JKGrad::set_omega ( double  omega)
inline

Set the omega value for wK

Parameters
omegarange-separation parameter
void psi::scfgrad::JKGrad::set_omp_num_threads ( int  omp_nthread)
inline

Maximum number of OpenMP threads to use. It may be necessary to clamp this to some value smaller than the total number of cores for machines with a high core-to-memory ratio to avoid running out of memory due to integral generation objects

Parameters
omp_nthreadMaximum number of threads to use in integral generation objects (BLAS/LAPACK can still run with their original maximum number)
void psi::scfgrad::JKGrad::set_print ( int  print)
inline

Print flag (defaults to 1)

Member Data Documentation

int psi::scfgrad::JKGrad::bench_
protected

Bench flag, defaults to 0.

SharedMatrix psi::scfgrad::JKGrad::Ca_
protected
SharedMatrix psi::scfgrad::JKGrad::Cb_
protected
double psi::scfgrad::JKGrad::cutoff_
protected

Integral cutoff (defaults to 0.0)

SharedMatrix psi::scfgrad::JKGrad::Da_
protected
SharedMatrix psi::scfgrad::JKGrad::Db_
protected
int psi::scfgrad::JKGrad::debug_
protected

Debug flag, defaults to 0.

int psi::scfgrad::JKGrad::deriv_
protected

Maximum derivative level.

bool psi::scfgrad::JKGrad::do_J_
protected
bool psi::scfgrad::JKGrad::do_K_
protected
bool psi::scfgrad::JKGrad::do_wK_
protected
SharedMatrix psi::scfgrad::JKGrad::Dt_
protected
std::map<std::string, SharedMatrix> psi::scfgrad::JKGrad::gradients_
protected
std::map<std::string, SharedMatrix> psi::scfgrad::JKGrad::hessians_
protected
size_t psi::scfgrad::JKGrad::memory_
protected

Memory available, in doubles, defaults to 256 MB (32 M doubles)

double psi::scfgrad::JKGrad::omega_
protected
int psi::scfgrad::JKGrad::omp_num_threads_
protected

Number of OpenMP threads (defaults to 1 in no OpenMP, Process::environment.get_n_threads() otherwise)

std::shared_ptr<BasisSet> psi::scfgrad::JKGrad::primary_
protected
int psi::scfgrad::JKGrad::print_
protected

Print flag, defaults to 1.

std::shared_ptr<ERISieve> psi::scfgrad::JKGrad::sieve_
protected

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


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