MADNESS 0.10.1
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
madness::projector_irrep Class Reference

#include <pointgroupsymmetry.h>

Collaboration diagram for madness::projector_irrep:
Collaboration graph
[legend]

Public Member Functions

 projector_irrep ()=default
 default ctor
 
 projector_irrep (std::string pointgroup, std::string irrep="all")
 ctor takes the point group and the optionally the irrep
 
template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > create_symmetry_adapted_basis (const Function< T, NDIM > &rhs, const Function< typename Tensor< T >::scalar_type, NDIM > &metric, std::vector< std::string > &sirreps)
 create a symmetry-adapted basis from a single function
 
template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > create_symmetry_adapted_basis (const Function< T, NDIM > &rhs, std::vector< std::string > &sirreps)
 create a symmetry-adapted basis from a single function
 
std::vector< std::string > get_all_irreps () const
 
std::vector< int > get_canonical_to_irrep_map (std::vector< std::string > sirreps) const
 get a mapping canonical to irrep-sorting
 
bool get_orthonormalize_irreps () const
 get the verbosity level
 
std::string get_pointgroup () const
 get the point group name
 
charactertable get_table () const
 return the character table
 
int get_verbosity () const
 get the verbosity level
 
template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > operator() (const Function< T, NDIM > &rhs) const
 projector on a given irrep
 
template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > operator() (const std::vector< Function< T, NDIM > > &vrhs) const
 projector on a given irrep
 
template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > operator() (const std::vector< Function< T, NDIM > > &vrhs, const Function< typename Tensor< T >::scalar_type, NDIM > &metric) const
 projector on a given irrep
 
template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > operator() (const std::vector< Function< T, NDIM > > &vrhs, const Function< typename Tensor< T >::scalar_type, NDIM > &metric, std::vector< std::string > &sirreps) const
 projector on a given irrep
 
template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > operator() (const std::vector< Function< T, NDIM > > &vrhs, std::vector< std::string > &sirreps) const
 projector on a given irrep
 
void print_character_table () const
 print the character table
 
void print_info (World &world) const
 print the parameters of this projector
 
template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > project_on_irreps (const std::vector< Function< T, NDIM > > &vhrs, const std::vector< std::string > &irreps) const
 (re-)project the argument on the given irreps
 
std::vector< std::string > reduce (const std::string irrep1, const std::string irrep2) const
 reduce a product of two irreps
 
std::vector< std::string > reduce (const std::string irrep1, const std::string irrep2, const std::string irrep3) const
 reduce a product of three irreps
 
std::vector< std::string > reduce (const std::string irrep1, const std::string irrep2, const std::string irrep3, const std::string irrep4) const
 reduce a product of four irreps
 
std::vector< std::string > reduce (const std::vector< std::string > reps) const
 reduce a reducible representation
 
projector_irrepset_irrep (std::string irrep)
 set the irrep on which this projector projects
 
projector_irrepset_lindep (const double ld)
 set the linear dependency threshold
 
projector_irrepset_ordering (const std::string o)
 set the ordering after symmetrization: irreps or keep as is
 
projector_irrepset_orthonormalize_irreps (bool flag)
 get the verbosity level
 
projector_irrepset_verbosity (int v)
 set the verbosity level
 

Static Public Member Functions

template<typename R >
static std::vector< Rresort (const std::vector< int > map, const std::vector< R > &vrhs)
 given a mapping resort
 
template<typename R >
static std::vector< Rreverse_resort (const std::vector< int > map, const std::vector< R > &vrhs)
 given a mapping resort
 

Private Member Functions

template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > apply_symmetry_operators (const std::vector< Function< T, NDIM > > &vrhs, Function< typename Tensor< T >::scalar_type, NDIM > metric, std::vector< std::string > &sirreps) const
 symmetrize a vector of functions
 
const charactertable get_table (std::string pointgroup)
 return the character table according to the requested point group
 
charactertable make_c1_table () const
 
charactertable make_c2_table () const
 
charactertable make_c2h_table () const
 
charactertable make_c2v_table () const
 
charactertable make_ci_table () const
 
charactertable make_cs_table () const
 
charactertable make_d2_table () const
 
charactertable make_d2h_table () const
 
template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > sort_to_irreps (std::vector< Function< T, NDIM > > &vrhs, std::vector< std::string > &sirreps) const
 sort the functions according to their irreps
 

