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

#include <localizer.h>

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

Public Member Functions

 Localizer ()=default
 
 Localizer (World &world, const AtomicBasisSet &aobasis, const Molecule &molecule, const std::vector< Function< double, 3 > > &ao)
 
template<typename T , std::size_t NDIM>
Tensor< Tcompute_core_valence_separation_transformation_matrix (World &world, const MolecularOrbitals< T, NDIM > &mo_in, const Tensor< T > &Fock) const
 localize orbitals while enforcing core-valence separation
 
template<typename T , std::size_t NDIM>
Tensor< Tcompute_localization_matrix (World &world, const MolecularOrbitals< T, NDIM > &mo_in, bool randomize) const
 
AtomicBasisSet get_aobasis () const
 
std::string get_method ()
 
template<typename T , std::size_t NDIM>
MolecularOrbitals< T, NDIMlocalize (const MolecularOrbitals< T, NDIM > &mo_in, bool randomize) const
 localize the orbitals
 
template<typename T , std::size_t NDIM>
MolecularOrbitals< T, NDIMlocalize (const MolecularOrbitals< T, NDIM > &mo_in, const Tensor< T > &Fock, bool randomize) const
 localize the orbitals, possibly enforce core-valence separation
 
void print_info () const
 
template<typename T , std::size_t NDIM>
MolecularOrbitals< T, NDIMseparate_core_valence (const MolecularOrbitals< T, NDIM > &mo_in, const Tensor< T > &Fock) const
 
Localizerset_enforce_core_valence_separation (const bool value)
 
Localizerset_method (const std::string method1)
 
Localizerset_metric (const Function< double, 3 > &R)
 

Static Public Member Functions

template<typename T >
static bool check_core_valence_separation (const Tensor< T > &Fock, const std::vector< int > &localized_set, const bool silent=false)
 
static bool check_frozen_consistency (const long nfrozen, const std::vector< int > &localize_sets)
 
template<typename T >
static std::size_t determine_frozen_orbitals (const Tensor< T > fmat)
 
static std::vector< Slicefind_degenerate_blocks (const Tensor< double > &eval, const double thresh_degenerate)
 find sets of degenerate states/orbitals
 
template<typename T >
static void undo_degenerate_rotations (Tensor< T > &U, const Tensor< double > &eval, const double thresh_degenerate)
 given a unitary transformation matrix undo rotations between degenerate columns
 
template<typename T >
static void undo_reordering (Tensor< T > &U, const Tensor< double > &occ)
 given a unitary transformation matrix undo mere reordering
 
template<typename T >
static void undo_reordering (Tensor< T > &U, const Tensor< double > &occ, Tensor< double > &eval)
 given a unitary transformation matrix undo mere reordering
 
template<typename T >
static Tensor< Tundo_rotation (const Tensor< T > &U_in, const std::vector< Slice > &blocks)
 given a unitary transformation matrix undo the rotations within the blocks
 
template<typename T >
static void undo_rotations_within_sets (Tensor< T > &U, const std::vector< int > &localized_set)
 given a unitary transformation matrix undo rotations within blocks of localized orbitals
 

Private Member Functions

template<typename T >
double DIP (const Tensor< T > &dip, int i, int j, int k, int l) const
 
template<typename T , std::size_t NDIM>
DistributedMatrix< Tlocalize_boys (World &world, const std::vector< Function< T, NDIM > > &mo, const std::vector< int > &set, const double thresh=1e-9, const bool randomize=true, const bool doprint=false) const
 
template<typename T , std::size_t NDIM>
DistributedMatrix< Tlocalize_new (World &world, const std::vector< Function< T, NDIM > > &mo, const std::vector< int > &set, const double thresh=1e-9, const bool randomize=true, const bool doprint=false) const
 
template<typename T , std::size_t NDIM>
DistributedMatrix< Tlocalize_PM (World &world, const std::vector< Function< T, NDIM > > &mo, const std::vector< int > &set, const double thresh=1e-9, const bool randomize=true, const bool doprint=false) const
 
template<typename T >
Tensor< Tmatrix_exponential (const Tensor< T > &A) const
 

Private Attributes

std::vector< Function< double, 3 > > ao
 
AtomicBasisSet aobasis
 map atoms to basis functions in the "new" algorithm
 
std::vector< int > at_nbf
 
std::vector< int > at_to_bf
 
bool enforce_core_valence_separation =false
 when are orbitals degenerate
 
