mpqc::detail Namespace Reference

Classes

struct  AbsMaxCompare
 
class  AbsMaxNIndexReduction
 
class  AbsMaxNReduction
 
struct  AbsMaxPairCompare
 
struct  append_count
 transforms strings by appending string representation of an integral counter More...
 
class  Backtrace
 
class  Exception
 
class  ForceLink
 This, together with ForceLinkBase, is used to force code for particular classes to be linked into executables. More...
 
class  ForceLinkBase
 
struct  FundamentalConstants
 
struct  has_provider
 has_provider<T>::value is true if T::Provider is a valid type More...
 
struct  identity
 provides identity transform for strings More...
 
struct  init_list_ctor
 class to help make_shared_from_list work More...
 
struct  init_list_ctor< Molecule >
 
struct  is_const_iterator_range
 
struct  conditional_t< false, is_const_iterator_range_helper< decltype(cbegin(std::declval< const T & >())), decltype(cend(std::declval< const T & >())) >, void >>
 
struct  is_const_iterator_range_helper
 
struct  make_list_error
 
class  MaxNIndexReduction
 
class  MaxNReduction
 
struct  MaxPairCompare
 
struct  PairApproxUnique
 
struct  ProviderBase
 utility class to support runtime casting to property providers More...
 
struct  register_keyval_ctor
 
struct  scalar_type
 
struct  scalar_type< double >
 
struct  scalar_type< float >
 
struct  scalar_type< std::complex< T > >
 
struct  ShapeTracker
 
class  SubTreeKeyVal
 
class  virt_base_of_enable_shared_from_this
 helper class for mpqc::enable_shared_from_this More...
 

Typedefs

using MatrixI = Eigen::Matrix< int, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor >
 
template<typename T >
using scalar_t = typename scalar_type< T >::type
 

Functions

std::string Z_to_element (int64_t Z)
 
int64_t element_to_Z (const std::string &symbol)
 
int64_t direct_ord_idx (Vector3i const &in_3D_idx, Vector3i const &lattice_max)
 This takes the 3D index of a direct lattice and returns the corresponding ordinal index. More...
 
int64_t direct_ord_idx (int64_t x, int64_t y, int64_t z, Vector3i const &lattice_max)
 This takes the 3D index of a direct lattice and returns the corresponding ordinal index. More...
 
int64_t k_ord_idx (Vector3i const &in_3D_idx, Vector3i const &nk)
 This takes the 3D index of a reciprocal lattice and returns the corresponding ordinal index. More...
 
int64_t k_ord_idx (int64_t x, int64_t y, int64_t z, Vector3i const &nk)
 This takes the 3D index of a reciprocal lattice and returns the corresponding ordinal index. More...
 
Vector3i direct_3D_idx (const int64_t ord_idx, Vector3i const &lattice_max)
 This takes the ordinal index of a direct lattice and returns the corresponding 3D index. More...
 
Vector3i k_3D_idx (const int64_t ord_idx, Vector3i const &nk)
 This takes the ordinal index of a reciprocal lattice and returns the corresponding 3D index. More...
 
bool is_in_lattice_range (Vector3i const &in_idx, Vector3i const &range, Vector3i const &center)
 This determines if a unit cell is included by the give lattice range. More...
 
Vector3d lattice_vector (Vector3i const &n, const UnitCell &unitcell)
 This converts a point in a lattice and returns its coordinates in the lab frame. More...
 
Vector3d lattice_vector (Supercell::Point const &pt, const UnitCell &unitcell)
 This converts a point in a lattice and returns its coordinates in the lab frame. More...
 
Vector3d lattice_vector (Supercell::const_iterator const &supercell_iterator, const UnitCell &unitcell)
 This converts a point in a supercell of a lattice and returns its coordinates in the lab frame. More...
 
unsigned int lattice_ndim (const Vector3i &lattice_range)
 