Private Attributes

std::string irrep_ ="all"
 choose one of the irreps or "all"
 
bool keep_ordering_ =true
 after projection: result functions being ordered according to irreps or ordering unchanged
 
double lindep_ =1.e-3
 linear dependency threshold for the orthogonalization
 
bool orthonormalize_irreps_ =true
 orthonormalize within the irreps or simply discard linear dependent vectors
 
charactertable table_
 
int verbosity_ =1
 verbosity level
 

Constructor & Destructor Documentation

◆ projector_irrep() [1/2]

madness::projector_irrep::projector_irrep ( )
default

default ctor

◆ projector_irrep() [2/2]

madness::projector_irrep::projector_irrep ( std::string  pointgroup,
std::string  irrep = "all" 
)
inline

ctor takes the point group and the optionally the irrep

References get_table(), set_irrep(), and table_.

Member Function Documentation

◆ apply_symmetry_operators()

template<typename T , std::size_t NDIM>
template std::vector< Function< double_complex, 3 > > madness::projector_irrep::apply_symmetry_operators ( const std::vector< Function< T, NDIM > > &  vrhs,
Function< typename Tensor< T >::scalar_type, NDIM metric,
std::vector< std::string > &  sirreps 
) const
private

symmetrize a vector of functions

project a number of functions on a given number of irreps linear dependencies are removed, the functions are orthonormalized vanishing input functions are mapped onto vanishing output functions with irrep "null" the number of input and output function is expected to be the same!

Parameters
[in]vrhsvector of functions to be projected on the irrep
[in]vbrabra of vrhs if applicable (if bra /= ket), may be empty
[out]sirrepvector with the irrep names corresponding to the result

References madness::_(), madness::Tensor< T >::absmax(), madness::change_tree_state(), madness::compressed, madness::copy(), madness::BaseTensor::dim(), madness::WorldGopInterface::fence(), madness::gaxpy(), madness::World::gop, madness::imag(), madness::inner(), madness::inverse(), irrep_, madness::charactertable::irreps_, keep_ordering_, lindep_, MADNESS_ASSERT, MADNESS_CHECK, MADNESS_EXCEPTION, madness::matrix_inner(), madness::charactertable::mullikan_, madness::Tensor< T >::normf(), madness::charactertable::operators_, madness::charactertable::order_, orthonormalize_irreps_, madness::print(), madness::real(), madness::rr_cholesky(), madness::charactertable::schoenflies_, madness::World::size(), sort_to_irreps(), madness::Tensor< T >::sum(), madness::syev(), table_, madness::transform(), madness::truncate(), v, and verbosity_.

Referenced by create_symmetry_adapted_basis(), create_symmetry_adapted_basis(), operator()(), operator()(), operator()(), and operator()().

◆ create_symmetry_adapted_basis() [1/2]

template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > madness::projector_irrep::create_symmetry_adapted_basis ( const Function< T, NDIM > &  rhs,
const Function< typename Tensor< T >::scalar_type, NDIM > &  metric,
std::vector< std::string > &  sirreps 
)
inline

create a symmetry-adapted basis from a single function

Returns
a vector[irreps] of a vector of functions

References apply_symmetry_operators().

Referenced by test_orthogonalization().

◆ create_symmetry_adapted_basis() [2/2]

template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > madness::projector_irrep::create_symmetry_adapted_basis ( const Function< T, NDIM > &  rhs,
std::vector< std::string > &  sirreps 
)
inline

create a symmetry-adapted basis from a single function

Returns
a vector[irreps] of a vector of functions

References apply_symmetry_operators(), and NDIM.

◆ get_all_irreps()

std::vector< std::string > madness::projector_irrep::get_all_irreps ( ) const
inline

◆ get_canonical_to_irrep_map()

std::vector< int > madness::projector_irrep::get_canonical_to_irrep_map ( std::vector< std::string >  sirreps) const
inline

get a mapping canonical to irrep-sorting

References m, madness::charactertable::mullikan_, and table_.

Referenced by sort_to_irreps().

◆ get_orthonormalize_irreps()

bool madness::projector_irrep::get_orthonormalize_irreps ( ) const
inline

get the verbosity level

References orthonormalize_irreps_.

◆ get_pointgroup()

