mpqc::pbc::detail Namespace Reference

Classes

class  BasisPairInfo
 Class to hold information for basis shell pairs, including total number of shell pairs, extents (radii) and centers of shell pairs, etc. More...
 

Functions

template<typename Tile , typename Policy >
TA::DistArray< Tile, Policy > reduced_size_array (TA::DistArray< Tile, Policy > const &arg_array, Vector3i const &arg_range, Vector3i const &result_range)
 This reduces the lattice range of a rank-2 array whose row index is orbital basis in the reference unit cell and column index is orbital basis in a range of unit cells. More...
 
template<typename Tile , typename Policy >
TA::DistArray< Tile, Policy > enlarged_size_array (TA::DistArray< Tile, Policy > const &arg_array, Vector3i const &arg_range, Vector3i const &result_range)
 This enlarges the lattice range of a rank-2 array whose row index is orbital basis in the reference unit cell and column index is orbital basis in a range of unit cells. More...
 
template<typename Tile , typename Policy >
double dot_product (TA::DistArray< Tile, Policy > const &L, TA::DistArray< Tile, Policy > const &R, Vector3i const &L_range, Vector3i const &R_range)
 This performs dot product of two matrices. The left and right matrices may have different # of columns due to different lattice ranges. More...
 
template<typename Tile , typename Policy >
TA::DistArray< Tile, Policy > add (TA::DistArray< Tile, Policy > const &L, TA::DistArray< Tile, Policy > const &R, Vector3i const &L_range, Vector3i const &R_range, const double preL=1.0, const double preR=1.0)
 This performs addition of two matrices. The left and right matrices may have different # of columns due to different lattice ranges. More...
 
template<typename Tile , typename Policy >
void print_norms_by_unit_cell (TA::DistArray< Tile, Policy > const &M_array, Vector3i const &max_lattice_range, std::string const &name)
 This prints by-unit-cell Frobenius norms and Infinity norms of a matrix M(μ_0, ν_R). More...
 
template<typename Tile , typename Policy >
TA::expressions::BlkTsrExpr< TA::DistArray< Tile, Policy >, true > view_array_at_k (TA::DistArray< Tile, Policy > &M, const size_t k_ord, const Vector3i &nk)
 view of a matrix in a k-point pack of matrices More...
 
template<typename Tile , typename Policy >
TA::DistArray< Tile, Policy > slice_array_at_k (TA::DistArray< Tile, Policy > &M, const size_t k_ord, const Vector3i &nk)
 extract a matrix in a k-point pack of matrices More...
 
template<typename Tile , typename Policy >
Vector3i truncate_lattice_range (const TA::DistArray< Tile, Policy > &D, const Vector3i &RD_max, const double threshold)
 This truncates lattice range of an array D(μ, ν_R). If norms of all tiles within a unit cell are below threshold, this unit cell will be removed and the array size is shrinked. More...
 
template<typename Tile , typename Policy >
TA::DistArray< Tile, Policy > symmetrize_matrix (const TA::DistArray< Tile, Policy > &M_unsymm)
 This symmetrizes a matrix M through M(mu, nu_R) = 1/2 * ( M(mu, nu_R) + M(nu, mu_-R) ) More...
 

Function Documentation

◆ add()

template<typename Tile , typename Policy >
TA::DistArray<Tile, Policy> mpqc::pbc::detail::add ( TA::DistArray< Tile, Policy > const &  L,
TA::DistArray< Tile, Policy > const &  R,
Vector3i const &  L_range,
Vector3i const &  R_range,
const double  preL = 1.0,
const double  preR = 1.0 
)

This performs addition of two matrices. The left and right matrices may have different # of columns due to different lattice ranges.

Parameters
Lleft array
Rright array
L_rangelattice range of the left array
R_rangelattice range of the right array
Returns

◆ dot_product()

template<typename Tile , typename Policy >
double mpqc::pbc::detail::dot_product ( TA::DistArray< Tile, Policy > const &  L,
TA::DistArray< Tile, Policy > const &  R,
Vector3i const &  L_range,
Vector3i const &  R_range 
)

This performs dot product of two matrices. The left and right matrices may have different # of columns due to different lattice ranges.

Parameters
Lleft array
Rright array
L_rangelattice range of the left array
R_rangelattice range of the right array
Returns

◆ enlarged_size_array()

template<typename Tile , typename Policy >
TA::DistArray<Tile, Policy> mpqc::pbc::detail::enlarged_size_array ( TA::DistArray< Tile, Policy > const &  arg_array,
Vector3i const &  arg_range,
Vector3i const &  result_range 
)

This enlarges the lattice range of a rank-2 array whose row index is orbital basis in the reference unit cell and column index is orbital basis in a range of unit cells.

Parameters
arg_arrayargument array
arg_rangelattice range of argument array
result_rangelattice range of result array
Returns
a rank-2 array with enlarged lattice range in columns

◆ print_norms_by_unit_cell()

template<typename Tile , typename Policy >
void mpqc::pbc::detail::print_norms_by_unit_cell ( TA::DistArray< Tile, Policy > const &  M_array,
Vector3i const &  max_lattice_range,
std::string const &  name 
)

This prints by-unit-cell Frobenius norms and Infinity norms of a matrix M(μ_0, ν_R).

Parameters
M_arraya Tiled Array object
max_lattice_rangemax range of lattice vector R, indicated by the index of the farthest unit cell (x, y, z) where x, y, and z are integers
namename of the matrix

◆ reduced_size_array()

template<typename Tile , typename Policy >
TA::DistArray<Tile, Policy> mpqc::pbc::detail::reduced_size_array ( TA::DistArray< Tile, Policy > const &  arg_array,
Vector3i const &  arg_range,
Vector3i const &  result_range 
)

This reduces the lattice range of a rank-2 array whose row index is orbital basis in the reference unit cell and column index is orbital basis in a range of unit cells.

Parameters
arg_arrayargument array
arg_rangelattice range of argument array
result_rangelattice range of result array
Returns
a rank-2 array with reduced lattice range in columns

◆ slice_array_at_k()

template<typename Tile , typename Policy >
TA::DistArray<Tile, Policy> mpqc::pbc::detail::slice_array_at_k ( TA::DistArray< Tile, Policy > &  M,
const size_t  k_ord,
const Vector3i nk 
)

extract a matrix in a k-point pack of matrices

Parameters
Ma Tiled Array object M(p, {k, q})
k_ordthe ordinal number of a specific k point
nkthe total number of k points in each direction
Returns
M(p, {k=k_ord, q}) as a DistArray

◆ symmetrize_matrix()

template<typename Tile , typename Policy >
TA::DistArray<Tile, Policy> mpqc::pbc::detail::symmetrize_matrix ( const TA::DistArray< Tile, Policy > &  M_unsymm)

This symmetrizes a matrix M through M(mu, nu_R) = 1/2 * ( M(mu, nu_R) + M(nu, mu_-R) )

Template Parameters
Tile
Policy
Parameters
M_unsymman TA Array object (matrix before symmetrization)
Returns
an TA Array object (symmetrized matrix)

◆ truncate_lattice_range()

template<typename Tile , typename Policy >
Vector3i mpqc::pbc::detail::truncate_lattice_range ( const TA::DistArray< Tile, Policy > &  D,
const Vector3i RD_max,
const double  threshold 
)

This truncates lattice range of an array D(μ, ν_R). If norms of all tiles within a unit cell are below threshold, this unit cell will be removed and the array size is shrinked.

Parameters
DTiled array object
RD_maxthe original lattice range of the input array
threshold
Returns
the updated lattice range

◆ view_array_at_k()

template<typename Tile , typename Policy >
TA::expressions::BlkTsrExpr<TA::DistArray<Tile, Policy>, true> mpqc::pbc::detail::view_array_at_k ( TA::DistArray< Tile, Policy > &  M,
const size_t  k_ord,
const Vector3i nk 
)

view of a matrix in a k-point pack of matrices

From the matricized tensor M (p, {k, q}) (i.e. M is stored as a 2d array with nrows = size(obs) and ncols = size(k_points) * size(obs) this extracts a view of the matrix corresponding to k = k_ord .

Parameters
Ma Tiled Array object M(p, {k, q})
k_ordthe ordinal number of a specific k point
nkthe total number of k points in each direction
Returns
view of M(p, {k=k_ord, q}), annotated with ("p,q")