template<typename ABCRange >
std::shared_ptr< std::remove_reference_t< ABCRange > > shift_atom_based_clusterables (ABCRange &&range_of_atom_based_clusterables, Vector3d const &shift)
 This shifts the position of range of atom-based clusterables. More...
 
void swap (Formula &formula)
 swap bra with ket More...
 
void swap_internal (Formula &formula, bool right_size=true)
 swap inside bra or ket More...
 
void swap_external (Formula &formula, bool right_size=true)
 swap between bra and ket More...
 
std::vector< Formulapermutations_chemical (const Formula &formula)
 return unique permutation of ( p q | r s ) More...
 
std::vector< Formulapermutations_physical (const Formula &formula)
 return unique permutation of < p q | r s > More...
 
void sort_eigen (VectorZ &eigVal, MatrixZ &eigVec)
 This sorts eigenvalues and eigenvectors in ascending order of the real parts of eigenvalues. More...
 
template<typename Numeric >
Numeric canonical_phase_inverse (const Numeric &value)
 
template<typename _Numeric , int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols>
auto canonical_column_phase (Eigen::Matrix< _Numeric, _Rows, _Cols, _Options, _MaxRows, _MaxCols > &matrix, std::vector< Eigen::Index > *pd_element_rowidx_ptr=nullptr, scalar_t< _Numeric > comparison_tolerance=std::numeric_limits< scalar_t< _Numeric >>::epsilon())
 Canonicalizes column phases. More...
 
template<typename _Scalar , int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols>
auto format_commainit (const Eigen::Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > &matrix, int precision=-1, bool align_cols=true)
 
template<typename _Scalar , int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols>
void write_commainit (std::ostream &os, const Eigen::Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > &matrix, const std::string name="matrix", int precision=-1, bool align_cols=true)
 
template<typename _Scalar , int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols>
auto format_cpp (const Eigen::Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > &matrix)
 
std::size_t average_blocksize (TA::TiledRange1 tr1)
 
std::pair< std::size_t, std::size_t > minmax_blocksize (TiledArray::TiledRange1 tr1)
 
template<typename Tile , std::enable_if_t< TA::detail::is_contiguous_tensor_v< Tile >> * = nullptr>
unsigned long tile_clr_storage (Tile const &)
 
template<typename TileType , typename Policy >
std::array< double, 3 > array_storage (TA::DistArrayVector< TileType, Policy > const &A)
 
template<typename TileType , typename Policy >
std::array< double, 3 > array_storage (TA::DistArray< TileType, Policy > const &A)
 
template<typename Tile , typename Policy , typename = typename std::enable_if< TA::detail::is_numeric<typename Tile::value_type>::value>::type>
std::vector< std::size_t > array_rank_sizes (const TA::DistArray< Tile, Policy > &A)
 reports array size (in bytes) on each process More...
 
template<typename Tile , typename Policy >
double array_size (const TA::DistArray< Tile, Policy > &A)
 reports the total size of an array's tiles (in gigabytes) More...
 
template<typename Tile , typename Policy >
double array_size (const std::vector< TA::DistArray< Tile, Policy >> &As)
 reports the total size of an array set's tiles (in gigabytes) More...
 
template<typename Array >
void print_size_info (Array const &A, std::string const &name)
 
template<typename T , int Row>
void write_eigen_mat_to_csv (Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic, Row > const &mat, std::string const &file_name)
 
template<typename Array >
void write_array_to_csv (Array const &A, std::string const &file_name)
 Writes a DistArray in a matricized form to a csv file. More...
 
void print_range_info (const TA::TiledRange1 &bs_range, const std::string &name)
 
template<typename Tile , typename Policy >
TA::TiledRange fuse_tranges (const std::vector< TA::DistArray< Tile, Policy >> &arrays)
 
template<typename Tile >
TA::DenseShape fuse_shapes (const std::vector< TA::DistArray< Tile, TA::DensePolicy >> &arrays, const TA::TiledRange &trange)
 