std::string madness::projector_irrep::get_pointgroup ( ) const
inline

get the point group name

References madness::charactertable::schoenflies_, and table_.

Referenced by madness::Nemo::do_symmetry().

◆ get_table() [1/2]

charactertable madness::projector_irrep::get_table ( ) const
inline

◆ get_table() [2/2]

const charactertable madness::projector_irrep::get_table ( std::string  pointgroup)
inlineprivate

return the character table according to the requested point group

References MADNESS_EXCEPTION, make_c1_table(), make_c2_table(), make_c2h_table(), make_c2v_table(), make_ci_table(), make_cs_table(), make_d2_table(), and make_d2h_table().

◆ get_verbosity()

int madness::projector_irrep::get_verbosity ( ) const
inline

get the verbosity level

References verbosity_.

Referenced by madness::Nemo::Nemo().

◆ make_c1_table()

charactertable madness::projector_irrep::make_c1_table ( ) const
private

◆ make_c2_table()

charactertable madness::projector_irrep::make_c2_table ( ) const
private

◆ make_c2h_table()

charactertable madness::projector_irrep::make_c2h_table ( ) const
private

◆ make_c2v_table()

charactertable madness::projector_irrep::make_c2v_table ( ) const
private

◆ make_ci_table()

charactertable madness::projector_irrep::make_ci_table ( ) const
private

◆ make_cs_table()

charactertable madness::projector_irrep::make_cs_table ( ) const
private

◆ make_d2_table()

charactertable madness::projector_irrep::make_d2_table ( ) const
private

◆ make_d2h_table()

charactertable madness::projector_irrep::make_d2h_table ( ) const
private

◆ operator()() [1/5]

template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > madness::projector_irrep::operator() ( const Function< T, NDIM > &  rhs) const
inline

projector on a given irrep

Returns
a vector[irreps] of a vector of functions

References operator()().

Referenced by operator()().

◆ operator()() [2/5]

template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > madness::projector_irrep::operator() ( const std::vector< Function< T, NDIM > > &  vrhs) const
inline

projector on a given irrep

Returns
a vector[irreps] of a vector of functions

References apply_symmetry_operators(), and NDIM.

◆ operator()() [3/5]

template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > madness::projector_irrep::operator() ( const std::vector< Function< T, NDIM > > &  vrhs,
const Function< typename Tensor< T >::scalar_type, NDIM > &  metric 
) const
inline

projector on a given irrep

Returns
a vector[irreps] of a vector of functions

References apply_symmetry_operators().

◆ operator()() [4/5]

template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > madness::projector_irrep::operator() ( const std::vector< Function< T, NDIM > > &  vrhs,
const Function< typename Tensor< T >::scalar_type, NDIM > &  metric,
std::vector< std::string > &  sirreps 
) const
inline

projector on a given irrep

Returns
a vector[irreps] of a vector of functions

References apply_symmetry_operators().

◆ operator()() [5/5]

template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > madness::projector_irrep::operator() ( const std::vector< Function< T, NDIM > > &  vrhs,
std::vector< std::string > &  sirreps 
) const
inline

projector on a given irrep

Returns
a vector[irreps] of a vector of functions

References apply_symmetry_operators(), and NDIM.

◆ print_character_table()

void madness::projector_irrep::print_character_table ( ) const
inline

◆ print_info()

void madness::projector_irrep::print_info ( World world) const
inline

◆ project_on_irreps()

template<typename T , std::size_t NDIM>
template std::vector< Function< double, 3 > > madness::projector_irrep::project_on_irreps ( const std::vector< Function< T, NDIM > > &  vhrs,
const std::vector< std::string > &  irreps 
) const

(re-)project the argument on the given irreps

Parameters
[in]vrhsthe vector of functions to be projected on the irreps given by irreps
[in]irrepsthe irreps in order of the functions
Returns
vrhs projected on the irreps

References madness::compress(), madness::copy(), madness::WorldGopInterface::fence(), madness::World::gop, madness::charactertable::irreps_, madness::charactertable::operators_, madness::charactertable::order_, madness::charactertable::schoenflies_, madness::World::size(), table_, and madness::truncate().

Referenced by madness::TDHF::symmetrize().

◆ reduce() [1/4]

std::vector< std::string > madness::projector_irrep::reduce ( const std::string  irrep1,
const std::string  irrep2 
) const
inline