std::string method ="new"
 no rotations between core and valence orbitals (distinguished by 'set')
 
Function< double, 3 > metric
 
Molecule molecule
 
double thetamax =0.1
 =R for computing matrix elements of operators
 
double thresh_degenerate
 
const double tolloc = 1e-6
 maximum rotation(?)
 

Constructor & Destructor Documentation

◆ Localizer() [1/2]

madness::Localizer::Localizer ( )
default

◆ Localizer() [2/2]

madness::Localizer::Localizer ( World world,
const AtomicBasisSet aobasis,
const Molecule molecule,
const std::vector< Function< double, 3 > > &  ao 
)

Member Function Documentation

◆ check_core_valence_separation()

template<typename T >
bool madness::Localizer::check_core_valence_separation ( const Tensor< T > &  Fock,
const std::vector< int > &  localized_set,
const bool  silent = false 
)
static

◆ check_frozen_consistency()

bool madness::Localizer::check_frozen_consistency ( const long  nfrozen,
const std::vector< int > &  localize_sets 
)
static

◆ compute_core_valence_separation_transformation_matrix()

template<typename T , std::size_t NDIM>
Tensor< T > madness::Localizer::compute_core_valence_separation_transformation_matrix ( World world,
const MolecularOrbitals< T, NDIM > &  mo_in,
const Tensor< T > &  Fock 
) const

localize orbitals while enforcing core-valence separation

Parameters
[in]Worldthe world
[in]mo_inthe input orbitals
[in]Fockthe Fock matrix for canonicalizing the orbitals first
[in]methodthe localization method
[in]tolloclocalization tolerance
[in]randomizeinitially randomize the localization procedure

References madness::WorldGopInterface::broadcast(), check_core_valence_separation(), madness::copy(), madness::f, madness::MolecularOrbitals< T, NDIM >::get_localize_sets(), madness::World::gop, madness::inner(), madness::jacobi(), MADNESS_CHECK, madness::print(), madness::Tensor< T >::ptr(), madness::BaseTensor::size(), and madness::transpose().

Referenced by localize(), and separate_core_valence().

◆ compute_localization_matrix()

template<typename T , std::size_t NDIM>
Tensor< T > madness::Localizer::compute_localization_matrix ( World world,
const MolecularOrbitals< T, NDIM > &  mo_in,
bool  randomize 
) const

◆ determine_frozen_orbitals()

template<typename T >
template std::size_t madness::Localizer::determine_frozen_orbitals ( const Tensor< T fmat)
static

◆ DIP()

template<typename T >
double madness::Localizer::DIP ( const Tensor< T > &  dip,
int  i,
int  j,
int  k,
int  l 
) const
inlineprivate

References k.

Referenced by localize_boys().

◆ find_degenerate_blocks()

std::vector< Slice > madness::Localizer::find_degenerate_blocks ( const Tensor< double > &  eval,
const double  thresh_degenerate 
)
static

find sets of degenerate states/orbitals

References madness::BaseTensor::size(), and thresh_degenerate.

Referenced by undo_degenerate_rotations().

◆ get_aobasis()

AtomicBasisSet madness::Localizer::get_aobasis ( ) const
inline

References aobasis.

◆ get_method()

std::string madness::Localizer::get_method ( )
inline

References method.

◆ localize() [1/2]

template<typename T , std::size_t NDIM>
MolecularOrbitals< T, NDIM > madness::Localizer::localize ( const MolecularOrbitals< T, NDIM > &  mo_in,
bool  randomize 
) const

◆ localize() [2/2]

template<typename T , std::size_t NDIM>
MolecularOrbitals< T, NDIM > madness::Localizer::localize ( const MolecularOrbitals< T, NDIM > &  mo_in,
const Tensor< T > &  Fock,
bool  randomize 
) const

◆ localize_boys()

template<typename T , std::size_t NDIM>
DistributedMatrix< T > madness::Localizer::localize_boys ( World world,
const std::vector< Function< T, NDIM > > &  mo,
const std::vector< int > &  set,
const double  thresh = 1e-9,
const bool  randomize = true,
const bool  doprint = false 
) const
private

◆ localize_new()

template<typename T , std::size_t NDIM>
DistributedMatrix< T > madness::Localizer::localize_new ( World world,
const std::vector< Function< T, NDIM > > &  mo,
const std::vector< int > &  set,
const double  thresh = 1e-9,
const bool  randomize = true,
const bool  doprint = false 
) const
private

◆ localize_PM()