template<typename Tile >
TA::SparseShape< float > fuse_shapes (const std::vector< TA::DistArray< Tile, TA::SparsePolicy >> &arrays, const TA::TiledRange &trange)
 
template<typename Tile >
TA::DenseShape split_fused_shape (const TA::DistArray< Tile, TA::DensePolicy > &fused_array, const std::size_t i, const TA::TiledRange &split_trange)
 
template<typename Tile >
TA::SparseShape< float > split_fused_shape (const TA::DistArray< Tile, TA::SparsePolicy > &fused_array, const std::size_t i, const TA::TiledRange &split_trange)
 
template<typename T >
void write_tensor_to_csv (TiledArray::Tensor< T > const &t, std::ofstream &file, typename TiledArray::Tensor< T >::scalar_type threshold=std::numeric_limits< typename TiledArray::Tensor< T >::scalar_type >::epsilon(), const TiledArray::Permutation &perm={})
 
void write_array_to_csv (TiledArray::DistArray< TiledArray::Tensor< double >, TiledArray::SparsePolicy > const &A, std::string const &output_file_name)
 
template<typename T , typename P >
void write_shape_to_csv (TiledArray::DistArrayVector< T, P > const &A, std::string const &output_file_name, const TiledArray::Permutation &perm={})
 
template<typename T , typename P >
void write_shape_to_csv (TiledArray::DistArray< T, P > const &A, std::string const &output_file_name, const TiledArray::Permutation &perm={})
 
template<typename Iterator , typename V >
void emplace_at (Iterator begin, std::size_t pos, V &&value)
 
template<typename T , typename V >
void emplace_at (TA::container::svector< std::pair< std::size_t, T >> &vector, std::size_t pos, V &&value)
 
template<std::size_t R>
constexpr std::array< char, R+1 > make_opstr (const char S)
 
std::unique_ptr< char[]> clone (const char *str) noexcept
 
std::unique_ptr< char[]> clone (const std::unique_ptr< char[]> &str)
 
template<class T >
void hash_combine (std::size_t &seed, const T &value)
 
template<class It >
std::size_t hash_range (It first, It last)
 
std::string dump (const KeyVal &kv)
 creates a string representation of a KeyVal object useful for debugging More...
 
template<typename T >
const char * guid ()
 
template<typename KV >
KV kv_append (KV &&kv)
 
template<typename KV , typename Key , typename Value , typename... RestOfArgs>
KV kv_append (KV &&kv, Key &&key, Value &&value, RestOfArgs &&... rest_of_args)
 
template<typename T , typename... Args>
get_list_t (int, std::initializer_list< T >)
 
template<typename... Args>
make_list_error get_list_t (short, make_list_error)
 
template<typename T >
T * to_pointer (T *obj)
 
template<typename T >
auto to_pointer (T &obj) -> std::enable_if_t< utility::meta::is_shared_ptr< typename std::decay< T >::type >::value, decltype(obj.get())>
 
template<typename T >
std::enable_if_t< !utility::meta::is_shared_ptr< typename std::decay< T >::type >::value, typename std::decay< T >::type * > to_pointer (T &obj)
 
template<typename T >
std::string description (T *obj_ptr)
 obtains a description of the object pointer to by obj_ptr More...
 

Variables

constexpr bool keep_H_computation_statistics = false
 
size_t num_generated_replacements = 0
 
size_t num_used_replacements = 0
 
constexpr auto always_true = [](const auto& any) { return true; }
 

Typedef Documentation

◆ MatrixI

using mpqc::detail::MatrixI = typedef Eigen::Matrix<int, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor>

◆ scalar_t

template<typename T >
using mpqc::detail::scalar_t = typedef typename scalar_type<T>::type

Function Documentation

◆ array_rank_sizes()

template<typename Tile , typename Policy , typename = typename std::enable_if< TA::detail::is_numeric<typename Tile::value_type>::value>::type>
std::vector<std::size_t> mpqc::detail::array_rank_sizes ( const TA::DistArray< Tile, Policy > &  A)

