ergo
densfromf_stochastic.cc File Reference

Routine get_dens_from_fock_stochastic() for getting density matrix from a given Fock matrix using stochastic orbitals. More...

#include "densfromf_stochastic.h"
#include "utilities.h"
#include "AllocatorManager.h"
#include <math.h>

Functions

static ergo_real get_scalar_product (const std::vector< ergo_real > &a, const std::vector< ergo_real > &b)
 
static int verify_that_vector_is_normalized (const std::vector< ergo_real > &v)
 
int get_dens_from_fock_stochastic (int n, int noOfOccupiedOrbs, symmMatrix &resultDens, ergo_real factor, symmMatrix const &Finput, triangMatrix const &invCholFactor, mat::SizesAndBlocks const &matrixSizesAndBlocks, const std::vector< std::vector< ergo_real > > stochastic_orbitals)
 

Detailed Description

Routine get_dens_from_fock_stochastic() for getting density matrix from a given Fock matrix using stochastic orbitals.

Author
: Elias Rudberg responsible.

Function Documentation

int get_dens_from_fock_stochastic ( int  n,
int  noOfOccupiedOrbs,
symmMatrix resultDens,
ergo_real  factor,
symmMatrix const &  Finput,
triangMatrix const &  invCholFactor,
mat::SizesAndBlocks const &  matrixSizesAndBlocks,
const std::vector< std::vector< ergo_real > >  stochastic_orbitals 
)
Parameters
nSystem size.
noOfOccupiedOrbsNumber of occupied orbitals.
resultDens(out) Resulting density matrix (D_S) in 'non-orthogonal basis'. ( D_S = Z*D_ort*ZT )
factorFactor to scale the resulting density matrix. (for restricted vs unrestricted calc)
Finput(in) Fock/Kohn-Sham matrix (F_S) in 'non-orthogonal basis'. (written to file)
invCholFactor(in) Inverse Cholesky factor of S. (written to file)
matrixSizesAndBlocksInformation about HML matrix block sizes etc.
stochastic_orbitalsVector of stochastic orbitals.

References A, mat::MatrixSymmetric< Treal, Tmatrix >::assignFromFull(), do_output(), mat::MatrixGeneral< Treal, Tmatrix >::fullMatrix(), get_scalar_product(), mat::AllocatorManager< Treal >::getStatistics(), mat::AllocatorManager< Treal >::instance(), LOG_AREA_DENSFROMF, LOG_CAT_ERROR, LOG_CAT_INFO, output_current_memory_usage(), Util::TimeMeter::print(), mat::FileWritable::readFromFile(), mat::syev(), mat::transpose(), and verify_that_vector_is_normalized().

Referenced by get_dens_from_fock_general().

static ergo_real get_scalar_product ( const std::vector< ergo_real > &  a,
const std::vector< ergo_real > &  b 
)
static
static int verify_that_vector_is_normalized ( const std::vector< ergo_real > &  v)
static