ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
TwoCenterIntegrator Class Reference

A class to compute two-center integrals. More...

#include <two_center_integrator.h>

Collaboration diagram for TwoCenterIntegrator:

Public Member Functions

 TwoCenterIntegrator ()
 TwoCenterIntegrator (const TwoCenterIntegrator &)=delete
TwoCenterIntegrator & operator= (const TwoCenterIntegrator &)=delete
 ~TwoCenterIntegrator ()
void tabulate (const RadialCollection &bra, const RadialCollection &ket, const char op, const int nr, const double cutoff)
 Tabulates the radial part of a two-center integral.
void calculate (const int itype1, const int l1, const int izeta1, const int m1, const int itype2, const int l2, const int izeta2, const int m2, const ModuleBase::Vector3< double > &vR, double *out=nullptr, double *grad_out=nullptr, double *hess_out=nullptr) const
 Compute the two-center integrals and optionally their derivatives.
void snap (const int itype1, const int l1, const int izeta1, const int m1, const int itype2, const ModuleBase::Vector3< double > &vR, const bool deriv, std::vector< std::vector< double > > &out) const
 Compute a batch of two-center integrals.
size_t table_memory () const
 Returns the amount of heap memory used by table_ (in bytes).

Private Member Functions

int ylm_index (const int l, const int m) const
 Returns the index of (l,m) in the array of spherical harmonics.

Private Attributes

bool is_tabulated_
char op_
TwoCenterTable table_

Detailed Description

A class to compute two-center integrals.

This class computes two-center integrals

                /    
         I(R) = | dr phi1(r) (op) phi2(r - R)
                /               

as well as their gradients, where op is 1 (overlap) or minus Laplacian (kinetic), and phi1, phi2 are "atomic-orbital-like" functions of the form

         phi(r) = chi(|r|) * Ylm(r/|r|)

where chi is some numerical radial function and Ylm is some real spherical harmonics.

This class is designed to efficiently compute the two-center integrals between two "collections" of the above functions with various R, e.g., the overlap integrals between all numerical atomic orbitals and all Kleinman-Bylander nonlocal projectors, the overlap & kinetic integrals between all numerical atomic orbitals, etc. This is done by tabulating the radial part of the integrals on an r-space grid and the real Gaunt coefficients in advance.

See the developer's document for more details.

Constructor & Destructor Documentation

◆ TwoCenterIntegrator() [1/2]

TwoCenterIntegrator::TwoCenterIntegrator ( )
Here is the caller graph for this function:

◆ TwoCenterIntegrator() [2/2]

TwoCenterIntegrator::TwoCenterIntegrator ( const TwoCenterIntegrator & )
delete
Here is the call graph for this function:

◆ ~TwoCenterIntegrator()

TwoCenterIntegrator::~TwoCenterIntegrator ( )
inline

Member Function Documentation

◆ calculate()

void TwoCenterIntegrator::calculate ( const int itype1,
const int l1,
const int izeta1,
const int m1,
const int itype2,
const int l2,
const int izeta2,
const int m2,
const ModuleBase::Vector3< double > & vR,
double * out = nullptr,
double * grad_out = nullptr,
double * hess_out = nullptr ) const

Compute the two-center integrals and optionally their derivatives.

This function calculates the two-center integral

                /
         I(R) = | dr phi1(r) (op_) phi2(r - R)
                /

and optionally its gradient and/or Hessian.

Parameters
[in]itype1Element index of orbital 1.
[in]l1Angular momentum of orbital 1.
[in]izeta1Zeta number of orbital 1.
[in]m1Magnetic quantum number of orbital 1.
[in]itype2Element index of orbital 2.
[in]l2Angular momentum of orbital 2.
[in]izeta2Zeta number of orbital 2.
[in]m2Magnetic quantum number of orbital 2.
[in]vRR2 - R1.
[out]outTwo-center integral. The integral will not be computed if out is nullptr.
[out]grad_outGradient of the integral. grad_out[0], grad_out[1] and grad_out[2] are the x, y, z components of the gradient. The gradient will not be computed if grad_out is nullptr.
[out]hess_outHessian of the integral. hess_out is a 9-element array in row-major order: [H_xx, H_xy, H_xz, H_yx, H_yy, H_yz, H_zx, H_zy, H_zz]. The Hessian will not be computed if hess_out is nullptr.
Note
At least one of out, grad_out, or hess_out must be non-nullptr.
Hessian computation requires l1 + l2 <= 6 (limitation of hes_rl_sph_harm).
Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator=()

TwoCenterIntegrator & TwoCenterIntegrator::operator= ( const TwoCenterIntegrator & )
delete
Here is the call graph for this function:

◆ snap()

void TwoCenterIntegrator::snap ( const int itype1,
const int l1,
const int izeta1,
const int m1,
const int itype2,
const ModuleBase::Vector3< double > & vR,
const bool deriv,
std::vector< std::vector< double > > & out ) const

Compute a batch of two-center integrals.

This function calculates the two-center integrals (and optionally their gradients) between one orbital and all orbitals of a certain type from the other collection.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ table_memory()

size_t TwoCenterIntegrator::table_memory ( ) const
inline

Returns the amount of heap memory used by table_ (in bytes).

◆ tabulate()

void TwoCenterIntegrator::tabulate ( const RadialCollection & bra,
const RadialCollection & ket,
const char op,
const int nr,
const double cutoff )

Tabulates the radial part of a two-center integral.

Parameters
[in]braThe radial functions of the first collection.
[in]ketThe radial functions of the second collection.
[in]opOperator, could be 'S' or 'T'.
[in]nrNumber of r-space grid points.
[in]cutoffr-space cutoff radius.
Here is the call graph for this function:

◆ ylm_index()

int TwoCenterIntegrator::ylm_index ( const int l,
const int m ) const
private

Returns the index of (l,m) in the array of spherical harmonics.

Spherical harmonics in ABACUS are stored in the following order:

index 0 1 2 3 4 5 6 7 8 9 10 11 12 ... l 0 1 1 1 2 2 2 2 2 3 3 3 3 ... m 0 0 1 -1 0 1 -1 2 -2 0 1 -1 2 ...

Here is the caller graph for this function:

Member Data Documentation

◆ is_tabulated_

bool TwoCenterIntegrator::is_tabulated_
private

◆ op_

char TwoCenterIntegrator::op_
private

◆ table_

TwoCenterTable TwoCenterIntegrator::table_
private

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