reports array size (in bytes) on each process

Note
this is a collective operation
Returns
vector of integers, each element is the aggregate size of array's tiles on the corresponding process

◆ array_size() [1/2]

template<typename Tile , typename Policy >
double mpqc::detail::array_size ( const std::vector< TA::DistArray< Tile, Policy >> &  As)

reports the total size of an array set's tiles (in gigabytes)

Note
this is a collective operation
Returns
the aggregate size of array's tiles in gigabytes

◆ array_size() [2/2]

template<typename Tile , typename Policy >
double mpqc::detail::array_size ( const TA::DistArray< Tile, Policy > &  A)

reports the total size of an array's tiles (in gigabytes)

Note
this is a collective operation
Returns
the aggregate size of array's tiles in gigabytes

◆ array_storage() [1/2]

template<typename TileType , typename Policy >
std::array<double, 3> mpqc::detail::array_storage ( TA::DistArray< TileType, Policy > const &  A)

◆ array_storage() [2/2]

template<typename TileType , typename Policy >
std::array<double, 3> mpqc::detail::array_storage ( TA::DistArrayVector< TileType, Policy > const &  A)

◆ average_blocksize()

std::size_t mpqc::detail::average_blocksize ( TA::TiledRange1  tr1)

◆ canonical_column_phase()

template<typename _Numeric , int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols>
auto mpqc::detail::canonical_column_phase ( Eigen::Matrix< _Numeric, _Rows, _Cols, _Options, _MaxRows, _MaxCols > &  matrix,
std::vector< Eigen::Index > *  pd_element_rowidx_ptr = nullptr,
scalar_t< _Numeric >  comparison_tolerance = std::numeric_limits<scalar_t<_Numeric>>::epsilon() 
)

Canonicalizes column phases.

A column has canonical phase if the phase-defining element (see pd_element_rowidx ) in each column is a positive real number.

See also
canonical_phase_inverse
Template Parameters
_Numeric
_Rows
_Cols
_Options
_MaxRows
_MaxCols
Parameters
[in,out]matrixan Eigen::Matrix object whose columns has canonical phase upon return
[in,out]pd_element_rowidxpointer to the vector containing the row index of the phase-defining element for each column; if not given (nullptr), the largest (by absolute magnitude) element in each column will be used as the PD element; if not nullptr but empty, on return will contain the PD elements
[in]comparison_toleranceif pd_element_rowidx is not given, this will be used to detect the largest elements in each column; values $ a,b $ are equal if $ ||a|-|b||/(|a|+|b|) \leq \epsilon $ where $ \epsilon $ is comparison_tolerance

◆ canonical_phase_inverse()

template<typename Numeric >
Numeric mpqc::detail::canonical_phase_inverse ( const Numeric &  value)
Returns
the phase by which @value needs to be multiplied to become positive real number

◆ clone() [1/2]

std::unique_ptr<char[]> mpqc::detail::clone ( const char *  str)
noexcept

◆ clone() [2/2]

std::unique_ptr<char[]> mpqc::detail::clone ( const std::unique_ptr< char[]> &  str)

◆ description()

template<typename T >
std::string mpqc::detail::description ( T *  obj_ptr)

obtains a description of the object pointer to by obj_ptr

◆ direct_3D_idx()

Vector3i mpqc::detail::direct_3D_idx ( const int64_t  ord_idx,
Vector3i const &  lattice_max 
)

This takes the ordinal index of a direct lattice and returns the corresponding 3D index.

Parameters
ord_idxthe ordinal index in direct space
lattice_maxthe range of included lattices
Returns
3D index in direct space

◆ direct_ord_idx() [1/2]

int64_t mpqc::detail::direct_ord_idx ( int64_t  x,
int64_t  y,
int64_t  z,
Vector3i const &  lattice_max 
)

This takes the 3D index of a direct lattice and returns the corresponding ordinal index.

