Documentation
template<typename Factory>
class mpqc::pbc::ma::MA_CFFLatticeSum< Factory >
This class computes the contribution to the Coulomb lattice sum from unit cells in Crystal Far Field (CFF) using multipole approximation.
- Template Parameters
-
Factory a periodic AO factory object; only pbc::AOFactory is supported
Classes | |
struct | LMPair |
struct | MSet |
container of values for each m for a given L More... | |
Public Types | |
using | TArray = typename Factory::TArray |
using | Tile = typename TArray::value_type |
using | Policy = typename TArray::policy_type |
using | Shell = ::mpqc::lcao::gaussian::Shell |
using | Basis = ::mpqc::lcao::gaussian::Basis |
using | Ord2lmMap = std::vector< LMPair > |
using | UnitCellList = std::vector< std::pair< Vector3i, Vector3d > > |
using | MMType = ma::MultipoleMomentsType |
template<typename T , unsigned int lmax = LMAX> | |
using | MultipoleMoments = ma::MultipoleMoments< T, MMType::o, lmax > |
template<typename T , unsigned int lmax = LMAX> | |
using | MultipoleMomentsP = ma::MultipoleMoments< T, MMType::o_plus, lmax > |
template<typename T , unsigned int lmax = LMAX> | |
using | MultipoleMomentsM = ma::MultipoleMoments< T, MMType::o_minus, lmax > |
template<typename T , unsigned int lmax = LMAX> | |
using | MultipoleMomentsPM = ma::MultipoleMoments< T, MMType::o_plusminus, lmax > |
template<typename T > | |
using | eQMoment = std::array< T, 10 > |
template<typename T , unsigned int lmax = LMAX> | |
using | Shell2KernelMap = std::vector< MultipoleMoments< double, 2 *LMAX > > |
using | shellpair_list_t = std::vector< std::vector< size_t > > |
using | result_type = std::tuple< TArray, std::optional< double > > |
Public Member Functions | |
MA_CFFLatticeSum (Factory &ao_factory, bool df=false) | |
This constructs PeriodicMA using a Factory object. More... | |
decltype(sphemm_) const & | sphemm () const |
decltype(sphemm_df_) const & | sphemm_df () const |
decltype(eQ_) const & | eQ () const |
decltype(eQ_df_) const & | eQ_df () const |
const Vector3i & | CFF_boundary () |
This returns the boundary of Crystal Far Field. More... | |
template<typename T > | |
std::tuple< MultipoleMoments< T >, std::vector< AtomBasedClusterable >, std::vector< T > > | compute_L (const MultipoleMoments< T > &O_ref, const eQMoment< T > &eQ_ref, double target_precision) |
This methods compute Coulomb interaction for the reference cell contributed from all cells in CFF using multipole approximation. Note that multipole moments will be separated into dipoles and higher-order moments for systems with large dipole moments. More... | |
result_type | compute_J (const MultipoleMoments< double > &L, const std::vector< AtomBasedClusterable > &Q_cnf, const MultipoleMoments< TArray > &O_elec) |
This methods compute (obs|obs) Coulomb matrix contribution from CFF. More... | |
result_type | compute_J_df (const MultipoleMoments< double > &L, const std::vector< AtomBasedClusterable > &Q_cnf, const MultipoleMoments< TArray > &O_elec) |
This methods compute (dfbs|1) Coulomb matrix contribution from CFF + surface CNF charges. More... | |
auto | compute_elec_multipole_moments (const TArray &D) const |
compute electronic multipole moments for the reference unit cell More... | |
auto | compute_elec_multipole_moments_df (const TArray &rho) const |
compute electronic multipole moments for the reference unit cell More... | |
bool | CFF_reached () const |
This determines whether Crystal Far Field has been reached for user-specified rjmax . More... | |
bool | CFF_reached (int dim) const |
This determines whether Crystal Far Field has been reached for user-specified rjmax for a given direction. More... | |
template<unsigned int lmax> | |
std::pair< double, MultipoleMoments< double, lmax > > | solve_multipole_approx (const MultipoleMoments< double, lmax > &Oref, const MultipoleMoments< double, lmax > &Osrc) |
This computes Coulomb interaction for the reference cell contributed from all cells in CFF. Energy contribution is computed per spherical shell from the CFF boundary to the user-given rjmax unless it is converged. More... | |
CFF lattice sums evaluators | |
These compute contribution to the Coulomb potential generated by the CFF cells (including compensating charges on CNF surfaces) in the reference cell + the energy of its interaction with the nuclei. Up to (cartesian) quadrupole moments are compensated. | |
result_type | compute_multipole_approx (const TArray &D, double target_precision) |
Computes CFF lattice sum for the given density matrix D (and nuclear charges). More... | |
result_type | compute_multipole_approx_df (const TArray &rho, double target_precision) |
Computes CFF lattice sum for the given (fitted) density rho (and nuclear charges) More... | |
result_type | compute_multipole_approx_dfrev (const TArray &D, double target_precision) |
Computes CFF lattice sum for the given (exact) density D (and nuclear charges) More... | |
Static Public Member Functions | |
static constexpr unsigned int | number_of_multipoles (unsigned int lmax) |
template<typename T > | |
static eQMoment< T > | plus (const eQMoment< T > &eQ1, const eQMoment< T > &eQ2) |
Static Public Attributes | |
static constexpr const libint2::Operator | Oper |
static constexpr const unsigned int | LMAX = MULTIPOLE_MAX_ORDER |
static constexpr const unsigned int | NUMBER_OF_MULTIPOLES |
Member Typedef Documentation
◆ Basis
using mpqc::pbc::ma::MA_CFFLatticeSum< Factory >::Basis = ::mpqc::lcao::gaussian::Basis |
◆ eQMoment
using mpqc::pbc::ma::MA_CFFLatticeSum< Factory >::eQMoment = std::array<T, 10> |
◆ MMType
using mpqc::pbc::ma::MA_CFFLatticeSum< Factory >::MMType = ma::MultipoleMomentsType |
◆ MultipoleMoments
using mpqc::pbc::ma::MA_CFFLatticeSum< Factory >::MultipoleMoments = ma::MultipoleMoments<T, MMType::o, lmax> |
◆ MultipoleMomentsM
using mpqc::pbc::ma::MA_CFFLatticeSum< Factory >::MultipoleMomentsM = ma::MultipoleMoments<T, MMType::o_minus, lmax> |
◆ MultipoleMomentsP
using mpqc::pbc::ma::MA_CFFLatticeSum< Factory >::MultipoleMomentsP = ma::MultipoleMoments<T, MMType::o_plus, lmax> |
◆ MultipoleMomentsPM
using mpqc::pbc::ma::MA_CFFLatticeSum< Factory >::MultipoleMomentsPM = ma::MultipoleMoments<T, MMType::o_plusminus, lmax> |
◆ Ord2lmMap
using mpqc::pbc::ma::MA_CFFLatticeSum< Factory >::Ord2lmMap = std::vector<LMPair> |
◆ Policy
using mpqc::pbc::ma::MA_CFFLatticeSum< Factory >::Policy = typename TArray::policy_type |
◆ result_type
using mpqc::pbc::ma::MA_CFFLatticeSum< Factory >::result_type = std::tuple<TArray, std::optional<double> > |
◆ Shell
using mpqc::pbc::ma::MA_CFFLatticeSum< Factory >::Shell = ::mpqc::lcao::gaussian::Shell |
◆ Shell2KernelMap
using mpqc::pbc::ma::MA_CFFLatticeSum< Factory >::Shell2KernelMap = std::vector<MultipoleMoments<double, 2 * LMAX> > |
◆ shellpair_list_t
using mpqc::pbc::ma::MA_CFFLatticeSum< Factory >::shellpair_list_t = std::vector<std::vector<size_t> > |
◆ TArray
using mpqc::pbc::ma::MA_CFFLatticeSum< Factory >::TArray = typename Factory::TArray |
◆ Tile
using mpqc::pbc::ma::MA_CFFLatticeSum< Factory >::Tile = typename TArray::value_type |
◆ UnitCellList
using mpqc::pbc::ma::MA_CFFLatticeSum< Factory >::UnitCellList = std::vector<std::pair<Vector3i, Vector3d> > |
Constructor & Destructor Documentation
◆ MA_CFFLatticeSum()
|
inline |
This constructs PeriodicMA using a Factory
object.
- Parameters
-
ao_factory a Factory object e_thresh threshold of multipole expansion error ws well-separateness criterion
Member Function Documentation
◆ CFF_boundary()
|
inline |
This returns the boundary of Crystal Far Field.
◆ CFF_reached() [1/2]
|
inline |
This determines whether Crystal Far Field has been reached for user-specified rjmax
.
- Returns
- true if CFF has been reached in any direction, false otherwise
◆ CFF_reached() [2/2]
|
inline |
This determines whether Crystal Far Field has been reached for user-specified rjmax
for a given direction.
- Parameters
-
dim 0 for x direction, 1 for y direction, 2 for z direction
- Returns
- true if CFF has been reached in direction
dim
, false otherwise
◆ compute_elec_multipole_moments()
|
inline |
compute electronic multipole moments for the reference unit cell
◆ compute_elec_multipole_moments_df()
|
inline |
compute electronic multipole moments for the reference unit cell
◆ compute_J()
|
inline |
This methods compute (obs|obs) Coulomb matrix contribution from CFF.
- surface CNF charges.
- Returns
◆ compute_J_df()
|
inline |
This methods compute (dfbs|1) Coulomb matrix contribution from CFF + surface CNF charges.
- Returns
◆ compute_L()
|
inline |
This methods compute Coulomb interaction for the reference cell contributed from all cells in CFF using multipole approximation. Note that multipole moments will be separated into dipoles and higher-order moments for systems with large dipole moments.
- Returns
- {L, R_cnf, Q_cnf}, with L the CFF contribution to the multipole expansion of the coulomb potential in the reference cell, R_cnf and Q_cnf the Cartesian coordinates and charges of the CNF surface compensating charges
◆ compute_multipole_approx()
|
inline |
Computes CFF lattice sum for the given density matrix D
(and nuclear charges).
- Parameters
-
D the 1-RDM target_precision the target precision
- Returns
- {Coulomb potential matrix, energy of its interaction with the nuclei}
◆ compute_multipole_approx_df()
|
inline |
Computes CFF lattice sum for the given (fitted) density rho
(and nuclear charges)
- Parameters
-
rho the (fitted) charge density target_precision the target precision
- Returns
- {Coulomb potential matrix, energy of its interaction with the nuclei}
◆ compute_multipole_approx_dfrev()
|
inline |
Computes CFF lattice sum for the given (exact) density D
(and nuclear charges)
- Parameters
-
D the (exact) charge density target_precision the target precision
- Returns
- {Coulomb potential matrix in DF basis, energy of its interaction with the nuclei}
◆ eQ()
|
inline |
◆ eQ_df()
|
inline |
◆ number_of_multipoles()
|
inlinestaticconstexpr |
◆ plus()
|
inlinestatic |
◆ solve_multipole_approx()
|
inline |
This computes Coulomb interaction for the reference cell contributed from all cells in CFF. Energy contribution is computed per spherical shell from the CFF boundary to the user-given rjmax
unless it is converged.
- Template Parameters
-
lmax nopers nopers_doubled_lmax
- Parameters
-
Oref multipole moments of the reference cell Osrc multipole moments of the cells generating the Coulomb potential
- Returns
- std::tuple containing the interaction energy of CFF with Oref and the inner multipoles of the potential in the reference cell
- Note
- this is not collective, should be executed on 1 rank and broadcast
- Warning
- this is not bitwise reproducibile (due to task decomposition),
◆ sphemm()
|
inline |
◆ sphemm_df()
|
inline |
Member Data Documentation
◆ LMAX
|
staticconstexpr |
◆ NUMBER_OF_MULTIPOLES
|
staticconstexpr |
◆ Oper
|
staticconstexpr |
The documentation for this class was generated from the following files: