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_, int use_new_stopping_criterion_, NormType norm_truncation, NormType norm_stop_crit, int nocc_) |
Set imporatant parameters for the recursive expansion. More... | |
virtual bool | is_initialized () const |
Check is function initialize() is already called. More... | |
virtual bool | puri_is_prepared () const |
Check is function prepare_to_purification() is already called. More... | |
virtual void | PurificationStart () |
Start recursive expansion. More... | |
virtual void | prepare_to_purification () |
Prepare data for recursive expansion. More... | |
virtual void | purification_process () |
Run recursive expansion. More... | |
virtual void | eigenvalue_bounds_estimation () |
Estimate eigenvalues near homo-lumo gap. More... | |
virtual | ~PurificationGeneral () |
virtual void | clear () |
Clear all matrices in the class. More... | |
void | set_spectrum_bounds (real eigmin, real eigmax) |
Set spectrum bounds. More... | |
void | get_spectrum_bounds (real &eigmin, real &eigmax) |
Get spectrum bounds. More... | |
int | get_exact_number_of_puri_iterations () |
int | get_est_number_of_puri_iterations () |
virtual real | total_subspace_error (int it) |
void | gen_matlab_file_norm_diff (const char *filename) const |
Create MATLAB .m file which plots the idempotency error in each recursive expansion iteration. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
void | gen_matlab_file_cond_num (const char *filename) const |
Create MATLAB .m file which plots a condition number of a problem of computing the density matrix in each recursive expansion iteration. More... | |
void | gen_python_file_nnz (const char *filename) const |
Create PYTHON .py file which plots number of non-zero elements in matrices X_i and X_i^2 in each recursive expansion iteration. More... | |
void | set_eigenvectors_params (string eigenvectors_method_, string eigenvectors_iterative_method_, real eigensolver_accuracy_, int eigensolver_maxiter_, int scf_step_, int use_prev_vector_as_initial_guess_, int try_eigv_on_next_iteration_if_fail_, VectorType *eigVecLUMO_, VectorType *eigVecHOMO_) |
Set parameters for computing eigenvectors. More... | |
void | set_compute_eigenvectors_in_each_iteration () |
void | unset_compute_eigenvectors_in_each_iteration () |
void | compute_eigenvectors_without_diagonalization_on_F (const MatrixType &F, int eigensolver_maxiter_for_F) |
Static Public Member Functions | |
static real | get_epsilon () |
Get machine epsilon. More... | |
static real | get_max_double () |
Get largest number. More... | |
static real | get_min_double () |
Get smallest number. More... | |
Public Attributes | |
PuriInfo | info |
Fill in during purification with useful information. More... | |
MatrixType | X |
Matrix X. More... | |
MatrixType | Xsq |
Matrix X^2. More... | |
Protected Member Functions | |
void | save_matrix_now (string str) |
void | compute_spectrum_bounds () |
Compute spectrum bounds. More... | |
void | compute_X () |
Get matrix X0 by mapping spectrum of F into [0,1] in reverse order. More... | |
void | map_bounds_to_0_1 () |
Get eigenvalue bounds for X0. More... | |
virtual void | check_standard_stopping_criterion (const real XmX2_norm, int &stop) |
Check stopping criterion (obsolete). More... | |
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. More... | |
virtual void | stopping_criterion (IterationInfo &iter_info, int &stop, real &estim_order) |
Choose stopping criterion and check it. More... | |
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. More... | |
void | compute_eigenvectors_without_diagonalization_last_iter_proj () |
void | compute_eigenvector (MatrixType const &M, VectorType *eigVecHOMOorLUMO, int it, bool is_homo) |
double | get_nnz_X (size_t &nnzX) |
Get nnz of X in %. More... | |
double | get_nnz_X () |
Get nnz of X in %. More... | |
double | get_nnz_Xsq (size_t &nnzXsq) |
Get nnz of X^2 in %. More... | |
double | get_nnz_Xsq () |
Get nnz of X^2 in %. More... | |
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. More... | |
void | get_frob_norm_est (const VectorTypeReal &XmX2_norm_frob, const std::vector< real > &h_in, const std::vector< real > &l_in, VectorTypeReal &YmY2_norm_frob_est) |
void | get_eigenvalue_estimates (const VectorTypeReal &XmX2_norm_mixed, const VectorTypeReal &XmX2_norm_frob, const VectorTypeReal &XmX2_trace) |
void | propagate_values_in_each_iter (real value_unocc, real value_occ, VectorTypeReal &out_unocc, VectorTypeReal &out_occ, int nmax) |
void | determine_iteration_for_eigenvectors () |
void | get_iterations_for_lumo_and_homo (int &chosen_iter_lumo, int &chosen_iter_homo) |
Find the best iterations for computing eigenvectors. More... | |
void | check_eigenvectors_at_the_end () |
void | discard_homo_eigenvector () |
void | discard_lumo_eigenvector () |
void | output_norms_and_traces (IterationInfo &iter_info) const |
void | get_interval_with_lambda (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_eigenvectors_to_file (bool is_homo, bool is_lumo, int it) |
void | set_truncation_parameters () |
void | find_truncation_thresh_every_iter () |
void | find_shifts_every_iter () |
/brief Find shifts sigma which will be used for construction of the filtering polynomial for computing eigenvectors. More... | |
void | find_eig_gaps_every_iter () |
void | writeToTmpFile (MatrixType &A) const |
void | readFromTmpFile (MatrixType &A) const |
virtual void | set_init_params ()=0 |
virtual void | truncate_matrix (real &thresh, int it)=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 void | apply_poly_to_eigs (const int it, real &homo, real &lumo)=0 |
virtual real | compute_derivative (const int it, real x, real &DDf)=0 |
Protected Attributes | |
MatrixType | F |
Matrix F. More... | |
MatrixType | X_homo |
MatrixType | X_lumo |
Save matrix Xi in certain iterations for computing eigenvectors (projection method). More... | |
bool | initialized_flag |
bool | puri_is_prepared_flag |
int | use_new_stopping_criterion |
True for new stopping criterion. More... | |
int | additional_iterations |
Do a few more iterations after convergence. More... | |
int | maxit |
Maximum number of iterations. More... | |
int | check_stopping_criterion_iter |
Iteration when to start to check stopping criterion. More... | |
int | nocc |
Number of occupied orbitals. More... | |
NormType | normPuriTrunc |
Norm used for the truncation of matrices. More... | |
NormType | normPuriStopCrit |
Norm used in the stopping criterion Can be mat::frobNorm, mat::mixedNorm, or mat::euclNorm. More... | |
real | error_sub |
Allowed error in invariant subspaces. More... | |
real | error_eig |
Error in eigenvalues (used just in old stopping criterion). More... | |
real | error_per_it |
Error allowed in each iteration due to truncation. More... | |
real | constant_C |
Asymptotic constant C needed for the new stopping criterion. More... | |
real | gammaStopEstim |
Used on the stopping criterion for estimation of eigenvalues from purification. More... | |
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) More... | |
VectorTypeReal | VecGap |
Gap computed using inner homo and lumo bounds on each iteration. More... | |
VectorTypeReal | ITER_ERROR_VEC |
(Eigenvectors) Maximum error introduced in each iteration. More... | |
VectorTypeReal | SIGMA_HOMO_VEC |
VectorTypeReal | SIGMA_LUMO_VEC |
(Eigenvectors) Approximation of shifts in each iteration. More... | |
VectorTypeReal | EIG_ABS_GAP_LUMO_VEC |
VectorTypeReal | EIG_ABS_GAP_HOMO_VEC |
(Eigenvectors) Absolute and relative gap in filter for lumo eigenvalue. More... | |
VectorTypeReal | EIG_REL_GAP_LUMO_VEC |
VectorTypeReal | EIG_REL_GAP_HOMO_VEC |
(Eigenvectors) Absolute and relative gap in filter for homo eigenvalue. More... | |
int | number_of_eigenvalues |
IntervalType | homo_bounds |
(1-homo) bounds for Xi in iteration i More... | |
IntervalType | lumo_bounds |
Lumo bounds for Xi in iteration i. More... | |
IntervalType | homo_bounds_X0 |
Initial lumo bounds for X. More... | |
IntervalType | lumo_bounds_X0 |
Initial lumo bounds for X. More... | |
IntervalType | homo_bounds_F |
Initial lumo bounds for F. More... | |
IntervalType | lumo_bounds_F |
Initial homo bounds for F. More... | |
IntervalType | homo_bounds_F_new |
IntervalType | lumo_bounds_F_new |
IntervalType | spectrum_bounds |
Outer bounds for the whole spectrum of F/Xi. More... | |
bool | computed_spectrum_bounds |
int | eigenvectors_method |
Chosen method for computing eigenvectors. More... | |
int | eigenvectors_iterative_method |
Chosen eigensolver. More... | |
real | eigensolver_accuracy |
int | eigensolver_maxiter |
string | eigenvectors_method_str |
string | eigenvectors_iterative_method_str |
int | use_prev_vector_as_initial_guess |
bool | compute_eigenvectors_in_this_SCF_cycle |
bool | try_eigv_on_next_iteration_if_fail |
VectorType * | eigVecLUMO |
VectorType * | eigVecHOMO |
VectorType | eigVecLUMORef |
VectorType | eigVecHOMORef |
real | eigValLUMO |
real | eigValHOMO |
int | iter_for_homo |
int | iter_for_lumo |
VectorTypeInt | good_iterations_homo |
Iterations where homo eigenvector can be computed. More... | |
VectorTypeInt | good_iterations_lumo |
Iterations where homo eigenvector can be computed. More... | |
VectorTypeInt | really_good_iterations_homo |
Iterations where homo eigenvector is actually computed. More... | |
VectorTypeInt | really_good_iterations_lumo |
Iterations where lumo eigenvector is actually computed. More... | |
int | scf_step |
bool | compute_eigenvectors_in_each_iteration |
Compute homo and lumo eigenpairs in every iteration and save eigenvectors in txt files. More... | |
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 |
References PurificationGeneral< MatrixType >::compute_eigenvectors_in_each_iteration, PurificationGeneral< MatrixType >::computed_spectrum_bounds, PurificationGeneral< MatrixType >::eigVecHOMO, PurificationGeneral< MatrixType >::eigVecLUMO, PurificationGeneral< MatrixType >::initialize(), PurificationGeneral< MatrixType >::initialized_flag, PurificationGeneral< MatrixType >::number_of_eigenvalues, and PurificationGeneral< MatrixType >::puri_is_prepared_flag.
|
inlinevirtual |
|
protectedpure virtual |
Implemented in Purification_sp2acc< MatrixType >, and Purification_sp2< MatrixType >.
Referenced by PurificationGeneral< MatrixType >::estimate_homo_lumo(), and PurificationGeneral< MatrixType >::get_nnz_Xsq().
|
protectedpure virtual |
Implemented in Purification_sp2acc< MatrixType >, and Purification_sp2< MatrixType >.
Referenced by PurificationGeneral< MatrixType >::find_eig_gaps_every_iter(), PurificationGeneral< MatrixType >::find_shifts_every_iter(), PurificationGeneral< MatrixType >::get_iterations_for_lumo_and_homo(), and PurificationGeneral< MatrixType >::get_nnz_Xsq().
|
protectedpure virtual |
|
protected |
References PurificationGeneral< MatrixType >::compute_eigenvectors_in_this_SCF_cycle, PuriInfo::converged, PurificationGeneral< MatrixType >::discard_homo_eigenvector(), PurificationGeneral< MatrixType >::discard_lumo_eigenvector(), do_output(), PuriInfo::eigValHOMO, PurificationGeneral< MatrixType >::eigValHOMO, PuriInfo::eigValLUMO, PurificationGeneral< MatrixType >::eigValLUMO, PurificationGeneral< MatrixType >::eigVecHOMO, PurificationGeneral< MatrixType >::eigVecLUMO, PuriInfo::homo_eigenvector_is_computed, PuriInfo::homo_estim_low_F, PuriInfo::homo_estim_upp_F, PurificationGeneral< MatrixType >::info, mat::VectorGeneral< Treal, Tvector >::is_empty(), PurificationGeneral< MatrixType >::iter_for_homo, PurificationGeneral< MatrixType >::iter_for_lumo, LOG_AREA_DENSFROMF, LOG_CAT_INFO, LOG_CAT_WARNING, PuriInfo::lumo_eigenvector_is_computed, PuriInfo::lumo_estim_low_F, PuriInfo::lumo_estim_upp_F, THRESHOLD_EIG_TOLERANCE, PuriInfo::total_it, and UNIT_one_eV.
Referenced by PurificationGeneral< MatrixType >::get_nnz_Xsq(), and PurificationGeneral< MatrixType >::PurificationStart().
|
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 PurificationGeneral< MatrixType >::constant_C, do_output(), PurificationGeneral< MatrixType >::get_epsilon(), LOG_AREA_DENSFROMF, LOG_CAT_INFO, ORDER, PurificationGeneral< MatrixType >::return_constant_C(), template_blas_log(), template_blas_pow(), template_blas_sqrt(), and PurificationGeneral< MatrixType >::VecPoly.
Referenced by PurificationGeneral< MatrixType >::stopping_criterion().
|
protectedvirtual |
Check stopping criterion (obsolete).
Use stopping criterion based on user defined threshold values.
References do_output(), PurificationGeneral< MatrixType >::error_eig, PurificationGeneral< MatrixType >::homo_bounds, LOG_AREA_DENSFROMF, LOG_CAT_INFO, PurificationGeneral< MatrixType >::lumo_bounds, and mat::Interval< Treal >::upp().
Referenced by PurificationGeneral< MatrixType >::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.
References PurificationGeneral< MatrixType >::get_est_number_of_puri_iterations(), PurificationGeneral< MatrixType >::get_exact_number_of_puri_iterations(), PurificationGeneral< MatrixType >::get_spectrum_bounds(), PurificationGeneral< MatrixType >::set_spectrum_bounds(), PurificationGeneral< MatrixType >::total_subspace_error(), PurificationGeneral< MatrixType >::X, and PurificationGeneral< MatrixType >::Xsq.
Referenced by GetDensFromFock::get_dens_from_fock_sparse(), and main().
|
protectedpure virtual |
|
protected |
References PurificationGeneral< MatrixType >::compute_eigenvectors_in_each_iteration, eigvec::computeEigenvectors(), do_output(), PurificationGeneral< MatrixType >::eigensolver_accuracy, PurificationGeneral< MatrixType >::eigensolver_maxiter, PurificationGeneral< MatrixType >::eigenvectors_iterative_method_str, PurificationGeneral< MatrixType >::eigValHOMO, PurificationGeneral< MatrixType >::eigValLUMO, PurificationGeneral< MatrixType >::eigVecHOMO, PurificationGeneral< MatrixType >::eigVecHOMORef, PurificationGeneral< MatrixType >::eigVecLUMO, PurificationGeneral< MatrixType >::eigVecLUMORef, Util::TimeMeter::get_elapsed_wall_seconds(), PurificationGeneral< MatrixType >::get_interval_with_lambda(), PuriInfo::homo_eigensolver_iter, PuriInfo::homo_eigensolver_time, PuriInfo::homo_eigenvector_is_computed, PuriInfo::homo_eigenvector_is_computed_in_iter, PurificationGeneral< MatrixType >::info, mat::VectorGeneral< Treal, Tvector >::is_empty(), LOG_AREA_DENSFROMF, LOG_CAT_INFO, PuriInfo::lumo_eigensolver_iter, PuriInfo::lumo_eigensolver_time, PuriInfo::lumo_eigenvector_is_computed, PuriInfo::lumo_eigenvector_is_computed_in_iter, PurificationGeneral< MatrixType >::number_of_eigenvalues, Util::TimeMeter::print(), PurificationGeneral< MatrixType >::really_good_iterations_homo, PurificationGeneral< MatrixType >::really_good_iterations_lumo, rows, PurificationGeneral< MatrixType >::save_eigenvectors_to_file(), PurificationGeneral< MatrixType >::use_prev_vector_as_initial_guess, PurificationGeneral< MatrixType >::writeToTmpFile(), and PurificationGeneral< MatrixType >::X.
Referenced by PurificationGeneral< MatrixType >::compute_eigenvectors_without_diagonalization(), PurificationGeneral< MatrixType >::compute_eigenvectors_without_diagonalization_last_iter_proj(), and PurificationGeneral< MatrixType >::find_eig_gaps_every_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 PurificationGeneral< MatrixType >::compute_eigenvector(), PurificationGeneral< MatrixType >::compute_eigenvectors_in_each_iteration, do_output(), EIG_SQUARE_INT, PurificationGeneral< MatrixType >::eigenvectors_method, PurificationGeneral< MatrixType >::eigVecHOMO, PurificationGeneral< MatrixType >::eigVecLUMO, Util::TimeMeter::get_elapsed_wall_seconds(), PurificationGeneral< MatrixType >::good_iterations_homo, PurificationGeneral< MatrixType >::good_iterations_lumo, IterationInfo::homo_eig_solver_time, PuriInfo::homo_eigenvector_is_computed, PurificationGeneral< MatrixType >::info, PurificationGeneral< MatrixType >::iter_for_homo, PurificationGeneral< MatrixType >::iter_for_lumo, LOG_AREA_DENSFROMF, LOG_CAT_INFO, IterationInfo::lumo_eig_solver_time, PuriInfo::lumo_eigenvector_is_computed, IterationInfo::orbital_homo_time, IterationInfo::orbital_lumo_time, Util::TimeMeter::print(), PurificationGeneral< MatrixType >::readFromTmpFile(), PurificationGeneral< MatrixType >::save_matrix_now(), PurificationGeneral< MatrixType >::SIGMA_HOMO_VEC, PurificationGeneral< MatrixType >::SIGMA_LUMO_VEC, PurificationGeneral< MatrixType >::writeToTmpFile(), PurificationGeneral< MatrixType >::X, PurificationGeneral< MatrixType >::X_homo, PurificationGeneral< MatrixType >::X_lumo, and PurificationGeneral< MatrixType >::Xsq.
Referenced by PurificationGeneral< MatrixType >::purification_process(), and PurificationGeneral< MatrixType >::save_matrix_now().
|
protected |
References cols, PurificationGeneral< MatrixType >::compute_eigenvector(), PurificationGeneral< MatrixType >::compute_eigenvectors_in_each_iteration, do_output(), PurificationGeneral< MatrixType >::eigVecHOMO, PurificationGeneral< MatrixType >::eigVecLUMO, Util::TimeMeter::get_elapsed_wall_seconds(), PurificationGeneral< MatrixType >::info, PurificationGeneral< MatrixType >::iter_for_homo, PurificationGeneral< MatrixType >::iter_for_lumo, PuriInfo::Iterations, LOG_AREA_DENSFROMF, LOG_CAT_INFO, output_current_memory_usage(), Util::TimeMeter::print(), PurificationGeneral< MatrixType >::readFromTmpFile(), rows, PuriInfo::total_it, mat::FileWritable::writeAndReadAll(), PurificationGeneral< MatrixType >::X, PurificationGeneral< MatrixType >::X_homo, PurificationGeneral< MatrixType >::X_lumo, and PurificationGeneral< MatrixType >::Xsq.
Referenced by PurificationGeneral< MatrixType >::PurificationStart(), and PurificationGeneral< MatrixType >::save_matrix_now().
void PurificationGeneral< MatrixType >::compute_eigenvectors_without_diagonalization_on_F | ( | const MatrixType & | F, |
int | eigensolver_maxiter_for_F | ||
) |
References eigvec::computeEigenvectors(), PurificationGeneral< MatrixType >::eigensolver_accuracy, PurificationGeneral< MatrixType >::eigenvectors_iterative_method_str, PurificationGeneral< MatrixType >::F, PurificationGeneral< MatrixType >::homo_bounds_F, mat::Interval< Treal >::low(), PurificationGeneral< MatrixType >::lumo_bounds_F, rows, and mat::Interval< Treal >::upp().
Referenced by GetDensFromFock::get_dens_from_fock_sparse(), main(), PurificationGeneral< MatrixType >::save_matrix_now(), and PurificationGeneral< MatrixType >::unset_compute_eigenvectors_in_each_iteration().
|
protected |
Compute spectrum bounds.
References PurificationGeneral< MatrixType >::computed_spectrum_bounds, do_output(), PurificationGeneral< MatrixType >::get_epsilon(), LOG_AREA_DENSFROMF, LOG_CAT_INFO, Util::TimeMeter::print(), PurificationGeneral< MatrixType >::spectrum_bounds, template_blas_sqrt(), and PurificationGeneral< MatrixType >::X.
Referenced by PurificationGeneral< MatrixType >::get_spectrum_bounds(), and PurificationGeneral< MatrixType >::prepare_to_purification().
|
protected |
Get matrix X0 by mapping spectrum of F into [0,1] in reverse order.
References do_output(), mat::Interval< Treal >::empty(), LOG_AREA_DENSFROMF, LOG_CAT_INFO, mat::Interval< Treal >::low(), PurificationGeneral< MatrixType >::spectrum_bounds, mat::Interval< Treal >::upp(), and PurificationGeneral< MatrixType >::X.
Referenced by PurificationGeneral< MatrixType >::prepare_to_purification().
|
protected |
References do_output(), EIG_PROJECTION_INT, EIG_SQUARE_INT, PurificationGeneral< MatrixType >::eigenvectors_method, PurificationGeneral< MatrixType >::get_iterations_for_lumo_and_homo(), PurificationGeneral< MatrixType >::iter_for_homo, PurificationGeneral< MatrixType >::iter_for_lumo, LOG_AREA_DENSFROMF, and LOG_CAT_INFO.
Referenced by PurificationGeneral< MatrixType >::get_nnz_Xsq(), and PurificationGeneral< MatrixType >::prepare_to_purification().
|
protected |
References mat::VectorGeneral< Treal, Tvector >::clear_structure(), PuriInfo::eigValHOMO, PurificationGeneral< MatrixType >::eigVecHOMO, PuriInfo::homo_eigenvector_is_computed, PurificationGeneral< MatrixType >::info, and mat::VectorGeneral< Treal, Tvector >::is_empty().
Referenced by PurificationGeneral< MatrixType >::check_eigenvectors_at_the_end(), and PurificationGeneral< MatrixType >::get_nnz_Xsq().
|
protected |
References mat::VectorGeneral< Treal, Tvector >::clear_structure(), PuriInfo::eigValLUMO, PurificationGeneral< MatrixType >::eigVecLUMO, PurificationGeneral< MatrixType >::info, mat::VectorGeneral< Treal, Tvector >::is_empty(), and PuriInfo::lumo_eigenvector_is_computed.
Referenced by PurificationGeneral< MatrixType >::check_eigenvectors_at_the_end(), and PurificationGeneral< MatrixType >::get_nnz_Xsq().
|
virtual |
Estimate eigenvalues near homo-lumo gap.
References PuriInfo::converged, do_output(), PurificationGeneral< MatrixType >::get_eigenvalue_estimates(), PuriInfo::get_vec_frob_norms(), PuriInfo::get_vec_mixed_norms(), PuriInfo::get_vec_traces(), PurificationGeneral< MatrixType >::homo_bounds_F_new, PuriInfo::homo_estim_low_F, PuriInfo::homo_estim_upp_F, PurificationGeneral< MatrixType >::info, LOG_AREA_DENSFROMF, LOG_CAT_INFO, mat::Interval< Treal >::low(), PurificationGeneral< MatrixType >::lumo_bounds_F_new, PuriInfo::lumo_estim_low_F, PuriInfo::lumo_estim_upp_F, mat::mixedNorm, PurificationGeneral< MatrixType >::normPuriStopCrit, and mat::Interval< Treal >::upp().
Referenced by PurificationGeneral< MatrixType >::puri_is_prepared(), and PurificationGeneral< MatrixType >::PurificationStart().
|
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 PuriInfo::additional_iterations, PurificationGeneral< MatrixType >::apply_inverse_poly_vector(), PurificationGeneral< MatrixType >::gammaStopEstim, PurificationGeneral< MatrixType >::get_epsilon(), PurificationGeneral< MatrixType >::homo_bounds_F_new, PurificationGeneral< MatrixType >::info, mat::Interval< Treal >::low(), PurificationGeneral< MatrixType >::lumo_bounds_F_new, min(), PurificationGeneral< MatrixType >::spectrum_bounds, template_blas_sqrt(), PuriInfo::total_it, and mat::Interval< Treal >::upp().
Referenced by PurificationGeneral< MatrixType >::get_eigenvalue_estimates(), and PurificationGeneral< MatrixType >::get_nnz_Xsq().
|
protectedpure virtual |
Implemented in Purification_sp2acc< MatrixType >, and Purification_sp2< MatrixType >.
Referenced by PurificationGeneral< MatrixType >::get_nnz_Xsq(), and PurificationGeneral< MatrixType >::set_truncation_parameters().
|
protected |
References PurificationGeneral< MatrixType >::apply_poly(), PurificationGeneral< MatrixType >::compute_eigenvector(), PurificationGeneral< MatrixType >::EIG_ABS_GAP_HOMO_VEC, PurificationGeneral< MatrixType >::EIG_ABS_GAP_LUMO_VEC, PurificationGeneral< MatrixType >::EIG_REL_GAP_HOMO_VEC, PurificationGeneral< MatrixType >::EIG_REL_GAP_LUMO_VEC, PurificationGeneral< MatrixType >::homo_bounds_X0, mat::Interval< Treal >::low(), PurificationGeneral< MatrixType >::lumo_bounds_X0, max, PurificationGeneral< MatrixType >::maxit, min(), PurificationGeneral< MatrixType >::SIGMA_HOMO_VEC, PurificationGeneral< MatrixType >::SIGMA_LUMO_VEC, mat::Interval< Treal >::upp(), and mat::zero.
Referenced by PurificationGeneral< MatrixType >::get_nnz_Xsq().
|
protected |
/brief Find shifts sigma which will be used for construction of the filtering polynomial for computing eigenvectors.
References PurificationGeneral< MatrixType >::apply_poly(), PurificationGeneral< MatrixType >::homo_bounds, mat::Interval< Treal >::low(), PurificationGeneral< MatrixType >::lumo_bounds, PurificationGeneral< MatrixType >::maxit, PurificationGeneral< MatrixType >::SIGMA_HOMO_VEC, PurificationGeneral< MatrixType >::SIGMA_LUMO_VEC, and mat::Interval< Treal >::upp().
Referenced by PurificationGeneral< MatrixType >::get_iterations_for_lumo_and_homo(), and PurificationGeneral< MatrixType >::get_nnz_Xsq().
|
protected |
References PurificationGeneral< MatrixType >::error_per_it, PurificationGeneral< MatrixType >::get_epsilon(), PurificationGeneral< MatrixType >::ITER_ERROR_VEC, PurificationGeneral< MatrixType >::maxit, and PurificationGeneral< MatrixType >::VecGap.
Referenced by PurificationGeneral< MatrixType >::get_nnz_Xsq().
void PurificationGeneral< MatrixType >::gen_matlab_file_cond_num | ( | const char * | filename | ) | const |
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.
References PuriInfo::additional_iterations, do_output(), PurificationGeneral< MatrixType >::info, PuriInfo::Iterations, LOG_AREA_DENSFROMF, LOG_CAT_INFO, and PuriInfo::total_it.
Referenced by PurificationGeneral< MatrixType >::get_min_double().
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 PuriInfo::additional_iterations, do_output(), PurificationGeneral< MatrixType >::info, PuriInfo::Iterations, LOG_AREA_DENSFROMF, LOG_CAT_INFO, and PuriInfo::total_it.
Referenced by GetDensFromFock::get_dens_from_fock_sparse(), and PurificationGeneral< MatrixType >::get_min_double().
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 PuriInfo::additional_iterations, do_output(), PurificationGeneral< MatrixType >::info, PuriInfo::Iterations, LOG_AREA_DENSFROMF, LOG_CAT_INFO, and PuriInfo::total_it.
Referenced by GetDensFromFock::get_dens_from_fock_sparse(), and PurificationGeneral< MatrixType >::get_min_double().
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 PuriInfo::additional_iterations, do_output(), mat::euclNorm, mat::frobNorm, PurificationGeneral< MatrixType >::info, PuriInfo::Iterations, LOG_AREA_DENSFROMF, LOG_CAT_INFO, mat::mixedNorm, PurificationGeneral< MatrixType >::normPuriStopCrit, PuriInfo::total_it, and PurificationGeneral< MatrixType >::VecPoly.
Referenced by GetDensFromFock::get_dens_from_fock_sparse(), and PurificationGeneral< MatrixType >::get_min_double().
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 PuriInfo::additional_iterations, do_output(), PurificationGeneral< MatrixType >::info, PuriInfo::Iterations, LOG_AREA_DENSFROMF, LOG_CAT_INFO, and PuriInfo::total_it.
Referenced by GetDensFromFock::get_dens_from_fock_sparse(), and PurificationGeneral< MatrixType >::get_min_double().
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 PuriInfo::compute_eigenvectors_in_this_SCF_cycle, do_output(), EIG_SQUARE_INT, PurificationGeneral< MatrixType >::eigenvectors_method, PurificationGeneral< MatrixType >::info, PuriInfo::Iterations, LOG_AREA_DENSFROMF, LOG_CAT_INFO, and PuriInfo::total_it.
Referenced by GetDensFromFock::get_dens_from_fock_sparse(), and PurificationGeneral< MatrixType >::get_min_double().
void PurificationGeneral< MatrixType >::gen_python_file_nnz | ( | const char * | filename | ) | const |
Create PYTHON .py file which plots number of non-zero elements in matrices X_i and X_i^2 in each recursive expansion iteration.
References PuriInfo::additional_iterations, do_output(), PurificationGeneral< MatrixType >::info, PuriInfo::Iterations, LOG_AREA_DENSFROMF, LOG_CAT_INFO, and PuriInfo::total_it.
Referenced by PurificationGeneral< MatrixType >::get_min_double().
|
protected |
References PurificationGeneral< MatrixType >::estimate_homo_lumo(), PurificationGeneral< MatrixType >::get_exact_number_of_puri_iterations(), PurificationGeneral< MatrixType >::get_frob_norm_est(), PurificationGeneral< MatrixType >::homo_bounds_F_new, mat::Interval< Treal >::low(), PurificationGeneral< MatrixType >::lumo_bounds_F_new, PurificationGeneral< MatrixType >::propagate_values_in_each_iter(), PurificationGeneral< MatrixType >::spectrum_bounds, and mat::Interval< Treal >::upp().
Referenced by PurificationGeneral< MatrixType >::eigenvalue_bounds_estimation(), and PurificationGeneral< MatrixType >::get_nnz_Xsq().
|
protected |
|
inlinestatic |
Get machine epsilon.
Referenced by PurificationGeneral< MatrixType >::check_new_stopping_criterion(), PurificationGeneral< MatrixType >::compute_spectrum_bounds(), PurificationGeneral< MatrixType >::estimate_homo_lumo(), Purification_sp2< MatrixType >::estimate_number_of_iterations(), Purification_sp2acc< MatrixType >::estimate_number_of_iterations(), and PurificationGeneral< MatrixType >::find_truncation_thresh_every_iter().
int PurificationGeneral< MatrixType >::get_est_number_of_puri_iterations | ( | ) |
References PuriInfo::estim_total_it, and PurificationGeneral< MatrixType >::info.
Referenced by PurificationGeneral< MatrixType >::clear().
int PurificationGeneral< MatrixType >::get_exact_number_of_puri_iterations | ( | ) |
|
protected |
|
protected |
References EIG_EMPTY, EIG_LANCZOS_INT, and EIG_POWER_INT.
Referenced by PurificationGeneral< MatrixType >::set_eigenvectors_params().
|
protected |
References EIG_EMPTY, EIG_PROJECTION_INT, and EIG_SQUARE_INT.
Referenced by PurificationGeneral< MatrixType >::set_eigenvectors_params().
|
protected |
References do_output(), EIG_PROJECTION_INT, EIG_SQUARE_INT, PurificationGeneral< MatrixType >::eigenvectors_method, PurificationGeneral< MatrixType >::F, PurificationGeneral< MatrixType >::homo_bounds_F, PuriInfo::homo_estim_low_F, PuriInfo::homo_estim_upp_F, PurificationGeneral< MatrixType >::info, PurificationGeneral< MatrixType >::iter_for_homo, PurificationGeneral< MatrixType >::iter_for_lumo, LOG_AREA_DENSFROMF, LOG_CAT_INFO, mat::Interval< Treal >::low(), PurificationGeneral< MatrixType >::lumo_bounds_F, PuriInfo::lumo_estim_low_F, PuriInfo::lumo_estim_upp_F, PurificationGeneral< MatrixType >::readFromTmpFile(), THRESHOLD_EIG_TOLERANCE, PurificationGeneral< MatrixType >::try_eigv_on_next_iteration_if_fail, mat::Interval< Treal >::upp(), and PurificationGeneral< MatrixType >::writeToTmpFile().
Referenced by PurificationGeneral< MatrixType >::compute_eigenvector(), and PurificationGeneral< MatrixType >::get_nnz_Xsq().
|
protected |
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 PurificationGeneral< MatrixType >::apply_poly(), PurificationGeneral< MatrixType >::compute_derivative(), PurificationGeneral< MatrixType >::find_shifts_every_iter(), PurificationGeneral< MatrixType >::get_min_double(), PurificationGeneral< MatrixType >::good_iterations_homo, PurificationGeneral< MatrixType >::good_iterations_lumo, PurificationGeneral< MatrixType >::homo_bounds, PurificationGeneral< MatrixType >::lumo_bounds, PurificationGeneral< MatrixType >::maxit, PurificationGeneral< MatrixType >::SIGMA_HOMO_VEC, PurificationGeneral< MatrixType >::SIGMA_LUMO_VEC, template_blas_fabs(), and mat::Interval< Treal >::upp().
Referenced by PurificationGeneral< MatrixType >::determine_iteration_for_eigenvectors(), and PurificationGeneral< MatrixType >::get_nnz_Xsq().
|
inlinestatic |
Get largest number.
References max.
|
inlinestatic |
Get smallest number.
References PurificationGeneral< MatrixType >::gen_matlab_file_cond_num(), PurificationGeneral< MatrixType >::gen_matlab_file_eigs(), PurificationGeneral< MatrixType >::gen_matlab_file_nnz(), PurificationGeneral< MatrixType >::gen_matlab_file_norm_diff(), PurificationGeneral< MatrixType >::gen_matlab_file_threshold(), PurificationGeneral< MatrixType >::gen_matlab_file_time(), PurificationGeneral< MatrixType >::gen_python_file_nnz(), min(), and PurificationGeneral< MatrixType >::set_eigenvectors_params().
Referenced by PurificationGeneral< MatrixType >::get_iterations_for_lumo_and_homo().
|
inlineprotected |
Get nnz of X in %.
nnzX | Number of nz of X |
|
inlineprotected |
Get nnz of X in %.
Referenced by PurificationGeneral< MatrixType >::initialize(), and PurificationGeneral< MatrixType >::purification_process().
|
inlineprotected |
Get nnz of X^2 in %.
nnzXsq | Number of nz of X^2 |
|
inlineprotected |
Get nnz of X^2 in %.
References A, PurificationGeneral< MatrixType >::apply_inverse_poly_vector(), PurificationGeneral< MatrixType >::apply_poly(), PurificationGeneral< MatrixType >::apply_poly_to_eigs(), PurificationGeneral< MatrixType >::check_eigenvectors_at_the_end(), PurificationGeneral< MatrixType >::compute_derivative(), PurificationGeneral< MatrixType >::determine_iteration_for_eigenvectors(), PurificationGeneral< MatrixType >::discard_homo_eigenvector(), PurificationGeneral< MatrixType >::discard_lumo_eigenvector(), PurificationGeneral< MatrixType >::estimate_homo_lumo(), PurificationGeneral< MatrixType >::estimate_number_of_iterations(), PurificationGeneral< MatrixType >::find_eig_gaps_every_iter(), PurificationGeneral< MatrixType >::find_shifts_every_iter(), PurificationGeneral< MatrixType >::find_truncation_thresh_every_iter(), PurificationGeneral< MatrixType >::get_eigenvalue_estimates(), PurificationGeneral< MatrixType >::get_eigenvalue_of_F_from_eigv_of_Xi(), PurificationGeneral< MatrixType >::get_frob_norm_est(), PurificationGeneral< MatrixType >::get_interval_with_lambda(), PurificationGeneral< MatrixType >::get_iterations_for_lumo_and_homo(), PurificationGeneral< MatrixType >::output_norms_and_traces(), PurificationGeneral< MatrixType >::propagate_values_in_each_iter(), PurificationGeneral< MatrixType >::purify_bounds(), PurificationGeneral< MatrixType >::purify_X(), PurificationGeneral< MatrixType >::readFromTmpFile(), PurificationGeneral< MatrixType >::return_constant_C(), PurificationGeneral< MatrixType >::save_eigenvectors_to_file(), PurificationGeneral< MatrixType >::save_other_iter_info(), PurificationGeneral< MatrixType >::set_init_params(), PurificationGeneral< MatrixType >::set_truncation_parameters(), PurificationGeneral< MatrixType >::truncate_matrix(), and PurificationGeneral< MatrixType >::writeToTmpFile().
Referenced by PurificationGeneral< MatrixType >::purification_process().
void PurificationGeneral< MatrixType >::get_spectrum_bounds | ( | real & | eigmin, |
real & | eigmax | ||
) |
Get spectrum bounds.
Return spectrum bounds for the matrix F.
References PurificationGeneral< MatrixType >::compute_spectrum_bounds(), PurificationGeneral< MatrixType >::computed_spectrum_bounds, mat::Interval< Treal >::low(), PurificationGeneral< MatrixType >::spectrum_bounds, and mat::Interval< Treal >::upp().
Referenced by PurificationGeneral< MatrixType >::clear().
|
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 PurificationGeneral< MatrixType >::additional_iterations, PurificationGeneral< MatrixType >::check_stopping_criterion_iter, PurificationGeneral< MatrixType >::compute_eigenvectors_in_this_SCF_cycle, PuriInfo::debug_output, do_output(), enable_printf_output(), PurificationGeneral< MatrixType >::error_eig, PurificationGeneral< MatrixType >::error_sub, PuriInfo::error_subspace, mat::euclNorm, mat::frobNorm, PurificationGeneral< MatrixType >::get_nnz_X(), PurificationGeneral< MatrixType >::homo_bounds_F, PurificationGeneral< MatrixType >::info, PurificationGeneral< MatrixType >::initialized_flag, LOG_AREA_DENSFROMF, LOG_CAT_INFO, PurificationGeneral< MatrixType >::lumo_bounds_F, PurificationGeneral< MatrixType >::maxit, mat::mixedNorm, PurificationGeneral< MatrixType >::nocc, PurificationGeneral< MatrixType >::normPuriStopCrit, PurificationGeneral< MatrixType >::normPuriTrunc, NUM_ADDITIONAL_ITERATIONS, PurificationGeneral< MatrixType >::set_init_params(), PuriInfo::stopping_criterion, PurificationGeneral< MatrixType >::use_new_stopping_criterion, and PurificationGeneral< MatrixType >::X.
Referenced by GetDensFromFock::get_dens_from_fock_sparse(), main(), and PurificationGeneral< MatrixType >::PurificationGeneral().
|
inlinevirtual |
Check is function initialize() is already called.
References PurificationGeneral< MatrixType >::initialized_flag.
Referenced by PurificationGeneral< MatrixType >::prepare_to_purification().
|
protected |
Get eigenvalue bounds for X0.
References do_output(), mat::Interval< Treal >::empty(), PurificationGeneral< MatrixType >::homo_bounds, PurificationGeneral< MatrixType >::homo_bounds_F, PurificationGeneral< MatrixType >::homo_bounds_X0, mat::Interval< Treal >::intersect(), LOG_AREA_DENSFROMF, LOG_CAT_INFO, mat::Interval< Treal >::low(), PurificationGeneral< MatrixType >::lumo_bounds, PurificationGeneral< MatrixType >::lumo_bounds_F, PurificationGeneral< MatrixType >::lumo_bounds_X0, PurificationGeneral< MatrixType >::spectrum_bounds, and mat::Interval< Treal >::upp().
Referenced by PurificationGeneral< MatrixType >::prepare_to_purification().
|
protected |
References do_output(), mat::euclNorm, mat::frobNorm, IterationInfo::it, LOG_AREA_DENSFROMF, LOG_CAT_INFO, mat::mixedNorm, PurificationGeneral< MatrixType >::normPuriStopCrit, PurificationGeneral< MatrixType >::X, IterationInfo::XmX2_eucl, IterationInfo::XmX2_fro_norm, IterationInfo::XmX2_mixed_norm, and IterationInfo::XmX2_trace.
Referenced by PurificationGeneral< MatrixType >::get_nnz_Xsq(), and PurificationGeneral< MatrixType >::purification_process().
|
virtual |
Prepare data for recursive expansion.
References PuriInfo::compute_eigenvectors_in_this_SCF_cycle, PurificationGeneral< MatrixType >::compute_eigenvectors_in_this_SCF_cycle, PurificationGeneral< MatrixType >::compute_spectrum_bounds(), PurificationGeneral< MatrixType >::compute_X(), PurificationGeneral< MatrixType >::computed_spectrum_bounds, PurificationGeneral< MatrixType >::determine_iteration_for_eigenvectors(), do_output(), PurificationGeneral< MatrixType >::eigVecHOMO, PurificationGeneral< MatrixType >::eigVecLUMO, PurificationGeneral< MatrixType >::F, Util::TimeMeter::get_elapsed_wall_seconds(), PurificationGeneral< MatrixType >::homo_bounds, PurificationGeneral< MatrixType >::info, PurificationGeneral< MatrixType >::is_initialized(), LOG_AREA_DENSFROMF, LOG_CAT_INFO, mat::Interval< Treal >::low(), PurificationGeneral< MatrixType >::lumo_bounds, PurificationGeneral< MatrixType >::map_bounds_to_0_1(), Util::TimeMeter::print(), PurificationGeneral< MatrixType >::puri_is_prepared_flag, PuriInfo::set_spectrum_bounds(), PurificationGeneral< MatrixType >::set_truncation_parameters(), PurificationGeneral< MatrixType >::spectrum_bounds, PuriInfo::time_spectrum_bounds, TOL_OVERLAPPING_BOUNDS, mat::Interval< Treal >::upp(), PurificationGeneral< MatrixType >::writeToTmpFile(), and PurificationGeneral< MatrixType >::X.
Referenced by PurificationGeneral< MatrixType >::puri_is_prepared(), and PurificationGeneral< MatrixType >::PurificationStart().
|
protected |
|
inlinevirtual |
Check is function prepare_to_purification() is already called.
References PurificationGeneral< MatrixType >::eigenvalue_bounds_estimation(), PurificationGeneral< MatrixType >::prepare_to_purification(), PurificationGeneral< MatrixType >::puri_is_prepared_flag, PurificationGeneral< MatrixType >::purification_process(), and PurificationGeneral< MatrixType >::PurificationStart().
Referenced by PurificationGeneral< MatrixType >::purification_process().
|
virtual |
Run recursive expansion.
References PuriInfo::accumulated_error_subspace, PuriInfo::additional_iterations, PurificationGeneral< MatrixType >::additional_iterations, PurificationGeneral< MatrixType >::check_stopping_criterion_iter, PurificationGeneral< MatrixType >::compute_eigenvectors_in_this_SCF_cycle, PurificationGeneral< MatrixType >::compute_eigenvectors_without_diagonalization(), PurificationGeneral< MatrixType >::constant_C, IterationInfo::constantC, PuriInfo::converged, do_output(), eucl_acc, IterationInfo::eucl_diff_time, mat::euclNorm, IterationInfo::frob_diff_time, IterationInfo::gap, Util::TimeMeter::get_elapsed_wall_seconds(), PurificationGeneral< MatrixType >::get_nnz_X(), PurificationGeneral< MatrixType >::get_nnz_Xsq(), IterationInfo::homo_bound_low, IterationInfo::homo_bound_upp, PurificationGeneral< MatrixType >::homo_bounds, PurificationGeneral< MatrixType >::info, IterationInfo::it, PuriInfo::Iterations, LOG_AREA_DENSFROMF, LOG_CAT_INFO, mat::Interval< Treal >::low(), IterationInfo::lumo_bound_low, IterationInfo::lumo_bound_upp, PurificationGeneral< MatrixType >::lumo_bounds, PurificationGeneral< MatrixType >::maxit, mixed_acc, IterationInfo::mixed_diff_time, mat::mixedNorm, IterationInfo::NNZ_X, IterationInfo::NNZ_X2, PurificationGeneral< MatrixType >::normPuriStopCrit, IterationInfo::order, output_current_memory_usage(), PurificationGeneral< MatrixType >::output_norms_and_traces(), Util::TimeMeter::print(), PurificationGeneral< MatrixType >::puri_is_prepared(), PurificationGeneral< MatrixType >::purify_bounds(), IterationInfo::purify_time, PurificationGeneral< MatrixType >::purify_X(), PurificationGeneral< MatrixType >::save_matrix_now(), PurificationGeneral< MatrixType >::save_other_iter_info(), PurificationGeneral< MatrixType >::stopping_criterion(), IterationInfo::stopping_criterion_time, IterationInfo::threshold_X, PuriInfo::total_it, PurificationGeneral< MatrixType >::total_subspace_error(), IterationInfo::total_time, IterationInfo::trace_diff_time, IterationInfo::trunc_time, PurificationGeneral< MatrixType >::truncate_matrix(), mat::Interval< Treal >::upp(), PurificationGeneral< MatrixType >::use_new_stopping_criterion, PurificationGeneral< MatrixType >::VecPoly, mat::FileWritable::writeAndReadAll(), PurificationGeneral< MatrixType >::X, IterationInfo::XmX2_eucl, IterationInfo::XmX2_fro_norm, IterationInfo::XmX2_mixed_norm, IterationInfo::XmX2_trace, PurificationGeneral< MatrixType >::Xsq, and IterationInfo::Xsquare_time.
Referenced by PurificationGeneral< MatrixType >::puri_is_prepared(), and PurificationGeneral< MatrixType >::PurificationStart().
|
virtual |
Start recursive expansion.
References PurificationGeneral< MatrixType >::check_eigenvectors_at_the_end(), PurificationGeneral< MatrixType >::compute_eigenvectors_in_this_SCF_cycle, PurificationGeneral< MatrixType >::compute_eigenvectors_without_diagonalization_last_iter_proj(), PuriInfo::converged, do_output(), EIG_PROJECTION_INT, PurificationGeneral< MatrixType >::eigenvalue_bounds_estimation(), PurificationGeneral< MatrixType >::eigenvectors_method, Util::TimeMeter::get_elapsed_wall_seconds(), PurificationGeneral< MatrixType >::info, LOG_AREA_DENSFROMF, LOG_CAT_INFO, PurificationGeneral< MatrixType >::prepare_to_purification(), Util::TimeMeter::print(), PurificationGeneral< MatrixType >::purification_process(), and PuriInfo::total_time.
Referenced by GetDensFromFock::get_dens_from_fock_sparse(), main(), and PurificationGeneral< MatrixType >::puri_is_prepared().
|
protectedpure virtual |
Implemented in Purification_sp2acc< MatrixType >, and Purification_sp2< MatrixType >.
Referenced by PurificationGeneral< MatrixType >::get_nnz_Xsq(), and PurificationGeneral< MatrixType >::purification_process().
|
protectedpure virtual |
Implemented in Purification_sp2acc< MatrixType >, and Purification_sp2< MatrixType >.
Referenced by PurificationGeneral< MatrixType >::get_nnz_Xsq(), and PurificationGeneral< MatrixType >::purification_process().
|
protected |
References PurificationGeneral< MatrixType >::save_eigenvectors_to_file().
Referenced by PurificationGeneral< MatrixType >::compute_eigenvectors_without_diagonalization(), PurificationGeneral< MatrixType >::compute_eigenvectors_without_diagonalization_last_iter_proj(), PurificationGeneral< MatrixType >::get_eigenvalue_of_F_from_eigv_of_Xi(), PurificationGeneral< MatrixType >::get_interval_with_lambda(), PurificationGeneral< MatrixType >::get_nnz_Xsq(), and PurificationGeneral< MatrixType >::writeToTmpFile().
|
protectedpure virtual |
Implemented in Purification_sp2acc< MatrixType >, and Purification_sp2< MatrixType >.
Referenced by PurificationGeneral< MatrixType >::check_new_stopping_criterion(), and PurificationGeneral< MatrixType >::get_nnz_Xsq().
|
protected |
References PurificationGeneral< MatrixType >::eigVecHOMO, PurificationGeneral< MatrixType >::eigVecLUMO, mat::VectorGeneral< Treal, Tvector >::fullvector(), PurificationGeneral< MatrixType >::scf_step, and write_vector().
Referenced by PurificationGeneral< MatrixType >::compute_eigenvector(), PurificationGeneral< MatrixType >::get_nnz_Xsq(), and PurificationGeneral< MatrixType >::readFromTmpFile().
|
protected |
References PurificationGeneral< MatrixType >::compute_eigenvectors_without_diagonalization(), PurificationGeneral< MatrixType >::compute_eigenvectors_without_diagonalization_last_iter_proj(), PurificationGeneral< MatrixType >::compute_eigenvectors_without_diagonalization_on_F(), PurificationGeneral< MatrixType >::F, write_matrix_to_mtx(), and PurificationGeneral< MatrixType >::X.
Referenced by PurificationGeneral< MatrixType >::compute_eigenvectors_without_diagonalization(), and PurificationGeneral< MatrixType >::purification_process().
|
protectedpure virtual |
Implemented in Purification_sp2acc< MatrixType >, and Purification_sp2< MatrixType >.
Referenced by PurificationGeneral< MatrixType >::get_nnz_Xsq(), and PurificationGeneral< MatrixType >::purification_process().
|
inline |
References PurificationGeneral< MatrixType >::compute_eigenvectors_in_each_iteration.
Referenced by GetDensFromFock::get_dens_from_fock_sparse(), and main().
void PurificationGeneral< MatrixType >::set_eigenvectors_params | ( | string | eigenvectors_method_, |
string | eigenvectors_iterative_method_, | ||
real | eigensolver_accuracy_, | ||
int | eigensolver_maxiter_, | ||
int | scf_step_, | ||
int | use_prev_vector_as_initial_guess_, | ||
int | try_eigv_on_next_iteration_if_fail_, | ||
VectorType * | eigVecLUMO_, | ||
VectorType * | eigVecHOMO_ | ||
) |
Set parameters for computing eigenvectors.
References cols, PurificationGeneral< MatrixType >::compute_eigenvectors_in_each_iteration, do_output(), EIG_EMPTY, PurificationGeneral< MatrixType >::eigensolver_accuracy, PurificationGeneral< MatrixType >::eigensolver_maxiter, PurificationGeneral< MatrixType >::eigenvectors_iterative_method, PurificationGeneral< MatrixType >::eigenvectors_iterative_method_str, PurificationGeneral< MatrixType >::eigenvectors_method, PurificationGeneral< MatrixType >::eigenvectors_method_str, PurificationGeneral< MatrixType >::eigVecHOMO, PurificationGeneral< MatrixType >::eigVecHOMORef, PurificationGeneral< MatrixType >::eigVecLUMO, PurificationGeneral< MatrixType >::eigVecLUMORef, PurificationGeneral< MatrixType >::get_int_eig_iter_method(), PurificationGeneral< MatrixType >::get_int_eig_method(), PuriInfo::homo_eigenvector_is_computed, PurificationGeneral< MatrixType >::info, PurificationGeneral< MatrixType >::iter_for_homo, PurificationGeneral< MatrixType >::iter_for_lumo, LOG_AREA_DENSFROMF, LOG_CAT_INFO, PuriInfo::lumo_eigenvector_is_computed, PurificationGeneral< MatrixType >::number_of_eigenvalues, mat::VectorGeneral< Treal, Tvector >::resetSizesAndBlocks(), PurificationGeneral< MatrixType >::scf_step, PurificationGeneral< MatrixType >::try_eigv_on_next_iteration_if_fail, PurificationGeneral< MatrixType >::use_prev_vector_as_initial_guess, and PurificationGeneral< MatrixType >::X.
Referenced by GetDensFromFock::get_dens_from_fock_sparse(), PurificationGeneral< MatrixType >::get_min_double(), and main().
|
protectedpure virtual |
Implemented in Purification_sp2< MatrixType >, and Purification_sp2acc< MatrixType >.
Referenced by PurificationGeneral< MatrixType >::get_nnz_Xsq(), and PurificationGeneral< MatrixType >::initialize().
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 PurificationGeneral< MatrixType >::computed_spectrum_bounds, and PurificationGeneral< MatrixType >::spectrum_bounds.
Referenced by PurificationGeneral< MatrixType >::clear().
|
protected |
References do_output(), PurificationGeneral< MatrixType >::error_per_it, PurificationGeneral< MatrixType >::error_sub, PuriInfo::estim_total_it, PurificationGeneral< MatrixType >::estimate_number_of_iterations(), PurificationGeneral< MatrixType >::info, LOG_AREA_DENSFROMF, LOG_CAT_INFO, and PurificationGeneral< MatrixType >::maxit.
Referenced by PurificationGeneral< MatrixType >::get_nnz_Xsq(), and PurificationGeneral< MatrixType >::prepare_to_purification().
|
protectedvirtual |
Choose stopping criterion and check it.
References PurificationGeneral< MatrixType >::check_new_stopping_criterion(), PurificationGeneral< MatrixType >::check_standard_stopping_criterion(), PurificationGeneral< MatrixType >::check_stopping_criterion_iter, mat::euclNorm, mat::frobNorm, PurificationGeneral< MatrixType >::info, IterationInfo::it, PuriInfo::Iterations, mat::mixedNorm, PurificationGeneral< MatrixType >::normPuriStopCrit, PurificationGeneral< MatrixType >::use_new_stopping_criterion, IterationInfo::XmX2_eucl, IterationInfo::XmX2_fro_norm, IterationInfo::XmX2_mixed_norm, and IterationInfo::XmX2_trace.
Referenced by PurificationGeneral< MatrixType >::purification_process().
|
virtual |
|
protectedpure virtual |
Implemented in Purification_sp2acc< MatrixType >, and Purification_sp2< MatrixType >.
Referenced by PurificationGeneral< MatrixType >::get_nnz_Xsq(), and PurificationGeneral< MatrixType >::purification_process().
|
inline |
|
protected |
References PurificationGeneral< MatrixType >::readFromTmpFile().
Referenced by PurificationGeneral< MatrixType >::compute_eigenvector(), PurificationGeneral< MatrixType >::compute_eigenvectors_without_diagonalization(), PurificationGeneral< MatrixType >::get_eigenvalue_of_F_from_eigv_of_Xi(), PurificationGeneral< MatrixType >::get_interval_with_lambda(), PurificationGeneral< MatrixType >::get_nnz_Xsq(), and PurificationGeneral< MatrixType >::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(), PurificationGeneral< MatrixType >::initialize(), and PurificationGeneral< MatrixType >::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(), PurificationGeneral< MatrixType >::initialize(), PurificationGeneral< MatrixType >::purification_process(), Purification_sp2acc< MatrixType >::set_init_params(), Purification_sp2acc< MatrixType >::set_poly(), and PurificationGeneral< MatrixType >::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 PurificationGeneral< MatrixType >::compute_eigenvector(), PurificationGeneral< MatrixType >::compute_eigenvectors_without_diagonalization(), PurificationGeneral< MatrixType >::compute_eigenvectors_without_diagonalization_last_iter_proj(), PurificationGeneral< MatrixType >::PurificationGeneral(), PurificationGeneral< MatrixType >::set_compute_eigenvectors_in_each_iteration(), PurificationGeneral< MatrixType >::set_eigenvectors_params(), and PurificationGeneral< MatrixType >::unset_compute_eigenvectors_in_each_iteration().
|
protected |
Referenced by PurificationGeneral< MatrixType >::check_eigenvectors_at_the_end(), PurificationGeneral< MatrixType >::initialize(), PurificationGeneral< MatrixType >::prepare_to_purification(), PurificationGeneral< MatrixType >::purification_process(), and PurificationGeneral< MatrixType >::PurificationStart().
|
protected |
Referenced by PurificationGeneral< MatrixType >::compute_spectrum_bounds(), PurificationGeneral< MatrixType >::get_spectrum_bounds(), PurificationGeneral< MatrixType >::prepare_to_purification(), PurificationGeneral< MatrixType >::PurificationGeneral(), and PurificationGeneral< MatrixType >::set_spectrum_bounds().
|
protected |
Asymptotic constant C needed for the new stopping criterion.
Referenced by PurificationGeneral< MatrixType >::check_new_stopping_criterion(), and PurificationGeneral< MatrixType >::purification_process().
|
protected |
(Eigenvectors) Absolute and relative gap in filter for lumo eigenvalue.
Referenced by PurificationGeneral< MatrixType >::find_eig_gaps_every_iter().
|
protected |
|
protected |
(Eigenvectors) Absolute and relative gap in filter for homo eigenvalue.
Referenced by PurificationGeneral< MatrixType >::find_eig_gaps_every_iter().
|
protected |
|
protected |
|
protected |
|
protected |
Chosen eigensolver.
Referenced by PurificationGeneral< MatrixType >::set_eigenvectors_params().
|
protected |
|
protected |
Chosen method for computing eigenvectors.
Referenced by PurificationGeneral< MatrixType >::compute_eigenvectors_without_diagonalization(), PurificationGeneral< MatrixType >::determine_iteration_for_eigenvectors(), PurificationGeneral< MatrixType >::gen_matlab_file_time(), PurificationGeneral< MatrixType >::get_interval_with_lambda(), PurificationGeneral< MatrixType >::PurificationStart(), and PurificationGeneral< MatrixType >::set_eigenvectors_params().
|
protected |
Referenced by PurificationGeneral< MatrixType >::set_eigenvectors_params().
|
protected |
|
protected |
|
protected |
Referenced by PurificationGeneral< MatrixType >::check_eigenvectors_at_the_end(), PurificationGeneral< MatrixType >::compute_eigenvector(), PurificationGeneral< MatrixType >::compute_eigenvectors_without_diagonalization(), PurificationGeneral< MatrixType >::compute_eigenvectors_without_diagonalization_last_iter_proj(), PurificationGeneral< MatrixType >::discard_homo_eigenvector(), PurificationGeneral< MatrixType >::prepare_to_purification(), PurificationGeneral< MatrixType >::PurificationGeneral(), PurificationGeneral< MatrixType >::save_eigenvectors_to_file(), and PurificationGeneral< MatrixType >::set_eigenvectors_params().
|
protected |
|
protected |
Referenced by PurificationGeneral< MatrixType >::check_eigenvectors_at_the_end(), PurificationGeneral< MatrixType >::compute_eigenvector(), PurificationGeneral< MatrixType >::compute_eigenvectors_without_diagonalization(), PurificationGeneral< MatrixType >::compute_eigenvectors_without_diagonalization_last_iter_proj(), PurificationGeneral< MatrixType >::discard_lumo_eigenvector(), PurificationGeneral< MatrixType >::prepare_to_purification(), PurificationGeneral< MatrixType >::PurificationGeneral(), PurificationGeneral< MatrixType >::save_eigenvectors_to_file(), and PurificationGeneral< MatrixType >::set_eigenvectors_params().
|
protected |
|
protected |
Error in eigenvalues (used just in old stopping criterion).
Referenced by PurificationGeneral< MatrixType >::check_standard_stopping_criterion(), and PurificationGeneral< MatrixType >::initialize().
|
protected |
Error allowed in each iteration due to truncation.
Referenced by PurificationGeneral< MatrixType >::find_truncation_thresh_every_iter(), PurificationGeneral< MatrixType >::set_truncation_parameters(), Purification_sp2< MatrixType >::truncate_matrix(), and Purification_sp2acc< MatrixType >::truncate_matrix().
|
protected |
Allowed error in invariant subspaces.
Referenced by PurificationGeneral< MatrixType >::initialize(), and PurificationGeneral< MatrixType >::set_truncation_parameters().
|
protected |
Matrix F.
Needed for computation of eigenvectors.
Referenced by PurificationGeneral< MatrixType >::compute_eigenvectors_without_diagonalization_on_F(), PurificationGeneral< MatrixType >::get_eigenvalue_of_F_from_eigv_of_Xi(), PurificationGeneral< MatrixType >::get_interval_with_lambda(), PurificationGeneral< MatrixType >::prepare_to_purification(), PurificationGeneral< MatrixType >::save_matrix_now(), and PurificationGeneral< MatrixType >::unset_compute_eigenvectors_in_each_iteration().
|
protected |
Used on the stopping criterion for estimation of eigenvalues from purification.
Referenced by PurificationGeneral< MatrixType >::estimate_homo_lumo(), Purification_sp2acc< MatrixType >::set_init_params(), and Purification_sp2< MatrixType >::set_init_params().
|
protected |
Iterations where homo eigenvector can be computed.
Referenced by PurificationGeneral< MatrixType >::compute_eigenvectors_without_diagonalization(), and PurificationGeneral< MatrixType >::get_iterations_for_lumo_and_homo().
|
protected |
Iterations where homo eigenvector can be computed.
Referenced by PurificationGeneral< MatrixType >::compute_eigenvectors_without_diagonalization(), and PurificationGeneral< MatrixType >::get_iterations_for_lumo_and_homo().
|
protected |
(1-homo) bounds for Xi in iteration i
Referenced by PurificationGeneral< MatrixType >::check_standard_stopping_criterion(), Purification_sp2< MatrixType >::estimate_number_of_iterations(), Purification_sp2acc< MatrixType >::estimate_number_of_iterations(), PurificationGeneral< MatrixType >::find_shifts_every_iter(), PurificationGeneral< MatrixType >::get_iterations_for_lumo_and_homo(), PurificationGeneral< MatrixType >::map_bounds_to_0_1(), PurificationGeneral< MatrixType >::prepare_to_purification(), PurificationGeneral< MatrixType >::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 PurificationGeneral< MatrixType >::compute_eigenvectors_without_diagonalization_on_F(), PurificationGeneral< MatrixType >::get_interval_with_lambda(), PurificationGeneral< MatrixType >::initialize(), and PurificationGeneral< MatrixType >::map_bounds_to_0_1().
|
protected |
|
protected |
Initial lumo bounds for X.
Referenced by PurificationGeneral< MatrixType >::find_eig_gaps_every_iter(), and PurificationGeneral< MatrixType >::map_bounds_to_0_1().
PuriInfo PurificationGeneral< MatrixType >::info |
Fill in during purification with useful information.
Referenced by PurificationGeneral< MatrixType >::check_eigenvectors_at_the_end(), PurificationGeneral< MatrixType >::compute_eigenvector(), PurificationGeneral< MatrixType >::compute_eigenvectors_without_diagonalization(), PurificationGeneral< MatrixType >::compute_eigenvectors_without_diagonalization_last_iter_proj(), PurificationGeneral< MatrixType >::discard_homo_eigenvector(), PurificationGeneral< MatrixType >::discard_lumo_eigenvector(), PurificationGeneral< MatrixType >::eigenvalue_bounds_estimation(), PurificationGeneral< MatrixType >::estimate_homo_lumo(), PurificationGeneral< MatrixType >::gen_matlab_file_cond_num(), PurificationGeneral< MatrixType >::gen_matlab_file_eigs(), PurificationGeneral< MatrixType >::gen_matlab_file_nnz(), PurificationGeneral< MatrixType >::gen_matlab_file_norm_diff(), PurificationGeneral< MatrixType >::gen_matlab_file_threshold(), PurificationGeneral< MatrixType >::gen_matlab_file_time(), PurificationGeneral< MatrixType >::gen_python_file_nnz(), GetDensFromFock::get_dens_from_fock_sparse(), PurificationGeneral< MatrixType >::get_est_number_of_puri_iterations(), PurificationGeneral< MatrixType >::get_exact_number_of_puri_iterations(), PurificationGeneral< MatrixType >::get_interval_with_lambda(), PurificationGeneral< MatrixType >::initialize(), main(), PurificationGeneral< MatrixType >::prepare_to_purification(), PurificationGeneral< MatrixType >::purification_process(), PurificationGeneral< MatrixType >::PurificationStart(), Purification_sp2acc< MatrixType >::return_constant_C(), PurificationGeneral< MatrixType >::set_eigenvectors_params(), Purification_sp2< MatrixType >::set_init_params(), Purification_sp2acc< MatrixType >::set_init_params(), PurificationGeneral< MatrixType >::set_truncation_parameters(), PurificationGeneral< MatrixType >::stopping_criterion(), and PurificationGeneral< MatrixType >::total_subspace_error().
|
protected |
|
protected |
(Eigenvectors) Maximum error introduced in each iteration.
Referenced by PurificationGeneral< MatrixType >::find_truncation_thresh_every_iter().
|
protected |
Referenced by PurificationGeneral< MatrixType >::check_eigenvectors_at_the_end(), PurificationGeneral< MatrixType >::compute_eigenvectors_without_diagonalization(), PurificationGeneral< MatrixType >::compute_eigenvectors_without_diagonalization_last_iter_proj(), PurificationGeneral< MatrixType >::determine_iteration_for_eigenvectors(), PurificationGeneral< MatrixType >::get_interval_with_lambda(), and PurificationGeneral< MatrixType >::set_eigenvectors_params().
|
protected |
Referenced by PurificationGeneral< MatrixType >::check_eigenvectors_at_the_end(), PurificationGeneral< MatrixType >::compute_eigenvectors_without_diagonalization(), PurificationGeneral< MatrixType >::compute_eigenvectors_without_diagonalization_last_iter_proj(), PurificationGeneral< MatrixType >::determine_iteration_for_eigenvectors(), PurificationGeneral< MatrixType >::get_interval_with_lambda(), and PurificationGeneral< MatrixType >::set_eigenvectors_params().
|
protected |
Lumo bounds for Xi in iteration i.
Referenced by PurificationGeneral< MatrixType >::check_standard_stopping_criterion(), Purification_sp2< MatrixType >::estimate_number_of_iterations(), Purification_sp2acc< MatrixType >::estimate_number_of_iterations(), PurificationGeneral< MatrixType >::find_shifts_every_iter(), PurificationGeneral< MatrixType >::get_iterations_for_lumo_and_homo(), PurificationGeneral< MatrixType >::map_bounds_to_0_1(), PurificationGeneral< MatrixType >::prepare_to_purification(), PurificationGeneral< MatrixType >::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 PurificationGeneral< MatrixType >::compute_eigenvectors_without_diagonalization_on_F(), PurificationGeneral< MatrixType >::get_interval_with_lambda(), PurificationGeneral< MatrixType >::initialize(), and PurificationGeneral< MatrixType >::map_bounds_to_0_1().
|
protected |
|
protected |
Initial lumo bounds for X.
Referenced by PurificationGeneral< MatrixType >::find_eig_gaps_every_iter(), and PurificationGeneral< MatrixType >::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(), PurificationGeneral< MatrixType >::find_eig_gaps_every_iter(), PurificationGeneral< MatrixType >::find_shifts_every_iter(), PurificationGeneral< MatrixType >::find_truncation_thresh_every_iter(), PurificationGeneral< MatrixType >::get_iterations_for_lumo_and_homo(), PurificationGeneral< MatrixType >::initialize(), PurificationGeneral< MatrixType >::purification_process(), and PurificationGeneral< MatrixType >::set_truncation_parameters().
|
protected |
Number of occupied orbitals.
Referenced by PurificationGeneral< MatrixType >::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 PurificationGeneral< MatrixType >::eigenvalue_bounds_estimation(), Purification_sp2< MatrixType >::estimate_number_of_iterations(), Purification_sp2acc< MatrixType >::estimate_number_of_iterations(), PurificationGeneral< MatrixType >::gen_matlab_file_norm_diff(), PurificationGeneral< MatrixType >::initialize(), PurificationGeneral< MatrixType >::output_norms_and_traces(), PurificationGeneral< MatrixType >::purification_process(), and PurificationGeneral< MatrixType >::stopping_criterion().
|
protected |
Norm used for the truncation of matrices.
Can be mat::frobNorm, mat::mixedNorm, or mat::euclNorm.
Referenced by PurificationGeneral< MatrixType >::initialize(), Purification_sp2< MatrixType >::truncate_matrix(), and Purification_sp2acc< MatrixType >::truncate_matrix().
|
protected |
|
protected |
|
protected |
Iterations where homo eigenvector is actually computed.
Referenced by PurificationGeneral< MatrixType >::compute_eigenvector().
|
protected |
Iterations where lumo eigenvector is actually computed.
Referenced by PurificationGeneral< MatrixType >::compute_eigenvector().
|
protected |
|
protected |
|
protected |
(Eigenvectors) Approximation of shifts in each iteration.
Referenced by PurificationGeneral< MatrixType >::compute_eigenvectors_without_diagonalization(), PurificationGeneral< MatrixType >::find_eig_gaps_every_iter(), PurificationGeneral< MatrixType >::find_shifts_every_iter(), and PurificationGeneral< MatrixType >::get_iterations_for_lumo_and_homo().
|
protected |
Outer bounds for the whole spectrum of F/Xi.
Referenced by PurificationGeneral< MatrixType >::compute_spectrum_bounds(), PurificationGeneral< MatrixType >::compute_X(), PurificationGeneral< MatrixType >::estimate_homo_lumo(), PurificationGeneral< MatrixType >::get_eigenvalue_estimates(), PurificationGeneral< MatrixType >::get_spectrum_bounds(), PurificationGeneral< MatrixType >::map_bounds_to_0_1(), PurificationGeneral< MatrixType >::prepare_to_purification(), and PurificationGeneral< MatrixType >::set_spectrum_bounds().
|
protected |
|
protected |
True for new stopping criterion.
Referenced by PurificationGeneral< MatrixType >::initialize(), PurificationGeneral< MatrixType >::purification_process(), and PurificationGeneral< MatrixType >::stopping_criterion().
|
protected |
|
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(), PurificationGeneral< MatrixType >::find_truncation_thresh_every_iter(), Purification_sp2< MatrixType >::save_other_iter_info(), Purification_sp2acc< MatrixType >::save_other_iter_info(), PurificationGeneral< MatrixType >::total_subspace_error(), Purification_sp2< MatrixType >::truncate_matrix(), and Purification_sp2acc< MatrixType >::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 PurificationGeneral< MatrixType >::check_new_stopping_criterion(), Purification_sp2< MatrixType >::estimate_number_of_iterations(), Purification_sp2acc< MatrixType >::estimate_number_of_iterations(), PurificationGeneral< MatrixType >::gen_matlab_file_norm_diff(), Purification_sp2< MatrixType >::get_poly(), Purification_sp2acc< MatrixType >::get_poly(), PurificationGeneral< MatrixType >::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 PurificationGeneral< MatrixType >::clear(), PurificationGeneral< MatrixType >::compute_eigenvector(), PurificationGeneral< MatrixType >::compute_eigenvectors_without_diagonalization(), PurificationGeneral< MatrixType >::compute_eigenvectors_without_diagonalization_last_iter_proj(), PurificationGeneral< MatrixType >::compute_spectrum_bounds(), PurificationGeneral< MatrixType >::compute_X(), GetDensFromFock::get_dens_from_fock_sparse(), PurificationGeneral< MatrixType >::initialize(), main(), PurificationGeneral< MatrixType >::output_norms_and_traces(), PurificationGeneral< MatrixType >::prepare_to_purification(), PurificationGeneral< MatrixType >::purification_process(), Purification_sp2< MatrixType >::purify_X(), Purification_sp2acc< MatrixType >::purify_X(), PurificationGeneral< MatrixType >::save_matrix_now(), PurificationGeneral< MatrixType >::set_eigenvectors_params(), Purification_sp2< MatrixType >::set_poly(), Purification_sp2acc< MatrixType >::set_poly(), Purification_sp2< MatrixType >::truncate_matrix(), and Purification_sp2acc< MatrixType >::truncate_matrix().
|
protected |
|
protected |
Save matrix Xi in certain iterations for computing eigenvectors (projection method).
Referenced by PurificationGeneral< MatrixType >::compute_eigenvectors_without_diagonalization(), and PurificationGeneral< MatrixType >::compute_eigenvectors_without_diagonalization_last_iter_proj().
MatrixType PurificationGeneral< MatrixType >::Xsq |
Matrix X^2.
Referenced by PurificationGeneral< MatrixType >::clear(), PurificationGeneral< MatrixType >::compute_eigenvectors_without_diagonalization(), PurificationGeneral< MatrixType >::compute_eigenvectors_without_diagonalization_last_iter_proj(), PurificationGeneral< MatrixType >::purification_process(), Purification_sp2< MatrixType >::purify_X(), Purification_sp2acc< MatrixType >::purify_X(), Purification_sp2< MatrixType >::set_poly(), and Purification_sp2acc< MatrixType >::set_poly().