Parameters
xthe direct lattice index on x axis
ythe direct lattice index on y axis
zthe direct lattice index on z axis
lattice_maxthe range of included lattices
Returns
the ordinal index in direct space

◆ direct_ord_idx() [2/2]

int64_t mpqc::detail::direct_ord_idx ( Vector3i const &  in_3D_idx,
Vector3i const &  lattice_max 
)

This takes the 3D index of a direct lattice and returns the corresponding ordinal index.

Parameters
in_3D_idxinput 3D index
lattice_maxthe range of included lattices
Returns
the ordinal index in direct space

◆ dump()

std::string mpqc::detail::dump ( const KeyVal kv)

creates a string representation of a KeyVal object useful for debugging

Parameters
[in]kva KeyVal object
Returns
a std::string containing the string representation of the current kv

◆ element_to_Z()

int64_t mpqc::detail::element_to_Z ( const std::string &  symbol)

◆ emplace_at() [1/2]

template<typename Iterator , typename V >
void mpqc::detail::emplace_at ( Iterator  begin,
std::size_t  pos,
V &&  value 
)

◆ emplace_at() [2/2]

template<typename T , typename V >
void mpqc::detail::emplace_at ( TA::container::svector< std::pair< std::size_t, T >> &  vector,
std::size_t  pos,
V &&  value 
)

◆ format_commainit()

template<typename _Scalar , int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols>
auto mpqc::detail::format_commainit ( const Eigen::Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > &  matrix,
int  precision = -1,
bool  align_cols = true 
)

Creates an Eigen::IOFormat object for printing Eigen matrices in format understood by comma initialization operator.

Parameters
[in]matrixan Eigen::Matrix object
[in]precisionnumber of digits to print; default (-1) is to use full precision
[in]align_colsa flag that controls whether columns are aligned
Returns
an Eigen::IOFormat object; to use a format object fmt to print matrix M do
std::cout << M.format(fmt) << std::endl;
See also
mpqc::detail::write_commainit
Note
Eigen::IOFormat is described at https://eigen.tuxfamily.org/dox/structEigen_1_1IOFormat.html
comma initialization is described at https://eigen.tuxfamily.org/dox/group__TutorialAdvancedInitialization.html

◆ format_cpp()

template<typename _Scalar , int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols>
auto mpqc::detail::format_cpp ( const Eigen::Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > &  matrix)

Creates an Eigen::IOFormat object for printing Eigen matrices in format useful for static initialization of C++ multidimentional arrays.

Parameters
[in]matrixan Eigen::Matrix object
Returns
an Eigen::IOFormat object; to use a format object fmt to print matrix M do
std::cout << M.format(fmt) << std::endl;
Note
Eigen::IOFormat is described at https://eigen.tuxfamily.org/dox/structEigen_1_1IOFormat.html

◆ fuse_shapes() [1/2]

template<typename Tile >
TA::DenseShape mpqc::detail::fuse_shapes ( const std::vector< TA::DistArray< Tile, TA::DensePolicy >> &  arrays,
const TA::TiledRange &  trange 
)

fuse the Shapes of a vector of Arrays into 1 Shape

Parameters
arraysa vector of DistArray with the same TiledRanges
trangethe TiledRange of fused Array object

◆ fuse_shapes() [2/2]

template<typename Tile >
TA::SparseShape<float> mpqc::detail::fuse_shapes ( const std::vector< TA::DistArray< Tile, TA::SparsePolicy >> &  arrays,
const TA::TiledRange &  trange 
)

fuse the Shapes of a vector of Arrays into 1 Shape

Parameters
arraysa vector of DistArray with the same TiledRanges
trangethe TiledRange of fused Array object

◆ fuse_tranges()

template<typename Tile , typename Policy >
TA::TiledRange mpqc::detail::fuse_tranges ( const std::vector< TA::DistArray< Tile, Policy >> &  arrays)

