#include "densfromf_sparse.h"
#include "output.h"
#include <memory.h>
#include <stdio.h>
#include <math.h>
#include <fstream>
#include <sstream>
#include "utilities.h"
#include "matrix_utilities.h"
#include "TC2.h"
#include "PuriInfo.h"
#include "Purification.h"
#include "units.h"
#include "machine_epsilon.h"
#include "simple_purification.h"
Typedefs | |
| typedef mat::DebugLevelLow | debugPolicy |
| typedef mat::PuriInfo< ergo_real, generalVector, debugPolicy > | puriInfoType |
| typedef mat::Purification< ergo_real, symmMatrix, debugPolicy > | purificationType |
| typedef mat::Interval< ergo_real > | intervalType |
Functions | |
| intervalType | getAllEigsInterval (int n, symmMatrix &F, mat::SizesAndBlocks const &matrixSizesAndBlocks, int use_rand_perturbation) |
| int | get_dens_from_fock_sparse (int n, int noOfOccupiedOrbs, symmMatrix &resultDens, ergo_real factor, symmMatrix const &Finput, intervalType &homoInterval_Finput, intervalType &lumoInterval_Finput, triangMatrix const &invCholFactor, ergo_real invCholFactor_euclnorm, ergo_real gap_expected_lower_bound, mat::SizesAndBlocks const &matrixSizesAndBlocks, symmMatrix &F_ort_prev, intervalType &homoInterval_F_ort_prev, intervalType &lumoInterval_F_ort_prev, ergo_real eigvalueErrorLimit, ergo_real subspaceErrorLimit, mat::normType const truncationNormPurification, int maxMul, int create_m_files, int ignore_purification_failure, int use_rand_perturbation_for_alleigsint, std::string stats_prefix, std::map< std::string, double > &puri_stats, int do_sparsity_investigation, int sparsity_plots_resolution_m, int do_comparison_to_simple_purification, generalVector *eigVecLUMO, generalVector *eigVecHOMO) |
Variables | |
| static int | globalCounter = 0 |
| typedef mat::DebugLevelLow debugPolicy |
| typedef mat::Interval<ergo_real> intervalType |
| typedef mat::PuriInfo<ergo_real, generalVector, debugPolicy> puriInfoType |
| int get_dens_from_fock_sparse | ( | int | n, | |
| int | noOfOccupiedOrbs, | |||
| symmMatrix & | resultDens, | |||
| ergo_real | factor, | |||
| symmMatrix const & | Finput, | |||
| intervalType & | homoInterval_Finput, | |||
| intervalType & | lumoInterval_Finput, | |||
| triangMatrix const & | invCholFactor, | |||
| ergo_real | invCholFactor_euclnorm, | |||
| ergo_real | gap_expected_lower_bound, | |||
| mat::SizesAndBlocks const & | matrixSizesAndBlocks, | |||
| symmMatrix & | F_ort_prev, | |||
| intervalType & | homoInterval_F_ort_prev, | |||
| intervalType & | lumoInterval_F_ort_prev, | |||
| ergo_real | eigvalueErrorLimit, | |||
| ergo_real | subspaceErrorLimit, | |||
| mat::normType const | truncationNormPurification, | |||
| int | maxMul, | |||
| int | create_m_files, | |||
| int | ignore_purification_failure, | |||
| int | use_rand_perturbation_for_alleigsint, | |||
| std::string | stats_prefix, | |||
| std::map< std::string, double > & | puri_stats, | |||
| int | do_sparsity_investigation, | |||
| int | sparsity_plots_resolution_m, | |||
| int | do_comparison_to_simple_purification, | |||
| generalVector * | eigVecLUMO, | |||
| generalVector * | eigVecHOMO | |||
| ) |
| n | System size. |
| noOfOccupiedOrbs | Number of occupied orbitals. |
| resultDens | (out) Resulting density matrix (D_S) in 'non-orthogonal basis'. ( D_S = Z*D_ort*ZT ) |
| factor | Factor 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) |
| homoInterval_Finput | (out) Output: Contains the homo eigenvalue of Finput. |
| lumoInterval_Finput | (out) Output: Contains the lumo eigenvalue of Finput. |
| invCholFactor | (in) Inverse Cholesky factor of S. (written to file) |
| invCholFactor_euclnorm | Euclidean norm of inverse Cholesky factor. |
| gap_expected_lower_bound | Expected lower bound for the gap to be used in early iterations. |
| matrixSizesAndBlocks | Information about HML matrix block sizes etc. |
| F_ort_prev | (in/out) Input: Previous F matrix in orthogonal basis. (written to file) Output: New F matrix in orthogonal basis ( ZT*Finput*Z ). (written to file) |
| homoInterval_F_ort_prev | (in/out) Input: Contains the homo eigenvalue of F_ort_prev. Output: Contains the homo eigenvalue of F_ort_prev. |
| lumoInterval_F_ort_prev | (in/out) Input: Contains the lumo eigenvalue of F_ort_prev. Output: Contains the lumo eigenvalue of F_ort_prev. |
| eigvalueErrorLimit | (in) Requested accuracy in eigenvalues of D_ort. |
| subspaceErrorLimit | (in) Requested accuracy in the occupied subspace of D_ort. |
| truncationNormPurification | Norm to be used for truncation in, before, and after purification. |
| maxMul | Maximum allowed number of matrix multiplications. |
| create_m_files | Flag to create m-files with information about the purification process. |
| ignore_purification_failure | Continue even if purification fails to converge. |
| use_rand_perturbation_for_alleigsint | Apply a random perturbation to (try to) improve the convergence speed of Lanczos calculation of extremal eigenvalues. |
| stats_prefix | Prefix to be added to statistics files. |
| puri_stats | Map to store stats for purification. |
| do_sparsity_investigation | Flag to turn on sparsity investigation. |
| sparsity_plots_resolution_m | Resolution in element magnitude histograms. |
| do_comparison_to_simple_purification | Flag to turn on comparison to simple purification. |
| eigVecLUMO | LUMO eigenvector |
| eigVecHOMO | HOMO eigenvector |
| intervalType getAllEigsInterval | ( | int | n, | |
| symmMatrix & | F, | |||
| mat::SizesAndBlocks const & | matrixSizesAndBlocks, | |||
| int | use_rand_perturbation | |||
| ) |
int globalCounter = 0 [static] |
1.4.7