template<typename T , std::size_t NDIM>
DistributedMatrix< T > madness::Localizer::localize_PM ( World world,
const std::vector< Function< T, NDIM > > &  mo,
const std::vector< int > &  set,
const double  thresh = 1e-9,
const bool  randomize = true,
const bool  doprint = false 
) const
private

◆ matrix_exponential()

template<typename T >
Tensor< T > madness::Localizer::matrix_exponential ( const Tensor< T > &  A) const
private

◆ print_info()

void madness::Localizer::print_info ( ) const
inline

◆ separate_core_valence()

template<typename T , std::size_t NDIM>
template MolecularOrbitals< double, 3 > madness::Localizer::separate_core_valence ( const MolecularOrbitals< T, NDIM > &  mo_in,
const Tensor< T > &  Fock 
) const

◆ set_enforce_core_valence_separation()

Localizer & madness::Localizer::set_enforce_core_valence_separation ( const bool  value)
inline

◆ set_method()

Localizer & madness::Localizer::set_method ( const std::string  method1)
inline

◆ set_metric()

Localizer & madness::Localizer::set_metric ( const Function< double, 3 > &  R)
inline

◆ undo_degenerate_rotations()

template<typename T >
template void madness::Localizer::undo_degenerate_rotations ( Tensor< T > &  U,
const Tensor< double > &  eval,
const double  thresh_degenerate 
)
static

◆ undo_reordering() [1/2]

template<typename T >
static void madness::Localizer::undo_reordering ( Tensor< T > &  U,
const Tensor< double > &  occ 
)
inlinestatic

given a unitary transformation matrix undo mere reordering

References madness::BaseTensor::dim(), and undo_reordering().

Referenced by get_fock_transformation(), madness::SCF::get_fock_transformation(), and undo_reordering().

◆ undo_reordering() [2/2]

template<typename T >
void madness::Localizer::undo_reordering ( Tensor< T > &  U,
const Tensor< double > &  occ,
Tensor< double > &  eval 
)
static

given a unitary transformation matrix undo mere reordering

References madness::_(), std::abs(), madness::conditional_conj(), madness::copy(), madness::BaseTensor::dim(), and madness::Tensor< T >::scale().

◆ undo_rotation()

template<typename T >
Tensor< T > madness::Localizer::undo_rotation ( const Tensor< T > &  U_in,
const std::vector< Slice > &  blocks 
)
static

given a unitary transformation matrix undo the rotations within the blocks

References madness::_(), madness::copy(), madness::inner(), q(), sigma, madness::svd(), and madness::transpose().

Referenced by undo_degenerate_rotations(), and undo_rotations_within_sets().

◆ undo_rotations_within_sets()

template<typename T >
void madness::Localizer::undo_rotations_within_sets ( Tensor< T > &  U,
const std::vector< int > &  localized_set 
)
static

given a unitary transformation matrix undo rotations within blocks of localized orbitals

References madness::MolecularOrbitals< T, NDIM >::convert_set_to_slice(), and undo_rotation().

Member Data Documentation

◆ ao

std::vector<Function<double, 3> > madness::Localizer::ao
private

Referenced by localize_new(), and localize_PM().

◆ aobasis

AtomicBasisSet madness::Localizer::aobasis
private

map atoms to basis functions in the "new" algorithm

Referenced by Localizer(), get_aobasis(), localize_new(), and print_info().

◆ at_nbf

std::vector<int> madness::Localizer::at_nbf
private

◆ at_to_bf

std::vector<int> madness::Localizer::at_to_bf
private

◆ enforce_core_valence_separation

bool madness::Localizer::enforce_core_valence_separation =false
private

when are orbitals degenerate

Referenced by localize(), print_info(), and set_enforce_core_valence_separation().

◆ method

std::string madness::Localizer::method ="new"
private

no rotations between core and valence orbitals (distinguished by 'set')

Referenced by compute_localization_matrix(), get_method(), print_info(), and set_method().

◆ metric

Function<double,3> madness::Localizer::metric
private

◆ molecule

Molecule madness::Localizer::molecule
private

Referenced by Localizer(), and localize_new().

◆ thetamax

double madness::Localizer::thetamax =0.1
private

=R for computing matrix elements of operators

Referenced by localize_PM().

◆ thresh_degenerate

double madness::Localizer::thresh_degenerate
private

◆ tolloc

const double madness::Localizer::tolloc = 1e-6
private

maximum rotation(?)

Referenced by compute_localization_matrix().


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