fuse the TRanges of a vector of Arrays into 1 Tranges the new dimension will be the leading dimension, and will be blocked by 1 all the arrays must have the same TiledRange object

make the new TiledRange1 for new dimension

make the new range for N+1 Array

◆ get_list_t() [1/2]

template<typename T , typename... Args>
T mpqc::detail::get_list_t ( int  ,
std::initializer_list< T >   
)

◆ get_list_t() [2/2]

template<typename... Args>
make_list_error mpqc::detail::get_list_t ( short  ,
make_list_error   
)

◆ guid()

template<typename T >
const char* mpqc::detail::guid ( )

replaces boost serialization GUID: there is no default implementation of guid() to avoid the issues with the primary template getting picked up due to incorrect ordering of specialization and use

◆ hash_combine()

template<class T >
void mpqc::detail::hash_combine ( std::size_t &  seed,
const T &  value 
)
inline

hashes value and folds into the current seed

Note
implements boost::hash_combine

◆ hash_range()

template<class It >
std::size_t mpqc::detail::hash_range ( It  first,
It  last 
)
inline

hashes range [first,last)

Note
implements boost::hash_range

◆ is_in_lattice_range()

bool mpqc::detail::is_in_lattice_range ( Vector3i const &  in_idx,
Vector3i const &  range,
Vector3i const &  center 
)

This determines if a unit cell is included by the give lattice range.

Parameters
in_idx3D index of a unit cell
rangelattice range
centercenter of \range
Returns

◆ k_3D_idx()

Vector3i mpqc::detail::k_3D_idx ( const int64_t  ord_idx,
Vector3i const &  nk 
)

This takes the ordinal index of a reciprocal lattice and returns the corresponding 3D index.

Parameters
ord_idxthe ordinal index in reciprocal space
nknumber of k points in each direction
Returns
the 3D index in reciprocal space

◆ k_ord_idx() [1/2]

int64_t mpqc::detail::k_ord_idx ( int64_t  x,
int64_t  y,
int64_t  z,
Vector3i const &  nk 
)

This takes the 3D index of a reciprocal lattice and returns the corresponding ordinal index.

Parameters
xthe reciprocal lattice index on x' axis
ythe reciprocal lattice index on y' axis
zthe reciprocal lattice index on z' axis
nkthe range of included k points
Returns
the ordinal index in k space

◆ k_ord_idx() [2/2]

int64_t mpqc::detail::k_ord_idx ( Vector3i const &  in_3D_idx,
Vector3i const &  nk 
)

This takes the 3D index of a reciprocal lattice and returns the corresponding ordinal index.

Parameters
in_3D_idxinput 3D index
nkthe range of included k points
Returns
the ordinal index in k space

◆ kv_append() [1/2]

template<typename KV >
KV mpqc::detail::kv_append ( KV &&  kv)
inline

◆ kv_append() [2/2]

template<typename KV , typename Key , typename Value , typename... RestOfArgs>
KV mpqc::detail::kv_append ( KV &&  kv,
Key &&  key,
Value &&  value,
RestOfArgs &&...  rest_of_args 
)
inline

◆ lattice_ndim()

unsigned int mpqc::detail::lattice_ndim ( const Vector3i lattice_range)
Returns
the number of periodic dimensions

◆ lattice_vector() [1/3]

Vector3d mpqc::detail::lattice_vector ( Supercell::const_iterator const &  supercell_iterator,
const UnitCell unitcell 
)

This converts a point in a supercell of a lattice and returns its coordinates in the lab frame.

Parameters
supercell_iteratorthe iterator of a supercell that dereferences to the point whose coordinates are to be determined
unitcellthe unit cell of the lattice
Returns
point's coordinates in the lab frame

◆ lattice_vector() [2/3]

Vector3d mpqc::detail::lattice_vector ( Supercell::Point const &  pt,
const UnitCell unitcell 
)

This converts a point in a lattice and returns its coordinates in the lab frame.

