ergo
|
PurificationGeneral is an abstract class which provides an interface for SP2, SP2ACC and possibly other recursive expansions. More...
#include <purification_general.h>
Public Types | |
typedef ergo_real | real |
typedef intervalType | IntervalType |
typedef mat::normType | NormType |
typedef std::vector< int > | VectorTypeInt |
typedef std::vector< real > | VectorTypeReal |
typedef generalVector | VectorType |
typedef MatrixType | MatrixTypeWrapper |
Public Member Functions | |
PurificationGeneral () | |
virtual void | initialize (const MatrixType &F_, const IntervalType &lumo_bounds_, const IntervalType &homo_bounds_, int maxit_, real error_sub_, real error_eig_, bool use_new_stopping_criterion_, NormType norm_truncation, NormType norm_stop_crit, int nocc_) |
Set imporatant parameters for the recursive expansion. | |
virtual void | PurificationStart () |
Start recursive expansion. | |
virtual void | clear () |
Clear all matrices in the class. | |
void | set_spectrum_bounds (real eigmin, real eigmax) |
Set spectrum bounds. | |
void | get_spectrum_bounds (real &eigmin, real &eigmax) |
Get spectrum bounds. | |
int | get_exact_number_of_puri_iterations () |
int | get_est_number_of_puri_iterations () |
virtual real | total_subspace_error (int it) |
void | set_eigenvectors_params (string eigenvectors_method_, string eigenvectors_iterative_method_, real eigensolver_accuracy_, int eigensolver_maxiter_, int scf_step_, bool try_eigv_on_next_iteration_if_fail_) |
Set parameters for computing eigenvectors. | |
void | set_eigenvectors_params (string eigenvectors_method_, string eigenvectors_iterative_method_, real eigensolver_accuracy_, int eigensolver_maxiter_, int scf_step_, bool try_eigv_on_next_iteration_if_fail_, bool use_prev_vector_as_initial_guess_, const std::vector< VectorType > &eigVecOCCRef, const std::vector< VectorType > &eigVecUNOCCRef) |
Set parameters for computing eigenvectors - long version. | |
void | extract_computed_eigenpairs (std::vector< VectorType > &eigVecUNOCCref, std::vector< VectorType > &eigVecOCCref, std::vector< real > &eigValUNOCCref, std::vector< real > &eigValOCCref) |
void | set_compute_eigenvectors_in_each_iteration () |
void | unset_compute_eigenvectors_in_each_iteration () |
void | set_number_of_eigenvectors_to_compute (const int occ, const int unocc) |
int | get_number_of_occ_eigenvectors_to_compute () const |
int | get_number_of_unocc_eigenvectors_to_compute () const |
void | set_jump_over_X_iter_proj_method (int val) |
int | get_jump_over_X_iter_proj_method () const |
void | set_go_back_X_iter_proj_method (int val) |
int | get_go_back_X_iter_proj_method () const |
void | compute_eigenvectors_without_diagonalization_on_F (const MatrixType &F, int eigensolver_maxiter_for_F) |
void | gen_matlab_file_norm_diff (const char *filename) const |
Create MATLAB .m file which plots the idempotency error in each recursive expansion iteration. | |
void | gen_matlab_file_threshold (const char *filename) const |
Create MATLAB .m file which plots the actual introduced error after truncation of the matrix X_i in each recursive expansion iteration. | |
void | gen_matlab_file_nnz (const char *filename) const |
Create MATLAB .m file which plots the number of non-zero elements in matrices X_i and X_i^2 in each recursive expansion iteration. | |
void | gen_matlab_file_eigs (const char *filename) const |
Create MATLAB .m file which plots the homo and lumo bounds in each recursive expansion iteration. | |
void | gen_matlab_file_time (const char *filename) const |
Create MATLAB .m file which creates a bar plot presenting time spent on various parts of the iteration (such as matrix square and computation of eigenvectors) in each recursive expansion iteration. | |
virtual | ~PurificationGeneral () |
Create MATLAB .m file which plots a condition number of a problem of computing the density matrix in each recursive expansion iteration. | |
Static Public Member Functions | |
static real | get_epsilon () |
Get machine epsilon. | |
static real | get_max_double () |
Get largest number. | |
static real | get_min_double () |
Get smallest number. | |
Public Attributes | |
PuriInfo | info |
Fill in during purification with useful information. | |
MatrixType | X |
Matrix X. | |
MatrixType | Xsq |
Matrix X^2. | |
Protected Member Functions | |
virtual bool | is_initialized () const |
Check is function initialize() is already called. | |
virtual bool | puri_is_prepared () const |
Check is function prepare_to_purification() is already called. | |
virtual void | prepare_to_purification () |
Prepare data for recursive expansion. | |
virtual void | prepare_to_purification_eigenvectors () |
Prepare data related to the eigenvectors computations. | |
virtual void | purification_process () |
Run recursive expansion. | |
virtual void | eigenvalue_bounds_estimation () |
Estimate eigenvalues near homo-lumo gap. | |
void | save_matrix_now (string str) |
void | save_matrix_A_now (const MatrixType &A, string str) |
virtual void | compute_spectrum_bounds () |
Compute spectrum bounds. | |
virtual void | compute_X () |
Get matrix X0 by mapping spectrum of F into [0,1] in reverse order. | |
void | map_bounds_to_0_1 () |
Get eigenvalue bounds for X0. | |
virtual void | check_standard_stopping_criterion (const real XmX2_norm, int &stop) |
Check stopping criterion (obsolete). | |
virtual void | check_new_stopping_criterion (const int it, const real XmX2_norm_it, const real XmX2_norm_itm2, const real XmX2_trace, int &stop, real &estim_order) |
Check stopping criterion. | |
virtual void | stopping_criterion (IterationInfo &iter_info, int &stop, real &estim_order) |
Choose stopping criterion and check it. | |
int | get_int_eig_iter_method (string eigenvectors_iterative_method) |
int | get_int_eig_method (string eigenvectors_method) |
void | compute_eigenvectors_without_diagonalization (int it, IterationInfo &iter_info) |
Compute HOMO and LUMO eigenvalues and eigenvectors of the matrix F. | |
void | compute_eigenvectors_without_diagonalization_last_iter_proj () |
void | projection_method_one_puri_iter (int current_iteration) |
void | compute_eigenvector (MatrixType const &M, std::vector< VectorType > &eigVec, std::vector< real > &eigVal, int it, bool is_homo) |
void | set_eigenvectors_params_basic (string eigenvectors_method_, string eigenvectors_iterative_method_, real eigensolver_accuracy_, int eigensolver_maxiter_, int scf_step_, bool try_eigv_on_next_iteration_if_fail_, bool use_prev_vector_as_initial_guess_) |
Set parameters for computing eigenvectors. | |
double | get_nnz_X (size_t &nnzX) |
Get nnz of X in %. | |
double | get_nnz_X () |
Get nnz of X in %. | |
double | get_nnz_Xsq (size_t &nnzXsq) |
Get nnz of X^2 in %. | |
double | get_nnz_Xsq () |
Get nnz of X^2 in %. | |
void | estimate_homo_lumo (const VectorTypeReal &XmX2_norm_mixed, const VectorTypeReal &XmX2_norm_frob, const VectorTypeReal &XmX2_trace) |
Get homo and lumo bounds from traces and norms of Xi-Xi^2. | |
void | get_eigenvalue_estimates (const VectorTypeReal &XmX2_norm_mixed, const VectorTypeReal &XmX2_norm_frob, const VectorTypeReal &XmX2_trace) |
Get homo and lumo bounds from traces and norms of Xi-Xi^2. | |
virtual void | determine_iteration_for_eigenvectors () |
Determine in which iterations will be computed homo and lumo eigenvectors. | |
virtual void | get_iterations_for_lumo_and_homo (int &chosen_iter_lumo, int &chosen_iter_homo) |
Find the best iterations for computing eigenvectors. | |
virtual void | check_eigenvectors_at_the_end () |
virtual void | discard_homo_eigenvector () |
virtual void | discard_lumo_eigenvector () |
void | output_norms_and_traces (IterationInfo &iter_info) const |
void | output_separate_total_times (PuriInfo &info) const |
void | output_time_WriteAndReadAll () const |
void | check_homo_lumo_eigenvalues (real &eigVal, VectorType &eigVec, bool &is_homo, bool &is_lumo, const int iter) |
void | get_eigenvalue_of_F_from_eigv_of_Xi (real &eigVal, const VectorType &eigVec) |
void | save_selected_eigenvector_to_file (const VectorType &v, int num, bool is_homo, int it=-1) |
virtual void | truncate_matrix (real &thresh, int it) |
virtual void | set_truncation_parameters () |
void | find_shifts_every_iter () |
/brief Find shifts sigma which will be used for construction of the filtering polynomial for computing eigenvectors. | |
void | writeToTmpFile (MatrixType &A) const |
void | readFromTmpFile (MatrixType &A) const |
virtual void | set_init_params ()=0 |
virtual void | estimate_number_of_iterations (int &estim_num_iter)=0 |
virtual void | purify_X (const int it)=0 |
virtual void | purify_bounds (const int it)=0 |
virtual void | save_other_iter_info (IterationInfo &iter_info, int it)=0 |
virtual void | apply_inverse_poly_vector (const int it, VectorTypeReal &bounds_from_it)=0 |
virtual void | return_constant_C (const int it, real &Cval)=0 |
virtual real | apply_poly (const int it, real x)=0 |
virtual real | compute_derivative (const int it, real x, real &DDf)=0 |
Protected Attributes | |
MatrixType | F |
Matrix F. | |
std::vector< MatrixType > | vec_matrices_Xi |
Save matrices Xi in each iteration (if used projection method for computing eigenvectors). | |
bool | initialized_flag |
bool | puri_is_prepared_flag |
bool | use_new_stopping_criterion |
True for new stopping criterion. | |
int | additional_iterations |
Do a few more iterations after convergence. | |
int | maxit |
Maximum number of iterations. | |
int | check_stopping_criterion_iter |
Iteration when to start to check stopping criterion. | |
int | nocc |
Number of occupied orbitals. | |
NormType | normPuriTrunc |
Norm used for the truncation of matrices. | |
NormType | normPuriStopCrit |
Norm used in the stopping criterion Can be mat::frobNorm, mat::mixedNorm, or mat::euclNorm. | |
real | error_sub |
Allowed error in invariant subspaces. | |
real | error_eig |
Error in eigenvalues (used just in old stopping criterion). | |
real | error_per_it |
Error allowed in each iteration due to truncation. | |
real | constant_C |
Asymptotic constant C needed for the new stopping criterion. | |
real | gammaStopEstim |
Used on the stopping criterion for estimation of eigenvalues from purification. | |
VectorTypeInt | VecPoly |
Polynomials computed in the function estimated_number_of_iterations() VecPoly[i] = 1 if we use X=X^2 VecPoly[i] = 0 if we use X=2X-X^2 (or their accelerated versions) | |
VectorTypeReal | VecGap |
Gap computed using inner homo and lumo bounds on each iteration. | |
VectorTypeReal | ITER_ERROR_VEC |
(Eigenvectors) Maximum error introduced in each iteration. | |
VectorTypeReal | SIGMA_HOMO_VEC |
VectorTypeReal | SIGMA_LUMO_VEC |
(Eigenvectors) Approximation of shifts in each iteration. | |
VectorTypeReal | EIG_ABS_GAP_LUMO_VEC |
VectorTypeReal | EIG_ABS_GAP_HOMO_VEC |
(Eigenvectors) Absolute and relative gap in filter for lumo eigenvalue. | |
VectorTypeReal | EIG_REL_GAP_LUMO_VEC |
VectorTypeReal | EIG_REL_GAP_HOMO_VEC |
(Eigenvectors) Absolute and relative gap in filter for homo eigenvalue. | |
int | number_of_occ_eigenvectors |
int | number_of_unocc_eigenvectors |
int | jump_over_X_iter_proj_method |
int | go_back_X_iter_proj_method |
IntervalType | homo_bounds |
(1-homo) bounds for Xi in iteration i | |
IntervalType | lumo_bounds |
Lumo bounds for Xi in iteration i. | |
IntervalType | homo_bounds_X0 |
Initial lumo bounds for X. | |
IntervalType | lumo_bounds_X0 |
Initial lumo bounds for X. | |
IntervalType | homo_bounds_F |
Initial lumo bounds for F. | |
IntervalType | lumo_bounds_F |
Initial homo bounds for F. | |
IntervalType | homo_bounds_F_new |
IntervalType | lumo_bounds_F_new |
IntervalType | spectrum_bounds |
Outer bounds for the whole spectrum of F/Xi. | |
bool | computed_spectrum_bounds |
int | eigenvectors_method |
Chosen method for computing eigenvectors. | |
int | eigenvectors_iterative_method |
Chosen eigensolver. | |
real | eigensolver_accuracy |
Accuracy of the eigenvalue problem solver. | |
int | eigensolver_maxiter |
Maximum number of iterations for eigensolver. | |
string | eigenvectors_method_str |
string | eigenvectors_iterative_method_str |
bool | use_prev_vector_as_initial_guess |
bool | compute_eigenvectors_in_this_SCF_cycle |
bool | try_eigv_on_next_iteration_if_fail |
VectorType | eigVecLUMORef |
VectorType | eigVecHOMORef |
std::vector< VectorType > | eigVecOCC |
Here we save eigenvectors corresponding to the occupied orbitals. | |
std::vector< VectorType > | eigVecUNOCC |
Here we save eigenvectors corresponding to the unoccupied orbitals. | |
std::vector< real > | eigValOCC |
Here we save eigenvalues corresponding to the occupied orbitals. | |
std::vector< real > | eigValUNOCC |
Here we save eigenvalues corresponding to the unoccupied orbitals. | |
real | eigValLUMO |
real | eigValHOMO |
int | iter_for_homo |
int | iter_for_lumo |
VectorTypeInt | good_iterations_homo |
Iterations where homo eigenvector can be computed. | |
VectorTypeInt | good_iterations_lumo |
Iterations where homo eigenvector can be computed. | |
VectorTypeInt | really_good_iterations_homo |
Iterations where homo eigenvector is actually computed. | |
VectorTypeInt | really_good_iterations_lumo |
Iterations where lumo eigenvector is actually computed. | |
int | scf_step |
bool | compute_eigenvectors_in_each_iteration |
Compute homo and lumo eigenpairs in every iteration and save eigenvectors in txt files. | |
PurificationGeneral is an abstract class which provides an interface for SP2, SP2ACC and possibly other recursive expansions.
MatrixType | Type of a matrix (ex. symmMatrix). |
typedef intervalType PurificationGeneral< MatrixType >::IntervalType |
typedef MatrixType PurificationGeneral< MatrixType >::MatrixTypeWrapper |
typedef mat::normType PurificationGeneral< MatrixType >::NormType |
typedef ergo_real PurificationGeneral< MatrixType >::real |
typedef generalVector PurificationGeneral< MatrixType >::VectorType |
typedef std::vector<int> PurificationGeneral< MatrixType >::VectorTypeInt |
typedef std::vector<real> PurificationGeneral< MatrixType >::VectorTypeReal |
|
inline |
|
inlinevirtual |
Create MATLAB .m file which plots a condition number of a problem of computing the density matrix in each recursive expansion iteration.
The condition number is equal to inverse of the homo-lumo gap approximation. Create PYTHON .py file which plots number of non-zero elements in matrices X_i and X_i^2 in each recursive expansion iteration.
|
protectedpure virtual |
Referenced by estimate_homo_lumo().
|
protectedpure virtual |
Referenced by find_shifts_every_iter(), and get_iterations_for_lumo_and_homo().
|
protectedvirtual |
References compute_eigenvectors_in_this_SCF_cycle, discard_homo_eigenvector(), discard_lumo_eigenvector(), do_output(), eigValHOMO, eigValLUMO, info, iter_for_homo, iter_for_lumo, LOG_AREA_DENSFROMF, LOG_CAT_INFO, LOG_CAT_WARNING, THRESHOLD_EIG_TOLERANCE, and UNIT_one_eV.
Referenced by PurificationStart().
|
protected |
References eigvec::compute_rayleigh_quotient(), do_output(), EIG_PROJECTION_INT, EIG_SQUARE_INT, eigenvectors_method, F, homo_bounds_F, info, iter_for_homo, iter_for_lumo, LOG_AREA_DENSFROMF, LOG_CAT_INFO, lumo_bounds_F, readFromTmpFile(), THRESHOLD_EIG_TOLERANCE, try_eigv_on_next_iteration_if_fail, and writeToTmpFile().
Referenced by compute_eigenvector().
|
protectedvirtual |
Check stopping criterion.
The new stopping criterion based on the order of convergence is used, see article "Parameterless Stopping Criteria for Recursive Density Matrix Expansions", J. Chem. Theory Comput., 2016, 12 (12), pp 5788–5802 DOI: 10.1021/acs.jctc.6b00626
References constant_C, do_output(), get_epsilon(), LOG_AREA_DENSFROMF, LOG_CAT_INFO, ORDER, return_constant_C(), template_blas_log(), template_blas_pow(), template_blas_sqrt(), and VecPoly.
Referenced by stopping_criterion().
|
protectedvirtual |
Check stopping criterion (obsolete).
Use stopping criterion based on user defined threshold values.
References do_output(), error_eig, homo_bounds, LOG_AREA_DENSFROMF, LOG_CAT_INFO, and lumo_bounds.
Referenced by stopping_criterion().
|
inlinevirtual |
Clear all matrices in the class.
Needed to be called if Chunks and Tasks are used, since we need to delete all ChunkIDs before exiting the program.
Referenced by GetDensFromFock::get_dens_from_fock_sparse(), and main().
|
protectedpure virtual |
Referenced by get_iterations_for_lumo_and_homo().
|
protected |
References check_homo_lumo_eigenvalues(), eigvec::compute_rayleigh_quotient(), eigvec::computeEigenvectors(), do_output(), EIG_PROJECTION_INT, eigensolver_accuracy, eigensolver_maxiter, eigenvectors_iterative_method_str, eigenvectors_method, eigValHOMO, eigValLUMO, eigVecHOMORef, eigVecLUMORef, error_sub, F, Util::TimeMeter::get_elapsed_wall_seconds(), get_epsilon(), get_number_of_occ_eigenvectors_to_compute(), get_number_of_unocc_eigenvectors_to_compute(), info, LOG_AREA_DENSFROMF, LOG_CAT_INFO, Util::TimeMeter::print(), readFromTmpFile(), really_good_iterations_homo, really_good_iterations_lumo, rows, save_matrix_A_now(), save_selected_eigenvector_to_file(), use_prev_vector_as_initial_guess, mat::Failure::what(), writeToTmpFile(), and X.
Referenced by compute_eigenvectors_without_diagonalization(), and projection_method_one_puri_iter().
|
protected |
Compute HOMO and LUMO eigenvalues and eigenvectors of the matrix F.
The method uses the polynomial constructed during the recursive expansion, so no additional matrix multiplications are required. See article J. Chem. Theory Comput., Just Accepted Manuscript, DOI: 10.1021/acs.jctc.7b00968
References compute_eigenvector(), compute_eigenvectors_in_each_iteration, do_output(), EIG_PROJECTION_INT, EIG_SQUARE_INT, eigenvectors_method, eigValOCC, eigValUNOCC, eigVecOCC, eigVecUNOCC, Util::TimeMeter::get_elapsed_wall_seconds(), get_jump_over_X_iter_proj_method(), get_number_of_occ_eigenvectors_to_compute(), get_number_of_unocc_eigenvectors_to_compute(), good_iterations_homo, good_iterations_lumo, IterationInfo::homo_eig_solver_time, info, iter_for_homo, iter_for_lumo, LOG_AREA_DENSFROMF, LOG_CAT_INFO, IterationInfo::lumo_eig_solver_time, IterationInfo::orbital_homo_time, IterationInfo::orbital_lumo_time, output_current_memory_usage(), Util::TimeMeter::print(), readFromTmpFile(), rows, SIGMA_HOMO_VEC, SIGMA_LUMO_VEC, vec_matrices_Xi, writeToTmpFile(), X, and Xsq.
Referenced by purification_process().
|
protected |
References compute_eigenvectors_in_each_iteration, do_output(), get_go_back_X_iter_proj_method(), get_jump_over_X_iter_proj_method(), get_number_of_occ_eigenvectors_to_compute(), get_number_of_unocc_eigenvectors_to_compute(), info, LOG_AREA_DENSFROMF, LOG_CAT_INFO, output_current_memory_usage(), output_time_WriteAndReadAll(), projection_method_one_puri_iter(), and Xsq.
Referenced by PurificationStart().
void PurificationGeneral< MatrixType >::compute_eigenvectors_without_diagonalization_on_F | ( | const MatrixType & | F, |
int | eigensolver_maxiter_for_F ) |
References eigvec::compute_rayleigh_quotient(), eigvec::computeEigenvectors(), do_output(), eigensolver_accuracy, eigensolver_maxiter, eigenvectors_iterative_method_str, F, homo_bounds_F, LOG_AREA_DENSFROMF, LOG_CAT_INFO, lumo_bounds_F, and rows.
Referenced by GetDensFromFock::get_dens_from_fock_sparse(), test1(), and test4().
|
protectedvirtual |
Compute spectrum bounds.
References computed_spectrum_bounds, do_output(), get_epsilon(), mat::getMachineEpsilon(), LOG_AREA_DENSFROMF, LOG_CAT_INFO, Util::TimeMeter::print(), spectrum_bounds, template_blas_sqrt(), and X.
Referenced by get_spectrum_bounds(), and prepare_to_purification().
|
protectedvirtual |
Get matrix X0 by mapping spectrum of F into [0,1] in reverse order.
References do_output(), LOG_AREA_DENSFROMF, LOG_CAT_INFO, spectrum_bounds, and X.
Referenced by prepare_to_purification().
|
protectedvirtual |
Determine in which iterations will be computed homo and lumo eigenvectors.
Calling get_iterations_for_lumo_and_homo().
References do_output(), EIG_SQUARE_INT, eigenvectors_method, get_iterations_for_lumo_and_homo(), iter_for_homo, iter_for_lumo, LOG_AREA_DENSFROMF, and LOG_CAT_INFO.
Referenced by prepare_to_purification_eigenvectors().
|
protectedvirtual |
References eigVecOCC, and info.
Referenced by check_eigenvectors_at_the_end().
|
protectedvirtual |
References eigVecUNOCC, and info.
Referenced by check_eigenvectors_at_the_end().
|
protectedvirtual |
Estimate eigenvalues near homo-lumo gap.
References do_output(), get_eigenvalue_estimates(), homo_bounds_F_new, info, LOG_AREA_DENSFROMF, LOG_CAT_INFO, lumo_bounds_F_new, mat::mixedNorm, and normPuriStopCrit.
Referenced by PurificationStart().
|
protected |
Get homo and lumo bounds from traces and norms of Xi-Xi^2.
Called by get_eigenvalue_estimates().
Used at the end of the recursive expansion. See article SIAM J. Sci. Comput., 36(2), B147–B170.
References apply_inverse_poly_vector(), gammaStopEstim, get_epsilon(), homo_bounds_F_new, info, lumo_bounds_F_new, spectrum_bounds, and template_blas_sqrt().
Referenced by get_eigenvalue_estimates().
|
protectedpure virtual |
Implemented in Purification_sp2< MatrixType >, and Purification_sp2acc< MatrixType >.
Referenced by set_truncation_parameters().
|
inline |
Referenced by GetDensFromFock::get_dens_from_fock_sparse(), main(), test1(), test2(), and test3().
|
protected |
/brief Find shifts sigma which will be used for construction of the filtering polynomial for computing eigenvectors.
References apply_poly(), homo_bounds, lumo_bounds, maxit, SIGMA_HOMO_VEC, and SIGMA_LUMO_VEC.
Referenced by get_iterations_for_lumo_and_homo().
void PurificationGeneral< MatrixType >::gen_matlab_file_eigs | ( | const char * | filename | ) | const |
Create MATLAB .m file which plots the homo and lumo bounds in each recursive expansion iteration.
References do_output(), info, LOG_AREA_DENSFROMF, and LOG_CAT_INFO.
Referenced by GetDensFromFock::get_dens_from_fock_sparse(), and plot_results().
void PurificationGeneral< MatrixType >::gen_matlab_file_nnz | ( | const char * | filename | ) | const |
Create MATLAB .m file which plots the number of non-zero elements in matrices X_i and X_i^2 in each recursive expansion iteration.
References do_output(), info, LOG_AREA_DENSFROMF, and LOG_CAT_INFO.
Referenced by GetDensFromFock::get_dens_from_fock_sparse(), and plot_results().
void PurificationGeneral< MatrixType >::gen_matlab_file_norm_diff | ( | const char * | filename | ) | const |
Create MATLAB .m file which plots the idempotency error in each recursive expansion iteration.
References do_output(), mat::euclNorm, mat::frobNorm, info, LOG_AREA_DENSFROMF, LOG_CAT_INFO, mat::mixedNorm, normPuriStopCrit, and VecPoly.
Referenced by GetDensFromFock::get_dens_from_fock_sparse(), and plot_results().
void PurificationGeneral< MatrixType >::gen_matlab_file_threshold | ( | const char * | filename | ) | const |
Create MATLAB .m file which plots the actual introduced error after truncation of the matrix X_i in each recursive expansion iteration.
References do_output(), info, LOG_AREA_DENSFROMF, and LOG_CAT_INFO.
Referenced by GetDensFromFock::get_dens_from_fock_sparse(), and plot_results().
void PurificationGeneral< MatrixType >::gen_matlab_file_time | ( | const char * | filename | ) | const |
Create MATLAB .m file which creates a bar plot presenting time spent on various parts of the iteration (such as matrix square and computation of eigenvectors) in each recursive expansion iteration.
References do_output(), EIG_SQUARE_INT, eigenvectors_method, info, LOG_AREA_DENSFROMF, and LOG_CAT_INFO.
Referenced by GetDensFromFock::get_dens_from_fock_sparse(), and plot_results().
|
protected |
Get homo and lumo bounds from traces and norms of Xi-Xi^2.
Used at the end of the recursive expansion. See article SIAM J. Sci. Comput., 36(2), B147–B170.
References estimate_homo_lumo().
Referenced by eigenvalue_bounds_estimation().
|
protected |
References eigvec::compute_rayleigh_quotient(), F, readFromTmpFile(), and writeToTmpFile().
|
inlinestatic |
int PurificationGeneral< MatrixType >::get_est_number_of_puri_iterations | ( | ) |
References info.
int PurificationGeneral< MatrixType >::get_exact_number_of_puri_iterations | ( | ) |
References info.
|
inline |
|
protected |
References EIG_EMPTY, EIG_LANCZOS_INT, EIG_POWER_INT, and eigenvectors_iterative_method.
Referenced by set_eigenvectors_params_basic().
|
protected |
References EIG_EMPTY, EIG_PROJECTION_INT, EIG_SQUARE_INT, and eigenvectors_method.
Referenced by set_eigenvectors_params_basic().
|
protectedvirtual |
Find the best iterations for computing eigenvectors.
The best iteration defined by both a small error in the eigenvector and a small number of iterations of an iterative method.
References apply_poly(), compute_derivative(), find_shifts_every_iter(), get_min_double(), good_iterations_homo, good_iterations_lumo, homo_bounds, lumo_bounds, maxit, SIGMA_HOMO_VEC, SIGMA_LUMO_VEC, and template_blas_fabs().
Referenced by determine_iteration_for_eigenvectors().
|
inline |
|
inlinestatic |
Get largest number.
|
inlinestatic |
Get smallest number.
Referenced by get_iterations_for_lumo_and_homo().
|
inlineprotected |
Get nnz of X in %.
|
inlineprotected |
Get nnz of X in %.
nnzX | Number of nz of X |
Referenced by initialize(), and purification_process().
|
inlineprotected |
Get nnz of X^2 in %.
|
inlineprotected |
|
inline |
|
inline |
void PurificationGeneral< MatrixType >::get_spectrum_bounds | ( | real & | eigmin, |
real & | eigmax ) |
Get spectrum bounds.
Return spectrum bounds for the matrix F. If not computed before, compute them.
References compute_spectrum_bounds(), computed_spectrum_bounds, and spectrum_bounds.
|
virtual |
Set imporatant parameters for the recursive expansion.
[in] | F_ | Effective Hamiltonian matrix. |
[in] | lumo_bounds_ | Bounds for lumo eigenvalue. |
[in] | homo_bounds_ | Bounds for homo eigenvalue. |
[in] | maxit_ | Maximum number of recursive expansion iterations. |
[in] | error_sub_ | Allowed error in invariant subspaces. |
[in] | error_eig_ | Error in eigenvalues (used just in old stopping criterion). |
[in] | use_new_stopping_criterion_ | Set if want to use new stopping criterion. |
[in] | norm_truncation | Truncation norm. |
[in] | norm_stop_crit | Stopping criterion norm. |
[in] | nocc_ | Number of occupied orbitals. |
References additional_iterations, check_stopping_criterion_iter, compute_eigenvectors_in_this_SCF_cycle, do_output(), enable_printf_output(), error_eig, error_sub, mat::euclNorm, mat::frobNorm, get_nnz_X(), homo_bounds_F, info, initialized_flag, LOG_AREA_DENSFROMF, LOG_CAT_INFO, lumo_bounds_F, maxit, mat::mixedNorm, nocc, normPuriStopCrit, normPuriTrunc, NUM_ADDITIONAL_ITERATIONS, set_init_params(), use_new_stopping_criterion, and X.
Referenced by GetDensFromFock::get_dens_from_fock_sparse(), main(), test1(), test2(), test3(), and test4().
|
inlineprotectedvirtual |
Check is function initialize() is already called.
Referenced by prepare_to_purification().
|
protected |
Get eigenvalue bounds for X0.
References do_output(), homo_bounds, homo_bounds_F, homo_bounds_X0, mat::Interval< Treal >::intersect(), LOG_AREA_DENSFROMF, LOG_CAT_INFO, lumo_bounds, lumo_bounds_F, lumo_bounds_X0, and spectrum_bounds.
Referenced by prepare_to_purification().
|
protected |
References do_output(), mat::euclNorm, mat::frobNorm, IterationInfo::it, LOG_AREA_DENSFROMF, LOG_CAT_INFO, mat::mixedNorm, normPuriStopCrit, X, IterationInfo::XmX2_eucl, IterationInfo::XmX2_fro_norm, IterationInfo::XmX2_infty_norm, IterationInfo::XmX2_mixed_norm, and IterationInfo::XmX2_trace.
Referenced by purification_process().
|
protected |
References do_output(), info, LOG_AREA_DENSFROMF, and LOG_CAT_INFO.
Referenced by purification_process().
|
protected |
References do_output(), LOG_AREA_DENSFROMF, LOG_CAT_INFO, Util::TimeMeter::print(), and mat::FileWritable::writeAndReadAll().
Referenced by compute_eigenvectors_without_diagonalization_last_iter_proj(), and purification_process().
|
protectedvirtual |
Prepare data for recursive expansion.
References compute_spectrum_bounds(), compute_X(), computed_spectrum_bounds, do_output(), F, Util::TimeMeter::get_elapsed_wall_seconds(), info, is_initialized(), LOG_AREA_DENSFROMF, LOG_CAT_INFO, map_bounds_to_0_1(), Util::TimeMeter::print(), puri_is_prepared_flag, set_truncation_parameters(), spectrum_bounds, writeToTmpFile(), and X.
Referenced by PurificationStart().
|
protectedvirtual |
Prepare data related to the eigenvectors computations.
References compute_eigenvectors_in_this_SCF_cycle, determine_iteration_for_eigenvectors(), do_output(), EIG_PROJECTION_INT, eigenvectors_method, get_go_back_X_iter_proj_method(), get_jump_over_X_iter_proj_method(), get_number_of_occ_eigenvectors_to_compute(), get_number_of_unocc_eigenvectors_to_compute(), homo_bounds, info, LOG_AREA_DENSFROMF, LOG_CAT_INFO, lumo_bounds, puri_is_prepared(), TOL_OVERLAPPING_BOUNDS, and X.
Referenced by PurificationStart().
|
protected |
References compute_eigenvector(), do_output(), eigValOCC, eigValUNOCC, eigVecOCC, eigVecUNOCC, Util::TimeMeter::get_elapsed_wall_seconds(), info, LOG_AREA_DENSFROMF, LOG_CAT_INFO, Util::TimeMeter::print(), readFromTmpFile(), vec_matrices_Xi, and X.
Referenced by compute_eigenvectors_without_diagonalization_last_iter_proj().
|
inlineprotectedvirtual |
Check is function prepare_to_purification() is already called.
Referenced by prepare_to_purification_eigenvectors(), and purification_process().
|
protectedvirtual |
Run recursive expansion.
References additional_iterations, check_stopping_criterion_iter, compute_eigenvectors_in_this_SCF_cycle, compute_eigenvectors_without_diagonalization(), constant_C, IterationInfo::constantC, do_output(), eucl_acc, IterationInfo::eucl_diff_time, mat::euclNorm, IterationInfo::frob_diff_time, IterationInfo::gap, Util::TimeMeter::get_elapsed_wall_seconds(), get_nnz_X(), get_nnz_Xsq(), IterationInfo::homo_bound_low, IterationInfo::homo_bound_upp, homo_bounds, IterationInfo::inf_diff_time, info, IterationInfo::it, LOG_AREA_DENSFROMF, LOG_CAT_INFO, IterationInfo::lumo_bound_low, IterationInfo::lumo_bound_upp, lumo_bounds, maxit, mixed_acc, IterationInfo::mixed_diff_time, mat::mixedNorm, IterationInfo::nnz_time, IterationInfo::NNZ_X, IterationInfo::NNZ_X2, normPuriStopCrit, IterationInfo::order, output_current_memory_usage(), output_norms_and_traces(), output_separate_total_times(), output_time_WriteAndReadAll(), Util::TimeMeter::print(), puri_is_prepared(), purify_bounds(), IterationInfo::purify_time, purify_X(), save_matrix_now(), save_other_iter_info(), stopping_criterion(), IterationInfo::stopping_criterion_time, IterationInfo::threshold_X, total_subspace_error(), IterationInfo::total_time, IterationInfo::trace_diff_time, IterationInfo::trunc_time, truncate_matrix(), use_new_stopping_criterion, VecPoly, X, IterationInfo::XmX2_eucl, IterationInfo::XmX2_fro_norm, IterationInfo::XmX2_infty_norm, IterationInfo::XmX2_mixed_norm, IterationInfo::XmX2_trace, Xsq, and IterationInfo::Xsquare_time.
Referenced by PurificationStart().
|
virtual |
Start recursive expansion.
References check_eigenvectors_at_the_end(), compute_eigenvectors_in_this_SCF_cycle, compute_eigenvectors_without_diagonalization_last_iter_proj(), do_output(), EIG_PROJECTION_INT, eigenvalue_bounds_estimation(), eigenvectors_method, Util::TimeMeter::get_elapsed_wall_seconds(), info, LOG_AREA_DENSFROMF, LOG_CAT_INFO, prepare_to_purification(), prepare_to_purification_eigenvectors(), Util::TimeMeter::print(), and purification_process().
Referenced by GetDensFromFock::get_dens_from_fock_sparse(), main(), test1(), test2(), test3(), and test4().
|
protectedpure virtual |
Implemented in Purification_sp2< MatrixType >, and Purification_sp2acc< MatrixType >.
Referenced by purification_process().
|
protectedpure virtual |
Implemented in Purification_sp2< MatrixType >, and Purification_sp2acc< MatrixType >.
Referenced by purification_process().
|
protected |
|
protectedpure virtual |
Referenced by check_new_stopping_criterion().
|
protected |
References A, write_matrix_to_mtx(), and X.
Referenced by compute_eigenvector(), and save_matrix_now().
|
protected |
References save_matrix_A_now(), and X.
Referenced by purification_process().
|
protectedpure virtual |
Implemented in Purification_sp2< MatrixType >, and Purification_sp2acc< MatrixType >.
Referenced by purification_process().
|
protected |
References mat::VectorGeneral< Treal, Tvector >::fullvector(), scf_step, and write_vector().
Referenced by compute_eigenvector().
|
inline |
Referenced by GetDensFromFock::get_dens_from_fock_sparse(), test1(), and test4().
void PurificationGeneral< MatrixType >::set_eigenvectors_params | ( | string | eigenvectors_method_, |
string | eigenvectors_iterative_method_, | ||
real | eigensolver_accuracy_, | ||
int | eigensolver_maxiter_, | ||
int | scf_step_, | ||
bool | try_eigv_on_next_iteration_if_fail_ ) |
Set parameters for computing eigenvectors.
References set_eigenvectors_params_basic().
Referenced by GetDensFromFock::get_dens_from_fock_sparse(), main(), test1(), test2(), test3(), and test4().
void PurificationGeneral< MatrixType >::set_eigenvectors_params | ( | string | eigenvectors_method_, |
string | eigenvectors_iterative_method_, | ||
real | eigensolver_accuracy_, | ||
int | eigensolver_maxiter_, | ||
int | scf_step_, | ||
bool | try_eigv_on_next_iteration_if_fail_, | ||
bool | use_prev_vector_as_initial_guess_, | ||
const std::vector< VectorType > & | eigVecOCCRef, | ||
const std::vector< VectorType > & | eigVecUNOCCRef ) |
Set parameters for computing eigenvectors - long version.
References cols, do_output(), eigVecHOMORef, eigVecLUMORef, LOG_AREA_DENSFROMF, LOG_CAT_INFO, number_of_occ_eigenvectors, number_of_unocc_eigenvectors, set_eigenvectors_params_basic(), use_prev_vector_as_initial_guess, and X.
|
protected |
Set parameters for computing eigenvectors.
References do_output(), EIG_EMPTY, eigensolver_accuracy, eigensolver_maxiter, eigenvectors_iterative_method, eigenvectors_iterative_method_str, eigenvectors_method, eigenvectors_method_str, eigVecOCC, eigVecUNOCC, get_int_eig_iter_method(), get_int_eig_method(), go_back_X_iter_proj_method, info, iter_for_homo, iter_for_lumo, jump_over_X_iter_proj_method, LOG_AREA_DENSFROMF, LOG_CAT_INFO, number_of_occ_eigenvectors, number_of_unocc_eigenvectors, scf_step, try_eigv_on_next_iteration_if_fail, and use_prev_vector_as_initial_guess.
Referenced by set_eigenvectors_params(), and set_eigenvectors_params().
|
inline |
Referenced by GetDensFromFock::get_dens_from_fock_sparse().
|
protectedpure virtual |
Implemented in Purification_sp2< MatrixType >, and Purification_sp2acc< MatrixType >.
Referenced by initialize().
|
inline |
Referenced by GetDensFromFock::get_dens_from_fock_sparse().
|
inline |
Referenced by GetDensFromFock::get_dens_from_fock_sparse().
void PurificationGeneral< MatrixType >::set_spectrum_bounds | ( | real | eigmin, |
real | eigmax ) |
Set spectrum bounds.
Used if we know spectrum bounds or want to compute them outside the class.
References computed_spectrum_bounds, and spectrum_bounds.
|
protectedvirtual |
References do_output(), error_per_it, error_sub, estimate_number_of_iterations(), info, LOG_AREA_DENSFROMF, LOG_CAT_INFO, and maxit.
Referenced by prepare_to_purification().
|
protectedvirtual |
Choose stopping criterion and check it.
References check_new_stopping_criterion(), check_standard_stopping_criterion(), check_stopping_criterion_iter, mat::euclNorm, mat::frobNorm, info, IterationInfo::it, mat::mixedNorm, normPuriStopCrit, use_new_stopping_criterion, IterationInfo::XmX2_eucl, IterationInfo::XmX2_fro_norm, IterationInfo::XmX2_mixed_norm, and IterationInfo::XmX2_trace.
Referenced by purification_process().
|
virtual |
Referenced by purification_process().
|
protectedvirtual |
References do_output(), error_per_it, LOG_AREA_DENSFROMF, LOG_CAT_INFO, normPuriTrunc, VecGap, and X.
Referenced by purification_process().
|
inline |
|
protected |
References A.
Referenced by check_homo_lumo_eigenvalues(), compute_eigenvector(), compute_eigenvectors_without_diagonalization(), get_eigenvalue_of_F_from_eigv_of_Xi(), and prepare_to_purification().
|
protected |
Do a few more iterations after convergence.
Referenced by Purification_sp2< MatrixType >::estimate_number_of_iterations(), Purification_sp2acc< MatrixType >::estimate_number_of_iterations(), initialize(), and purification_process().
|
protected |
Iteration when to start to check stopping criterion.
Referenced by Purification_sp2< MatrixType >::estimate_number_of_iterations(), Purification_sp2acc< MatrixType >::estimate_number_of_iterations(), initialize(), purification_process(), Purification_sp2acc< MatrixType >::set_init_params(), Purification_sp2acc< MatrixType >::set_poly(), and stopping_criterion().
|
protected |
Compute homo and lumo eigenpairs in every iteration and save eigenvectors in txt files.
NOTE: if we are computing eigenvector in every iteration, we will save eigenvector computed in the last iteration, and it is most probably the wrong eigenvector.
Referenced by compute_eigenvectors_without_diagonalization(), and compute_eigenvectors_without_diagonalization_last_iter_proj().
|
protected |
|
protected |
Referenced by compute_spectrum_bounds(), get_spectrum_bounds(), prepare_to_purification(), and set_spectrum_bounds().
|
protected |
Asymptotic constant C needed for the new stopping criterion.
Referenced by check_new_stopping_criterion(), and purification_process().
|
protected |
(Eigenvectors) Absolute and relative gap in filter for lumo eigenvalue.
|
protected |
|
protected |
(Eigenvectors) Absolute and relative gap in filter for homo eigenvalue.
|
protected |
|
protected |
Accuracy of the eigenvalue problem solver.
When residual is less then this value, stop.
Referenced by compute_eigenvector(), compute_eigenvectors_without_diagonalization_on_F(), and set_eigenvectors_params_basic().
|
protected |
Maximum number of iterations for eigensolver.
Referenced by compute_eigenvector(), compute_eigenvectors_without_diagonalization_on_F(), and set_eigenvectors_params_basic().
|
protected |
Chosen eigensolver.
Referenced by get_int_eig_iter_method(), and set_eigenvectors_params_basic().
|
protected |
|
protected |
Chosen method for computing eigenvectors.
Referenced by check_homo_lumo_eigenvalues(), compute_eigenvector(), compute_eigenvectors_without_diagonalization(), determine_iteration_for_eigenvectors(), gen_matlab_file_time(), get_int_eig_method(), prepare_to_purification_eigenvectors(), PurificationStart(), and set_eigenvectors_params_basic().
|
protected |
Referenced by set_eigenvectors_params_basic().
|
protected |
Referenced by check_eigenvectors_at_the_end(), and compute_eigenvector().
|
protected |
Referenced by check_eigenvectors_at_the_end(), and compute_eigenvector().
|
protected |
Here we save eigenvalues corresponding to the occupied orbitals.
Referenced by compute_eigenvectors_without_diagonalization(), and projection_method_one_puri_iter().
|
protected |
Here we save eigenvalues corresponding to the unoccupied orbitals.
Referenced by compute_eigenvectors_without_diagonalization(), and projection_method_one_puri_iter().
|
protected |
Referenced by compute_eigenvector(), and set_eigenvectors_params().
|
protected |
Referenced by compute_eigenvector(), and set_eigenvectors_params().
|
protected |
Here we save eigenvectors corresponding to the occupied orbitals.
Referenced by compute_eigenvectors_without_diagonalization(), discard_homo_eigenvector(), projection_method_one_puri_iter(), and set_eigenvectors_params_basic().
|
protected |
Here we save eigenvectors corresponding to the unoccupied orbitals.
Referenced by compute_eigenvectors_without_diagonalization(), discard_lumo_eigenvector(), projection_method_one_puri_iter(), and set_eigenvectors_params_basic().
|
protected |
Error in eigenvalues (used just in old stopping criterion).
Referenced by check_standard_stopping_criterion(), and initialize().
|
protected |
Error allowed in each iteration due to truncation.
Referenced by set_truncation_parameters(), and truncate_matrix().
|
protected |
Allowed error in invariant subspaces.
Referenced by compute_eigenvector(), initialize(), and set_truncation_parameters().
|
protected |
Matrix F.
Needed for computation of eigenvectors.
Referenced by check_homo_lumo_eigenvalues(), compute_eigenvector(), compute_eigenvectors_without_diagonalization_on_F(), get_eigenvalue_of_F_from_eigv_of_Xi(), and prepare_to_purification().
|
protected |
Used on the stopping criterion for estimation of eigenvalues from purification.
Referenced by estimate_homo_lumo(), Purification_sp2< MatrixType >::set_init_params(), and Purification_sp2acc< MatrixType >::set_init_params().
|
protected |
Referenced by set_eigenvectors_params_basic().
|
protected |
Iterations where homo eigenvector can be computed.
Referenced by compute_eigenvectors_without_diagonalization(), and get_iterations_for_lumo_and_homo().
|
protected |
Iterations where homo eigenvector can be computed.
Referenced by compute_eigenvectors_without_diagonalization(), and get_iterations_for_lumo_and_homo().
|
protected |
(1-homo) bounds for Xi in iteration i
Referenced by check_standard_stopping_criterion(), Purification_sp2< MatrixType >::estimate_number_of_iterations(), Purification_sp2acc< MatrixType >::estimate_number_of_iterations(), find_shifts_every_iter(), get_iterations_for_lumo_and_homo(), map_bounds_to_0_1(), prepare_to_purification_eigenvectors(), purification_process(), Purification_sp2< MatrixType >::purify_bounds(), Purification_sp2acc< MatrixType >::purify_bounds(), and Purification_sp2acc< MatrixType >::set_poly().
|
protected |
Initial lumo bounds for F.
Referenced by check_homo_lumo_eigenvalues(), compute_eigenvectors_without_diagonalization_on_F(), initialize(), and map_bounds_to_0_1().
|
protected |
Referenced by eigenvalue_bounds_estimation(), and estimate_homo_lumo().
|
protected |
Initial lumo bounds for X.
Referenced by map_bounds_to_0_1().
PuriInfo PurificationGeneral< MatrixType >::info |
Fill in during purification with useful information.
Referenced by check_eigenvectors_at_the_end(), check_homo_lumo_eigenvalues(), compute_eigenvector(), compute_eigenvectors_without_diagonalization(), compute_eigenvectors_without_diagonalization_last_iter_proj(), discard_homo_eigenvector(), discard_lumo_eigenvector(), eigenvalue_bounds_estimation(), estimate_homo_lumo(), gen_matlab_file_eigs(), gen_matlab_file_nnz(), gen_matlab_file_norm_diff(), gen_matlab_file_threshold(), gen_matlab_file_time(), GetDensFromFock::get_dens_from_fock_sparse(), get_est_number_of_puri_iterations(), get_exact_number_of_puri_iterations(), initialize(), main(), output_separate_total_times(), prepare_to_purification(), prepare_to_purification_eigenvectors(), projection_method_one_puri_iter(), purification_process(), PurificationStart(), Purification_sp2acc< MatrixType >::return_constant_C(), set_eigenvectors_params_basic(), Purification_sp2< MatrixType >::set_init_params(), Purification_sp2acc< MatrixType >::set_init_params(), set_truncation_parameters(), stopping_criterion(), test1(), test2(), test3(), test4(), and total_subspace_error().
|
protected |
Referenced by initialize().
|
protected |
(Eigenvectors) Maximum error introduced in each iteration.
|
protected |
|
protected |
|
protected |
Referenced by set_eigenvectors_params_basic().
|
protected |
Lumo bounds for Xi in iteration i.
Referenced by check_standard_stopping_criterion(), Purification_sp2< MatrixType >::estimate_number_of_iterations(), Purification_sp2acc< MatrixType >::estimate_number_of_iterations(), find_shifts_every_iter(), get_iterations_for_lumo_and_homo(), map_bounds_to_0_1(), prepare_to_purification_eigenvectors(), purification_process(), Purification_sp2< MatrixType >::purify_bounds(), Purification_sp2acc< MatrixType >::purify_bounds(), and Purification_sp2acc< MatrixType >::set_poly().
|
protected |
Initial homo bounds for F.
Referenced by check_homo_lumo_eigenvalues(), compute_eigenvectors_without_diagonalization_on_F(), initialize(), and map_bounds_to_0_1().
|
protected |
Referenced by eigenvalue_bounds_estimation(), and estimate_homo_lumo().
|
protected |
Initial lumo bounds for X.
Referenced by map_bounds_to_0_1().
|
protected |
Maximum number of iterations.
Referenced by Purification_sp2< MatrixType >::estimate_number_of_iterations(), Purification_sp2acc< MatrixType >::estimate_number_of_iterations(), find_shifts_every_iter(), get_iterations_for_lumo_and_homo(), initialize(), purification_process(), and set_truncation_parameters().
|
protected |
Number of occupied orbitals.
Referenced by initialize(), Purification_sp2< MatrixType >::set_poly(), and Purification_sp2acc< MatrixType >::set_poly().
|
protected |
Norm used in the stopping criterion Can be mat::frobNorm, mat::mixedNorm, or mat::euclNorm.
Referenced by eigenvalue_bounds_estimation(), Purification_sp2< MatrixType >::estimate_number_of_iterations(), Purification_sp2acc< MatrixType >::estimate_number_of_iterations(), gen_matlab_file_norm_diff(), initialize(), output_norms_and_traces(), purification_process(), and stopping_criterion().
|
protected |
Norm used for the truncation of matrices.
Can be mat::frobNorm, mat::mixedNorm, or mat::euclNorm.
Referenced by initialize(), and truncate_matrix().
|
protected |
Referenced by set_eigenvectors_params(), and set_eigenvectors_params_basic().
|
protected |
Referenced by set_eigenvectors_params(), and set_eigenvectors_params_basic().
|
protected |
Referenced by prepare_to_purification().
|
protected |
Iterations where homo eigenvector is actually computed.
Referenced by compute_eigenvector().
|
protected |
Iterations where lumo eigenvector is actually computed.
Referenced by compute_eigenvector().
|
protected |
Referenced by save_selected_eigenvector_to_file(), and set_eigenvectors_params_basic().
|
protected |
|
protected |
(Eigenvectors) Approximation of shifts in each iteration.
Referenced by compute_eigenvectors_without_diagonalization(), find_shifts_every_iter(), and get_iterations_for_lumo_and_homo().
|
protected |
Outer bounds for the whole spectrum of F/Xi.
Referenced by compute_spectrum_bounds(), compute_X(), estimate_homo_lumo(), get_spectrum_bounds(), map_bounds_to_0_1(), prepare_to_purification(), and set_spectrum_bounds().
|
protected |
Referenced by check_homo_lumo_eigenvalues(), and set_eigenvectors_params_basic().
|
protected |
True for new stopping criterion.
Referenced by initialize(), purification_process(), and stopping_criterion().
|
protected |
Referenced by compute_eigenvector(), set_eigenvectors_params(), and set_eigenvectors_params_basic().
|
protected |
Save matrices Xi in each iteration (if used projection method for computing eigenvectors).
If ergo input file mat.write_to_file=1 than matrices are saved to the file to save memory.
Referenced by compute_eigenvectors_without_diagonalization(), and projection_method_one_puri_iter().
|
protected |
Gap computed using inner homo and lumo bounds on each iteration.
Referenced by Purification_sp2< MatrixType >::estimate_number_of_iterations(), Purification_sp2acc< MatrixType >::estimate_number_of_iterations(), Purification_sp2< MatrixType >::save_other_iter_info(), Purification_sp2acc< MatrixType >::save_other_iter_info(), total_subspace_error(), and truncate_matrix().
|
protected |
Polynomials computed in the function estimated_number_of_iterations() VecPoly[i] = 1 if we use X=X^2 VecPoly[i] = 0 if we use X=2X-X^2 (or their accelerated versions)
Referenced by check_new_stopping_criterion(), Purification_sp2< MatrixType >::estimate_number_of_iterations(), Purification_sp2acc< MatrixType >::estimate_number_of_iterations(), gen_matlab_file_norm_diff(), Purification_sp2< MatrixType >::get_poly(), Purification_sp2acc< MatrixType >::get_poly(), purification_process(), Purification_sp2< MatrixType >::purify_bounds(), Purification_sp2acc< MatrixType >::purify_bounds(), Purification_sp2< MatrixType >::save_other_iter_info(), Purification_sp2acc< MatrixType >::save_other_iter_info(), Purification_sp2< MatrixType >::set_poly(), and Purification_sp2acc< MatrixType >::set_poly().
MatrixType PurificationGeneral< MatrixType >::X |
Matrix X.
Referenced by compute_eigenvector(), compute_eigenvectors_without_diagonalization(), compute_spectrum_bounds(), compute_X(), GetDensFromFock::get_dens_from_fock_sparse(), initialize(), main(), output_norms_and_traces(), prepare_to_purification(), prepare_to_purification_eigenvectors(), projection_method_one_puri_iter(), purification_process(), Purification_sp2< MatrixType >::purify_X(), Purification_sp2acc< MatrixType >::purify_X(), save_matrix_A_now(), save_matrix_now(), set_eigenvectors_params(), Purification_sp2< MatrixType >::set_poly(), Purification_sp2acc< MatrixType >::set_poly(), test1(), test4(), and truncate_matrix().
MatrixType PurificationGeneral< MatrixType >::Xsq |
Matrix X^2.
Referenced by compute_eigenvectors_without_diagonalization(), compute_eigenvectors_without_diagonalization_last_iter_proj(), purification_process(), Purification_sp2< MatrixType >::purify_X(), Purification_sp2acc< MatrixType >::purify_X(), Purification_sp2< MatrixType >::set_poly(), and Purification_sp2acc< MatrixType >::set_poly().