reduce a product of two irreps

References reduce().

◆ reduce() [2/4]

std::vector< std::string > madness::projector_irrep::reduce ( const std::string  irrep1,
const std::string  irrep2,
const std::string  irrep3 
) const
inline

reduce a product of three irreps

References reduce().

◆ reduce() [3/4]

std::vector< std::string > madness::projector_irrep::reduce ( const std::string  irrep1,
const std::string  irrep2,
const std::string  irrep3,
const std::string  irrep4 
) const
inline

reduce a product of four irreps

References reduce().

◆ reduce() [4/4]

std::vector< std::string > madness::projector_irrep::reduce ( const std::vector< std::string >  reps) const

reduce a reducible representation

Parameters
[in]repsvector or irrep or reduc. reps whose product will be reduced
Returns
vector of irreps constituting the input product

References get_all_irreps(), madness::charactertable::irreps_, MADNESS_ASSERT, MADNESS_EXCEPTION, madness::charactertable::order_, madness::print(), print_character_table(), and table_.

Referenced by madness::TDHF::make_guess_from_initial_diagonalization(), reduce(), reduce(), reduce(), and madness::TDHF::symmetrize().

◆ resort()

template<typename R >
static std::vector< R > madness::projector_irrep::resort ( const std::vector< int >  map,
const std::vector< R > &  vrhs 
)
inlinestatic

given a mapping resort

References MADNESS_ASSERT.

Referenced by sort_to_irreps().

◆ reverse_resort()

template<typename R >
static std::vector< R > madness::projector_irrep::reverse_resort ( const std::vector< int >  map,
const std::vector< R > &  vrhs 
)
inlinestatic

given a mapping resort

References MADNESS_ASSERT.

◆ set_irrep()

projector_irrep & madness::projector_irrep::set_irrep ( std::string  irrep)
inline

◆ set_lindep()

projector_irrep & madness::projector_irrep::set_lindep ( const double  ld)
inline

set the linear dependency threshold

References lindep_.

Referenced by madness::TDHF::initialize(), and madness::TDHF::make_guess_from_initial_diagonalization().

◆ set_ordering()

projector_irrep & madness::projector_irrep::set_ordering ( const std::string  o)
inline

set the ordering after symmetrization: irreps or keep as is

References keep_ordering_, MADNESS_EXCEPTION, and madness::print().

Referenced by madness::Nemo::Nemo(), madness::OEP::iterate(), madness::OEP::load_restartdata(), and madness::OEP::save_restartdata().

◆ set_orthonormalize_irreps()

projector_irrep & madness::projector_irrep::set_orthonormalize_irreps ( bool  flag)
inline

◆ set_verbosity()

projector_irrep & madness::projector_irrep::set_verbosity ( int  v)
inline

◆ sort_to_irreps()

template<typename T , std::size_t NDIM>
std::vector< Function< T, NDIM > > madness::projector_irrep::sort_to_irreps ( std::vector< Function< T, NDIM > > &  vrhs,
std::vector< std::string > &  sirreps 
) const
inlineprivate

sort the functions according to their irreps

References get_canonical_to_irrep_map(), and resort().

Referenced by apply_symmetry_operators().

Member Data Documentation

◆ irrep_

std::string madness::projector_irrep::irrep_ ="all"
private

choose one of the irreps or "all"

Referenced by apply_symmetry_operators(), print_info(), and set_irrep().

◆ keep_ordering_

bool madness::projector_irrep::keep_ordering_ =true
private

after projection: result functions being ordered according to irreps or ordering unchanged

Referenced by apply_symmetry_operators(), print_info(), and set_ordering().

◆ lindep_

double madness::projector_irrep::lindep_ =1.e-3
private

linear dependency threshold for the orthogonalization

Referenced by apply_symmetry_operators(), print_info(), and set_lindep().

◆ orthonormalize_irreps_

bool madness::projector_irrep::orthonormalize_irreps_ =true
private

orthonormalize within the irreps or simply discard linear dependent vectors

Referenced by apply_symmetry_operators(), get_orthonormalize_irreps(), print_info(), and set_orthonormalize_irreps().

◆ table_

charactertable madness::projector_irrep::table_
private

◆ verbosity_

int madness::projector_irrep::verbosity_ =1
private

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