Parameters
ptpoint in a lattice
unitcellthe unit cell of the lattice
Returns
point's coordinates in the lab frame

◆ lattice_vector() [3/3]

Vector3d mpqc::detail::lattice_vector ( Vector3i const &  n,
const UnitCell unitcell 
)

This converts a point in a lattice and returns its coordinates in the lab frame.

Parameters
npoint in a lattice
unitcellthe unit cell of the lattice
Returns
point's coordinates in the lab frame

◆ make_opstr()

template<std::size_t R>
constexpr std::array<char, R + 1> mpqc::detail::make_opstr ( const char  S)
constexpr

◆ minmax_blocksize()

std::pair< std::size_t, std::size_t > mpqc::detail::minmax_blocksize ( TiledArray::TiledRange1  tr1)

◆ permutations_chemical()

std::vector< Formula > mpqc::detail::permutations_chemical ( const Formula formula)

return unique permutation of ( p q | r s )

◆ permutations_physical()

std::vector< Formula > mpqc::detail::permutations_physical ( const Formula formula)

return unique permutation of < p q | r s >

◆ print_range_info()

void mpqc::detail::print_range_info ( const TA::TiledRange1 &  bs_range,
const std::string &  name 
)
inline

◆ print_size_info()

template<typename Array >
void mpqc::detail::print_size_info ( Array const &  A,
std::string const &  name 
)

◆ shift_atom_based_clusterables()

template<typename ABCRange >
std::shared_ptr<std::remove_reference_t<ABCRange> > mpqc::detail::shift_atom_based_clusterables ( ABCRange &&  range_of_atom_based_clusterables,
Vector3d const &  shift 
)

This shifts the position of range of atom-based clusterables.

Note
All atom positions will be shifted
Template Parameters
ABCRangethe type of atom-based clusterable range
Parameters
range_of_atom_based_clusterablesa range of atom-based clusterables
shiftthe shift vector
Returns
shared pointer to the shifted range

◆ sort_eigen()

void mpqc::detail::sort_eigen ( VectorZ eigVal,
MatrixZ eigVec 
)

This sorts eigenvalues and eigenvectors in ascending order of the real parts of eigenvalues.

Parameters
[in,out]eigValthe vector of complex eigenvalues
[in,out]eigVecthe complex matrix consisting of complex eigenvectors

◆ split_fused_shape() [1/2]

template<typename Tile >
TA::DenseShape mpqc::detail::split_fused_shape ( const TA::DistArray< Tile, TA::DensePolicy > &  fused_array,
const std::size_t  i,
const TA::TiledRange &  split_trange 
)

split the ith mode of a fused Array, the leading dimension of Array must blocked by 1

Parameters
arraysa vector of DistArray with the same TiledRanges
ithe number of mode to split
trangethe TiledRange of the split Array object

◆ split_fused_shape() [2/2]

template<typename Tile >
TA::SparseShape<float> mpqc::detail::split_fused_shape ( const TA::DistArray< Tile, TA::SparsePolicy > &  fused_array,
const std::size_t  i,
const TA::TiledRange &  split_trange 
)

split the ith mode of a fused Array, the leading dimension of Array must blocked by 1

Parameters
arraysa vector of DistArray with the same TiledRanges
ithe number of mode to split
trangethe TiledRange of the split Array object

◆ swap()

void mpqc::detail::swap ( Formula formula)

swap bra with ket

◆ swap_external()

void mpqc::detail::swap_external ( Formula formula,
bool  right_size 
)

swap between bra and ket

◆ swap_internal()

void mpqc::detail::swap_internal ( Formula formula,
bool  right_size 
)

swap inside bra or ket

◆ tile_clr_storage()

template<typename Tile , std::enable_if_t< TA::detail::is_contiguous_tensor_v< Tile >> * = nullptr>
unsigned long mpqc::detail::tile_clr_storage ( Tile const &  )

◆ to_pointer() [1/3]

template<typename T >
std::enable_if_t< !utility::meta::is_shared_ptr<typename std::decay<T>::type>::value, typename std::decay<T>::type*> mpqc::detail::to_pointer ( T &  obj)

◆ to_pointer() [2/3]

template<typename T >
auto mpqc::detail::to_pointer ( T &  obj) -> std::enable_if_t< utility::meta::is_shared_ptr<typename std::decay<T>::type>::value, decltype(obj.get())>

◆ to_pointer() [3/3]

template<typename T >
T* mpqc::detail::to_pointer ( T *  obj)

to_pointer<T> converts obj to a pointer:

  • if T is a pointer type, will return obj
  • if T is a value or a reference, will take the address
  • if T is a shared_ptr, will return the corresponding raw pointer

◆ write_array_to_csv() [1/2]

template<typename Array >
void mpqc::detail::write_array_to_csv ( Array const &  A,
std::string const &  file_name 
)

Writes a DistArray in a matricized form to a csv file.

Template Parameters
Arraya TA::DistArray type
Parameters
Aan Array to be written to csv; A.trange().range() must be 2, 3, or 4
file_namea the name of the file to write A to; .csv is not prepended
Note
if A.trange().rank()==3 then the second and third modes are fused
if A.trange().rank()==4 then the first two and last two modes are fused

◆ write_array_to_csv() [2/2]

void mpqc::detail::write_array_to_csv ( TiledArray::DistArray< TiledArray::Tensor< double >, TiledArray::SparsePolicy > const &  A,
std::string const &  output_file_name 
)
inline

◆ write_commainit()

template<typename _Scalar , int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols>
void mpqc::detail::write_commainit ( std::ostream &  os,
const Eigen::Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > &  matrix,
const std::string  name = "matrix",
int  precision = -1,
bool  align_cols = true 
)

Writes an Eigen matrix to a stream in format understood by comma initialization operator.

Parameters
[in,out]osa std::ostream object reference
[in]matrixan Eigen::Matrix object
[in]namea string identifying this matrix
[in]precisionnumber of digits to print; default (-1) is to use full precision
[in]align_colsa flag that controls whether columns are aligned
Note
comma initialization is described at https://eigen.tuxfamily.org/dox/group__TutorialAdvancedInitialization.html

◆ write_eigen_mat_to_csv()

template<typename T , int Row>
void mpqc::detail::write_eigen_mat_to_csv ( Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic, Row > const &  mat,
std::string const &  file_name 
)

◆ write_shape_to_csv() [1/2]

template<typename T , typename P >
void mpqc::detail::write_shape_to_csv ( TiledArray::DistArray< T, P > const &  A,
std::string const &  output_file_name,
const TiledArray::Permutation perm = {} 
)
inline

◆ write_shape_to_csv() [2/2]

template<typename T , typename P >
void mpqc::detail::write_shape_to_csv ( TiledArray::DistArrayVector< T, P > const &  A,
std::string const &  output_file_name,
const TiledArray::Permutation perm = {} 
)
inline

◆ write_tensor_to_csv()

template<typename T >
void mpqc::detail::write_tensor_to_csv ( TiledArray::Tensor< T > const &  t,
std::ofstream &  file,
typename TiledArray::Tensor< T >::scalar_type  threshold = std::numeric_limits< typename TiledArray::Tensor<T>::scalar_type>::epsilon(),
const TiledArray::Permutation perm = {} 
)

◆ Z_to_element()

std::string mpqc::detail::Z_to_element ( int64_t  Z)

Variable Documentation

◆ always_true

constexpr auto mpqc::detail::always_true = [](const auto& any) { return true; }
constexpr

◆ keep_H_computation_statistics

constexpr bool mpqc::detail::keep_H_computation_statistics = false
inlineconstexpr

◆ num_generated_replacements

size_t mpqc::detail::num_generated_replacements = 0
inline

◆ num_used_replacements

size_t mpqc::detail::num_used_replacements = 0
inline