ergo
|
GetDensFromFock class containing parameters and functions for computing density matrix. More...
#include <GetDensFromFock.h>
Static Public Member Functions | |
static void | restore_from_checkpoint (GetDensFromFock &DensFromFock, symmMatrix &Finput, symmMatrix &F_ort_prev, generalVector *eigVecLUMO, generalVector *eigVecHOMO, std::string checkpoint_path, std::string IDstr, int SCF_step) |
Function restores data from files in order to repeat recursive expansion in a desired SCF cycle. More... | |
Static Public Attributes | |
static const int | UNDEF_VALUE = -1 |
static const int | UNDEF_VALUE_UINT = -1 |
static const ergo_real | UNDEF_VALUE_REAL = -1 |
static const std::string | UNDEF_VALUE_STRING = "" |
static const int | SET = 1 |
static const int | UNSET = 0 |
Private Attributes | |
int | SCF_step |
int | use_diagonalization |
Flag to turn on diagonalization. More... | |
int | use_purification |
Flag to turn on purification. More... | |
int | store_all_eigenvalues_to_file |
Store eigenvalues to the file when doing diagonalization. More... | |
int | try_eigv_on_next_iteration_if_fail |
For square method: if eigenvector is not computed in iteration i, try to compute it in iteration i+1. More... | |
ergo_real | electronicTemperature |
Electronic temperature. More... | |
ergo_real | gap_expected_lower_bound |
Expected lower bound for the gap to be used in early iterations. More... | |
ergo_real | eigvalueErrorLimit |
Tolerated deviation of eigenvalues from 0 and 1 in the computed density matrix. More... | |
ergo_real | subspaceErrorLimit |
Tolerated error in the occupied subspace as measured by the sinus of the largest canonical angle. More... | |
ergo_real | puri_eig_acc_factor_for_guess |
With this number will be multiplied the tolerated deviation of eigenvalues from 0 and 1 in the computed density matrix for the initial guess density matrix. More... | |
int | use_diag_on_error |
Flag to fall back on diagonalization if purification fails. More... | |
int | use_diag_on_error_guess |
int | create_m_files |
Flag to create m-files with information about the purification process. More... | |
int | output_homo_and_lumo_eigenvectors |
Compute homo and lumo eigenvectors and write them to the file. More... | |
int | use_prev_vector_as_initial_guess |
Use eigenvector from the previous SCF cycle as an initial guess in this cycle. More... | |
int | puri_compute_eigv_in_each_iteration |
Compute eigenvectors in each iteration of the recursive expansion. More... | |
int | run_shift_and_square_method_on_F |
(for comparison) Run shift_and_square method to get eigenvectors of the matrix F for various shifts. More... | |
int | save_permuted_F_matrix_in_bin |
Save sparse matrix F into bin file in the current permutation of rows and columns. More... | |
int | ignore_purification_failure |
Continue even if purification fails to converge. More... | |
int | use_rand_perturbation_for_alleigsint |
Apply a random perturbation to (try to) improve the convergence speed of Lanczos calculation of extremal eigenvalues. More... | |
std::string | stats_prefix |
Prefix to be added to statistics files. More... | |
int | plot_puri_results |
Plot results of the purification from this function call. More... | |
std::string | plot_puri_results_str |
int | use_acceleration |
Use acceleration in the purification. More... | |
int | use_new_stopping_criterion |
Use new parameterless stopping criterion. More... | |
std::string | eigenvectors_method |
Method for computing eigenvectors: square or projection. More... | |
std::string | eigenvectors_iterative_method |
Iterative method for computing eigenvectors: power or lanczos. More... | |
ergo_real | eigensolver_accuracy |
The accuracy for the eigenvalue problem solver. More... | |
int | eigensolver_maxiter |
Maximum number of iterations for the eigenvalue problem solver. More... | |
int | n |
System size. More... | |
int | noOfOccupiedOrbs |
Number of occupied orbitals. More... | |
ergo_real | factor |
Factor to scale the resulting density matrix. More... | |
symmMatrix | overlapMatrix |
Overlap matrix (written to file) More... | |
symmMatrix | D_ort_prev |
Density matrix from previous SCF cycle (written to file) More... | |
triangMatrix | invCholFactor |
Inverse Cholesky factor (written to file) More... | |
ergo_real | invCholFactor_euclnorm |
Euclidean norm of inverse Cholesky factor. More... | |
mat::normType | truncationNormPurification |
Norm to be used for truncation. More... | |
mat::normType | stopCriterionNormPurification |
Norm to be used for stopping criterion. More... | |
int | maxMul |
Maximum allowed number of matrix multiplications in the purification. More... | |
mat::SizesAndBlocks | matrixSizesAndBlocks |
Information about HML matrix block sizes etc. More... | |
int | leavesSizeMax |
Information about leavesSizeMax and blocksize for CHTMatrix. More... | |
int | blocksize |
Information about leavesSizeMax and blocksize for CHTMatrix. More... | |
intervalType | homoInterval_Finput |
intervalType | lumoInterval_Finput |
intervalType | homoInterval_F_ort_prev |
intervalType | lumoInterval_F_ort_prev |
ergo_real | resultEntropyTerm |
std::map< std::string, double > | puri_stats |
const char * | filenameFinput |
const char * | filenameF_ort_prev |
const char * | filenameeigVecLUMO |
const char * | filenameeigVecHOMO |
const char * | filenameOverlap |
const char * | filenameD_ort_prev |
const char * | filenameinvCholFactor |
const char * | file_for_basic_types |
GetDensFromFock class containing parameters and functions for computing density matrix.
Flags are set to undefined value by default. User should define them explicitly, otherwise exception is thrown if undefined flag is used.
|
inline |
References blocksize, clean_eigs_intervals(), clean_puri_stats(), create_m_files, do_output(), eigensolver_accuracy, eigensolver_maxiter, eigenvectors_iterative_method, eigenvectors_method, eigvalueErrorLimit, electronicTemperature, factor, file_for_basic_types, filenameD_ort_prev, filenameeigVecHOMO, filenameeigVecLUMO, filenameF_ort_prev, filenameFinput, filenameinvCholFactor, filenameOverlap, gap_expected_lower_bound, ignore_purification_failure, invCholFactor_euclnorm, leavesSizeMax, LOG_AREA_DENSFROMF, LOG_CAT_INFO, maxMul, n, noOfOccupiedOrbs, output_homo_and_lumo_eigenvectors, plot_puri_results, puri_compute_eigv_in_each_iteration, puri_eig_acc_factor_for_guess, run_shift_and_square_method_on_F, save_permuted_F_matrix_in_bin, SCF_step, stats_prefix, store_all_eigenvalues_to_file, subspaceErrorLimit, try_eigv_on_next_iteration_if_fail, UNDEF_VALUE, UNDEF_VALUE_REAL, UNDEF_VALUE_STRING, UNDEF_VALUE_UINT, use_acceleration, use_diag_on_error, use_diag_on_error_guess, use_diagonalization, use_new_stopping_criterion, use_prev_vector_as_initial_guess, use_purification, and use_rand_perturbation_for_alleigsint.
|
inline |
Set bounds for HOMO and LUMO eigenvalues to -/+ inf, thus remove any known bounds.
References homoInterval_F_ort_prev, homoInterval_Finput, lumoInterval_F_ort_prev, and lumoInterval_Finput.
Referenced by SCF_restricted::disturb_dens_matrix_exact_try(), SCF_restricted::disturb_fock_matrix(), get_HML_dens_matrix(), SCF_restricted::get_new_density_matrix(), SCF_unrestricted::get_starting_guess_density(), SCF_restricted::get_starting_guess_density(), GetDensFromFock(), and load_density_and_project_sparse().
|
inline |
References puri_stats.
Referenced by SCF_restricted::get_new_density_matrix(), and GetDensFromFock().
|
inline |
References eigensolver_accuracy, eigensolver_maxiter, eigenvectors_iterative_method, eigenvectors_method, set_try_eigv_on_next_iteration_if_fail(), set_use_prev_vector_as_initial_guess(), unset_try_eigv_on_next_iteration_if_fail(), and unset_use_prev_vector_as_initial_guess().
Referenced by SCF_unrestricted::get_new_density_matrix(), and SCF_restricted::get_new_density_matrix().
|
inline |
void GetDensFromFock::create_checkpoint | ( | symmMatrix & | Finput, |
symmMatrix & | F_ort_prev, | ||
generalVector * | eigVecLUMO, | ||
generalVector * | eigVecHOMO, | ||
std::string | IDstr | ||
) |
Function save all needed data to files in order to repeat recursive expansion in a desired SCF cycle later.
The purpose of the function is mainly testing.
[in] | Finput | Effective Hamiltonian matrix (written to file) |
[in,out] | F_ort_prev | Input: Previous F matrix in orthogonal basis. (written to file) Output: New F matrix in orthogonal basis ( ZT*Finput*Z ). (written to file) |
[out] | eigVecLUMO | LUMO eigenvector |
[out] | eigVecHOMO | HOMO eigenvector |
[in] | IDstr | File identificator; added to the name of each file |
References blocksize, mat::FileWritable::copyToFile(), create_m_files, eigensolver_accuracy, eigensolver_maxiter, eigenvectors_iterative_method, eigenvectors_method, eigvalueErrorLimit, electronicTemperature, mat::euclNorm, factor, file_for_basic_types, filenameeigVecHOMO, filenameeigVecLUMO, filenameF_ort_prev, filenameFinput, filenameinvCholFactor, filenameOverlap, mat::frobNorm, gap_expected_lower_bound, mat::SizesAndBlocks::getBlockSizeVector(), homoInterval_F_ort_prev, homoInterval_Finput, ignore_purification_failure, invCholFactor, invCholFactor_euclnorm, mat::VectorGeneral< Treal, Tvector >::is_empty(), leavesSizeMax, mat::Interval< Treal >::low(), lumoInterval_F_ort_prev, lumoInterval_Finput, matrixSizesAndBlocks, maxMul, mat::mixedNorm, n, noOfOccupiedOrbs, output_homo_and_lumo_eigenvectors, overlapMatrix, plot_puri_results, plot_puri_results_str, mat::FileWritable::readFromFile(), SCF_step, SET, stats_prefix, stopCriterionNormPurification, store_all_eigenvalues_to_file, subspaceErrorLimit, truncationNormPurification, try_eigv_on_next_iteration_if_fail, mat::Interval< Treal >::upp(), use_acceleration, use_diag_on_error, use_diag_on_error_guess, use_diagonalization, use_new_stopping_criterion, use_prev_vector_as_initial_guess, use_purification, use_rand_perturbation_for_alleigsint, and mat::FileWritable::writeToFile().
Referenced by SCF_restricted::get_new_density_matrix().
|
inline |
References factor.
Referenced by get_HML_dens_matrix(), and SCF_restricted::SCF_restricted().
|
inline |
References factor.
Referenced by SCF_unrestricted::SCF_unrestricted().
int GetDensFromFock::get_dens_from_fock | ( | symmMatrix & | Finput, |
symmMatrix & | resultDens, | ||
symmMatrix & | F_ort_prev, | ||
generalVector * | eigVecLUMO = 0 , |
||
generalVector * | eigVecHOMO = 0 |
||
) |
Choose which method to use for computing the density matrix from Fock matrix.
Possible alternatives:
[in] | Finput | Effective Hamiltonian matrix. (written to file) |
[out] | resultDens | Density matrix. (written to file) |
[in,out] | F_ort_prev | Input: Previous F matrix in orthogonal basis. (written to file) Output: New F matrix in orthogonal basis ( ZT*Finput*Z ). (written to file) |
[out] | eigVecLUMO | LUMO eigenvector |
[out] | eigVecHOMO | HOMO eigenvector |
References mat::VectorGeneral< Treal, Tvector >::assign_from_full(), do_output(), electronicTemperature, factor, get_dens_from_fock_full(), get_dens_from_fock_sparse(), mat::AllocatorManager< Treal >::getStatistics(), mat::AllocatorManager< Treal >::instance(), LOG_AREA_DENSFROMF, LOG_CAT_ERROR, LOG_CAT_INFO, matrixSizesAndBlocks, n, noOfOccupiedOrbs, overlapMatrix, Util::TimeMeter::print(), resultEntropyTerm, SET, store_all_eigenvalues_to_file, subspaceErrorLimit, UNDEF_VALUE, use_diag_on_error, use_diagonalization, and mat::FileWritable::writeAndReadAll().
Referenced by SCF_restricted::disturb_dens_matrix_exact_try(), SCF_restricted::disturb_fock_matrix(), get_HML_dens_matrix(), SCF_unrestricted::get_new_density_matrix(), SCF_restricted::get_new_density_matrix(), SCF_unrestricted::get_starting_guess_density(), SCF_restricted::get_starting_guess_density(), and load_density_and_project_sparse().
int GetDensFromFock::get_dens_from_fock_sparse | ( | symmMatrix & | F, |
symmMatrix & | resultDens, | ||
symmMatrix & | F_ort_prev, | ||
generalVector * | eigVecLUMO = 0 , |
||
generalVector * | eigVecHOMO = 0 |
||
) |
Use recursive expansion for computing the density matrix from Fock matrix.
Construct approximation of the step function by recursive application of low order polynomials. Sparsity is preserved using truncation (see J. Chem. Phys. 128, 074106, 2008), which can be done using spectral, Frobenius or mixed norms (see J. Comput. Chem. 30.6 (2009): 974-977.).
Possible alternatives (use_acceleration parameter):
[in] | F | Effective Hamiltonian matrix. (written to file) |
[out] | resultDens | Density matrix. (written to file) |
[in,out] | F_ort_prev | Input: Previous F matrix in orthogonal basis. (written to file) Output: New F matrix in orthogonal basis ( ZT*Finput*Z ). (written to file) |
[out] | eigVecLUMO | HOMO eigenvector |
[out] | eigVecHOMO | HOMO eigenvector |
References PuriInfo::accumulated_error_subspace, blocksize, PurificationGeneral< MatrixType >::clear(), PurificationGeneral< MatrixType >::compute_eigenvectors_without_diagonalization_on_F(), PuriInfo::converged, do_output(), eigensolver_accuracy, eigensolver_maxiter, eigenvectors_iterative_method, eigenvectors_method, PuriInfo::eigValHOMO, PuriInfo::eigValLUMO, eigvalueErrorLimit, mat::euclNorm, factor, mat::frobNorm, gap_expected_lower_bound, 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(), get_eucl_diff_with_adapted_accuracy(), get_machine_epsilon(), mat::getNormTypeString(), mat::Params::getNProcs(), mat::AllocatorManager< Treal >::getStatistics(), mat::FileWritable::getStatsCountCopyAndAssign(), mat::FileWritable::getStatsCountRead(), mat::FileWritable::getStatsCountWrite(), mat::FileWritable::getStatsTimeCopyAndAssign(), mat::FileWritable::getStatsTimeRead(), mat::FileWritable::getStatsTimeWrite(), PuriInfo::homo_eigensolver_iter, PuriInfo::homo_eigensolver_time, PuriInfo::homo_eigenvector_is_computed, PuriInfo::homo_eigenvector_is_computed_in_iter, PuriInfo::homo_estim_low_F, PuriInfo::homo_estim_upp_F, homoInterval_F_ort_prev, homoInterval_Finput, if(), ignore_purification_failure, mat::Interval< Treal >::increase(), PurificationGeneral< MatrixType >::info, PurificationGeneral< MatrixType >::initialize(), mat::AllocatorManager< Treal >::instance(), mat::Interval< ergo_real >::intersect(), invCholFactor, mat::VectorGeneral< Treal, Tvector >::is_empty(), leavesSizeMax, LOG_AREA_DENSFROMF, LOG_CAT_ERROR, LOG_CAT_INFO, LOG_CAT_TIMINGS, LOG_CAT_WARNING, mat::Interval< Treal >::low(), PuriInfo::lumo_eigensolver_iter, PuriInfo::lumo_eigensolver_time, PuriInfo::lumo_eigenvector_is_computed, PuriInfo::lumo_eigenvector_is_computed_in_iter, PuriInfo::lumo_estim_low_F, PuriInfo::lumo_estim_upp_F, lumoInterval_F_ort_prev, lumoInterval_Finput, maxMul, mat::mixedNorm, n, noOfOccupiedOrbs, output_current_memory_usage(), output_homo_and_lumo_eigenvectors, plot_puri_results, plot_puri_results_str, Util::TimeMeter::print(), PuriInfo::print_collected_info(), puri_compute_eigv_in_each_iteration, puri_stats, PurificationGeneral< MatrixType >::PurificationStart(), mat::FileWritable::resetStats(), run_shift_and_square_method_on_F, save_permuted_F_matrix_in_bin, SCF_step, SET, PurificationGeneral< MatrixType >::set_compute_eigenvectors_in_each_iteration(), PurificationGeneral< MatrixType >::set_eigenvectors_params(), set_stopCriterionNormPurification(), set_truncationNormPurification(), stats_prefix, stopCriterionNormPurification, subspaceErrorLimit, template_blas_fabs(), template_blas_sqrt(), mat::Gblas::time, mat::Gblas::timekeeping, PuriInfo::total_it, PuriInfo::total_time, mat::trace(), transform_matrix_from_to(), mat::transpose(), truncationNormPurification, try_eigv_on_next_iteration_if_fail, UNDEF_VALUE, UNDEF_VALUE_REAL, UNDEF_VALUE_UINT, UNIT_one_eV, UNSET, mat::Interval< Treal >::upp(), use_acceleration, use_new_stopping_criterion, use_prev_vector_as_initial_guess, write_matrix_to_bin(), mat::FileWritable::writeAndReadAll(), and PurificationGeneral< MatrixType >::X.
Referenced by get_dens_from_fock().
|
inline |
References homoInterval_F_ort_prev, and lumoInterval_F_ort_prev.
Referenced by SCF_restricted::disturb_fock_matrix(), SCF_unrestricted::get_new_density_matrix(), and SCF_restricted::get_new_density_matrix().
|
inline |
References homoInterval_Finput, and lumoInterval_Finput.
Referenced by SCF_unrestricted::get_new_density_matrix(), and SCF_restricted::get_new_density_matrix().
|
inline |
References eigvalueErrorLimit.
Referenced by load_density_and_project_sparse().
|
inline |
References output_homo_and_lumo_eigenvectors, and SET.
Referenced by SCF_unrestricted::get_new_density_matrix(), and SCF_restricted::get_new_density_matrix().
|
inline |
References puri_compute_eigv_in_each_iteration.
|
inline |
References puri_eig_acc_factor_for_guess.
Referenced by load_density_and_project_sparse().
|
inline |
References puri_stats.
Referenced by get_HML_dens_matrix(), and SCF_restricted::get_new_density_matrix().
|
inline |
References create_m_files, and SET.
|
inline |
References ignore_purification_failure, and SET.
|
inline |
References resultEntropyTerm.
Referenced by SCF_unrestricted::get_new_density_matrix(), and SCF_restricted::get_new_density_matrix().
|
inline |
References run_shift_and_square_method_on_F.
|
inline |
References save_permuted_F_matrix_in_bin.
|
inline |
[out] | matrixSizesAndBlocks_ | Matrix library parameters. |
References matrixSizesAndBlocks.
|
inline |
References stats_prefix.
|
inline |
References SET, and store_all_eigenvalues_to_file.
|
inline |
References subspaceErrorLimit.
|
inline |
References try_eigv_on_next_iteration_if_fail.
|
inline |
References SET, and use_acceleration.
|
inline |
|
inline |
References SET, and use_diag_on_error_guess.
Referenced by SCF_unrestricted::get_starting_guess_density(), and SCF_restricted::get_starting_guess_density().
|
inline |
References SET, and use_diagonalization.
Referenced by SCF_restricted::disturb_dens_matrix_exact_try(), and SCF_restricted::disturb_fock_matrix().
|
inline |
References SET, and use_new_stopping_criterion.
|
inline |
References use_prev_vector_as_initial_guess.
|
inline |
References SET, and use_purification.
Referenced by SCF_unrestricted::get_new_density_matrix(), SCF_restricted::get_new_density_matrix(), and SCF_general::SCF_general().
|
inline |
References SET, and use_rand_perturbation_for_alleigsint.
|
static |
Function restores data from files in order to repeat recursive expansion in a desired SCF cycle.
The purpose of the function is mainly testing.
[out] | DensFromFock | Instance of GetDensFromFock class contatining all data for computing the density matrix |
[out] | Finput | Effective Hamiltonian matrix (written to file) |
[out] | F_ort_prev | F matrix in orthogonal basis ( ZT*Finput*Z ). (written to file) |
[out] | eigVecLUMO | LUMO eigenvector |
[out] | eigVecHOMO | HOMO eigenvector |
[out] | checkpoint_path | HOMO eigenvector |
[in] | IDstr | File identificator; added to the name of each file. |
[in] | SCF_step | SCF step which should be restored; added to the name of each file in given SCF cycle. |
References blocksize, mat::FileWritable::copyFromFile(), create_m_files, eigensolver_accuracy, eigensolver_maxiter, eigenvectors_iterative_method, eigenvectors_method, eigvalueErrorLimit, electronicTemperature, mat::euclNorm, factor, file_exist(), file_for_basic_types, filenameeigVecHOMO, filenameeigVecLUMO, filenameF_ort_prev, filenameFinput, filenameinvCholFactor, filenameOverlap, mat::frobNorm, gap_expected_lower_bound, homoInterval_F_ort_prev, homoInterval_Finput, ignore_purification_failure, invCholFactor, invCholFactor_euclnorm, leavesSizeMax, lumoInterval_F_ort_prev, lumoInterval_Finput, matrixSizesAndBlocks, maxMul, mat::mixedNorm, n, noOfOccupiedOrbs, output_homo_and_lumo_eigenvectors, overlapMatrix, plot_puri_results, plot_puri_results_str, mat::FileWritable::readFromFile(), mat::VectorGeneral< Treal, Tvector >::resetSizesAndBlocks(), SCF_step, stats_prefix, stopCriterionNormPurification, store_all_eigenvalues_to_file, subspaceErrorLimit, truncationNormPurification, try_eigv_on_next_iteration_if_fail, use_acceleration, use_diag_on_error, use_diag_on_error_guess, use_diagonalization, use_new_stopping_criterion, use_prev_vector_as_initial_guess, use_purification, and use_rand_perturbation_for_alleigsint.
|
inline |
[in] | leavesSizeMax_ | CHTMatrix library parameter leavesSizeMax. |
[in] | blocksize_ | CHTMatrix library parameter blocksize. |
References blocksize, and leavesSizeMax.
Referenced by SCF_general::SCF_general().
|
inline |
References electronicTemperature, and set_overlapMatrix().
Referenced by get_HML_dens_matrix(), and SCF_general::SCF_general().
|
inline |
References homoInterval_F_ort_prev, and lumoInterval_F_ort_prev.
Referenced by SCF_unrestricted::get_new_density_matrix(), and SCF_restricted::get_new_density_matrix().
|
inline |
References homoInterval_Finput, and lumoInterval_Finput.
|
inline |
Set maximum allowed error in eigenvalues of the density matrix.
References eigvalueErrorLimit.
Referenced by load_density_and_project_sparse(), and set_purification_limits().
|
inline |
References gap_expected_lower_bound.
Referenced by get_HML_dens_matrix(), and SCF_general::SCF_general().
|
inline |
[in] | n_ | Number of basis functions. |
[in] | matrixSizesAndBlocks_ | Matrix library parameters. |
References matrixSizesAndBlocks, and n.
Referenced by get_HML_dens_matrix(), and SCF_general::SCF_general().
|
inline |
Plot figures from the recursive expansion.
[in] | str | String added to each generated file. |
References create_m_files, plot_puri_results, plot_puri_results_str, SCF_step, SET, and UNDEF_VALUE.
Referenced by SCF_unrestricted::get_new_density_matrix(), SCF_restricted::get_new_density_matrix(), and load_density_and_project_sparse().
|
inline |
References invCholFactor, and invCholFactor_euclnorm.
Referenced by get_HML_dens_matrix(), and SCF_general::SCF_general().
|
inline |
|
inline |
References output_homo_and_lumo_eigenvectors, and SET.
Referenced by SCF_general::SCF_general().
|
inline |
References overlapMatrix.
Referenced by set_diagonalization_params().
|
inline |
References puri_compute_eigv_in_each_iteration, and SET.
Referenced by compute_eigenvectors_extra().
|
inline |
Set puri_eig_acc_factor_for_guess parameter.
Obsolete parameter needed for the old stopping criterion for creating the initial guess.
References puri_eig_acc_factor_for_guess.
Referenced by set_purification_limits().
|
inline |
References create_m_files, and SET.
Referenced by SCF_general::SCF_general().
|
inline |
References ignore_purification_failure, and SET.
Referenced by SCF_general::SCF_general().
|
inline |
References puri_eig_acc_factor_for_guess, set_eigvalueErrorLimit(), set_puri_eig_acc_factor_for_guess(), and set_subspaceErrorLimit().
Referenced by get_HML_dens_matrix(), and SCF_general::SCF_general().
|
inline |
Set maximum allowed number of iterations in recursive expansion.
References maxMul.
Referenced by get_HML_dens_matrix(), and SCF_general::SCF_general().
|
inline |
References SET, and use_rand_perturbation_for_alleigsint.
Referenced by SCF_general::SCF_general().
|
inline |
References run_shift_and_square_method_on_F, and SET.
Referenced by compute_eigenvectors_extra().
|
inline |
References save_permuted_F_matrix_in_bin, and SET.
Referenced by SCF_general::SCF_general().
|
inline |
[in] | step | Current SCF step |
References SCF_step.
Referenced by SCF_unrestricted::get_new_density_matrix(), SCF_restricted::get_new_density_matrix(), SCF_unrestricted::get_starting_guess_density(), SCF_restricted::get_starting_guess_density(), and load_density_and_project_sparse().
|
inline |
References stats_prefix.
|
inline |
Set stopping criterion norm used in the recursive expansion.
Possible norms: spectral, Frobenius or mixed.
[in] | stopCriterionNormPurification_ | Norm used in the stopping criterion. |
References stopCriterionNormPurification.
Referenced by get_dens_from_fock_sparse(), get_HML_dens_matrix(), and SCF_general::SCF_general().
|
inline |
References SET, and store_all_eigenvalues_to_file.
Referenced by SCF_general::SCF_general().
|
inline |
Set maximum allowed error in invariant subspaces of the density matrix.
References subspaceErrorLimit.
Referenced by set_purification_limits().
|
inline |
Set truncation norm used in the recursive expansion.
Possible norms: spectral, Frobenius or mixed.
[in] | truncationNormPurification_ | Norm used in truncation. |
References truncationNormPurification.
Referenced by get_dens_from_fock_sparse(), get_HML_dens_matrix(), and SCF_general::SCF_general().
|
inline |
References SET, and try_eigv_on_next_iteration_if_fail.
Referenced by compute_eigenvectors().
|
inline |
References SET, and use_acceleration.
Referenced by SCF_general::SCF_general().
|
inline |
References SET, and use_diag_on_error.
Referenced by SCF_restricted::disturb_dens_matrix_exact_try(), SCF_restricted::disturb_fock_matrix(), get_HML_dens_matrix(), SCF_unrestricted::get_starting_guess_density(), SCF_restricted::get_starting_guess_density(), load_density_and_project_sparse(), and SCF_general::SCF_general().
|
inline |
References SET, and use_diag_on_error_guess.
Referenced by SCF_general::SCF_general().
|
inline |
References SET, and use_diagonalization.
Referenced by SCF_restricted::disturb_dens_matrix_exact_try(), SCF_restricted::disturb_fock_matrix(), get_HML_dens_matrix(), and SCF_general::SCF_general().
|
inline |
References SET, and use_new_stopping_criterion.
Referenced by SCF_general::SCF_general().
|
inline |
References SET, and use_prev_vector_as_initial_guess.
Referenced by compute_eigenvectors().
|
inline |
References SET, and use_purification.
Referenced by SCF_general::SCF_general().
|
inline |
Do not plot figures from the recursive expansion.
References create_m_files, plot_puri_results, plot_puri_results_str, UNDEF_VALUE, and UNSET.
Referenced by SCF_unrestricted::get_new_density_matrix(), SCF_restricted::get_new_density_matrix(), load_density_and_project_sparse(), and SCF_general::SCF_general().
|
inline |
References output_homo_and_lumo_eigenvectors, and UNSET.
Referenced by get_HML_dens_matrix(), and SCF_general::SCF_general().
|
inline |
References puri_compute_eigv_in_each_iteration, and UNSET.
Referenced by compute_eigenvectors_extra().
|
inline |
References create_m_files, and UNSET.
Referenced by get_HML_dens_matrix(), and SCF_general::SCF_general().
|
inline |
References ignore_purification_failure, and UNSET.
Referenced by get_HML_dens_matrix(), and SCF_general::SCF_general().
|
inline |
References UNSET, and use_rand_perturbation_for_alleigsint.
Referenced by get_HML_dens_matrix(), and SCF_general::SCF_general().
|
inline |
References run_shift_and_square_method_on_F, and UNSET.
Referenced by compute_eigenvectors_extra().
|
inline |
References save_permuted_F_matrix_in_bin, and UNSET.
Referenced by SCF_general::SCF_general().
|
inline |
References SCF_step, and UNDEF_VALUE_UINT.
|
inline |
References stats_prefix.
|
inline |
References store_all_eigenvalues_to_file, and UNSET.
Referenced by get_HML_dens_matrix(), and SCF_general::SCF_general().
|
inline |
References try_eigv_on_next_iteration_if_fail, and UNSET.
Referenced by compute_eigenvectors().
|
inline |
References UNSET, and use_acceleration.
Referenced by get_HML_dens_matrix(), and SCF_general::SCF_general().
|
inline |
References UNSET, and use_diag_on_error.
Referenced by SCF_restricted::disturb_dens_matrix_exact_try(), SCF_restricted::disturb_fock_matrix(), SCF_unrestricted::get_starting_guess_density(), SCF_restricted::get_starting_guess_density(), load_density_and_project_sparse(), and SCF_general::SCF_general().
|
inline |
References UNSET, and use_diag_on_error_guess.
Referenced by get_HML_dens_matrix(), and SCF_general::SCF_general().
|
inline |
References UNSET, and use_diagonalization.
Referenced by SCF_restricted::disturb_dens_matrix_exact_try(), SCF_restricted::disturb_fock_matrix(), and SCF_general::SCF_general().
|
inline |
References UNSET, and use_new_stopping_criterion.
Referenced by get_HML_dens_matrix(), and SCF_general::SCF_general().
|
inline |
References UNSET, and use_prev_vector_as_initial_guess.
Referenced by compute_eigenvectors().
|
inline |
References UNSET, and use_purification.
Referenced by get_HML_dens_matrix(), and SCF_general::SCF_general().
|
private |
Information about leavesSizeMax and blocksize for CHTMatrix.
Referenced by create_checkpoint(), get_dens_from_fock_sparse(), GetDensFromFock(), restore_from_checkpoint(), and set_cht_matrix_params().
|
private |
Flag to create m-files with information about the purification process.
Referenced by create_checkpoint(), get_purification_create_m_files(), GetDensFromFock(), restore_from_checkpoint(), set_generate_figures(), set_purification_create_m_files(), unset_generate_figures(), and unset_purification_create_m_files().
|
private |
Density matrix from previous SCF cycle (written to file)
|
private |
The accuracy for the eigenvalue problem solver.
Referenced by compute_eigenvectors(), create_checkpoint(), get_dens_from_fock_sparse(), GetDensFromFock(), and restore_from_checkpoint().
|
private |
Maximum number of iterations for the eigenvalue problem solver.
Referenced by compute_eigenvectors(), create_checkpoint(), get_dens_from_fock_sparse(), GetDensFromFock(), and restore_from_checkpoint().
|
private |
Iterative method for computing eigenvectors: power or lanczos.
Referenced by compute_eigenvectors(), create_checkpoint(), get_dens_from_fock_sparse(), GetDensFromFock(), and restore_from_checkpoint().
|
private |
Method for computing eigenvectors: square or projection.
Referenced by compute_eigenvectors(), create_checkpoint(), get_dens_from_fock_sparse(), GetDensFromFock(), and restore_from_checkpoint().
|
private |
Tolerated deviation of eigenvalues from 0 and 1 in the computed density matrix.
Referenced by create_checkpoint(), get_dens_from_fock_sparse(), get_eigvalueErrorLimit(), GetDensFromFock(), restore_from_checkpoint(), and set_eigvalueErrorLimit().
|
private |
Electronic temperature.
Referenced by create_checkpoint(), get_dens_from_fock(), GetDensFromFock(), restore_from_checkpoint(), and set_diagonalization_params().
|
private |
Factor to scale the resulting density matrix.
(for restricted vs unrestricted calc)
Referenced by create_checkpoint(), do_restricted_calculations(), do_unrestricted_calculations(), get_dens_from_fock(), get_dens_from_fock_sparse(), GetDensFromFock(), and restore_from_checkpoint().
|
private |
Referenced by create_checkpoint(), GetDensFromFock(), and restore_from_checkpoint().
|
private |
Referenced by GetDensFromFock().
|
private |
Referenced by create_checkpoint(), GetDensFromFock(), and restore_from_checkpoint().
|
private |
Referenced by create_checkpoint(), GetDensFromFock(), and restore_from_checkpoint().
|
private |
Referenced by create_checkpoint(), GetDensFromFock(), and restore_from_checkpoint().
|
private |
Referenced by create_checkpoint(), GetDensFromFock(), and restore_from_checkpoint().
|
private |
Referenced by create_checkpoint(), GetDensFromFock(), and restore_from_checkpoint().
|
private |
Referenced by create_checkpoint(), GetDensFromFock(), and restore_from_checkpoint().
|
private |
Expected lower bound for the gap to be used in early iterations.
Referenced by create_checkpoint(), get_dens_from_fock_sparse(), GetDensFromFock(), restore_from_checkpoint(), and set_gap_expected_lower_bound().
|
private |
|
private |
|
private |
Continue even if purification fails to converge.
Referenced by create_checkpoint(), get_dens_from_fock_sparse(), get_purification_ignore_failure(), GetDensFromFock(), restore_from_checkpoint(), set_purification_ignore_failure(), and unset_purification_ignore_failure().
|
private |
Inverse Cholesky factor (written to file)
Referenced by create_checkpoint(), get_dens_from_fock_sparse(), restore_from_checkpoint(), and set_invCholFactor().
|
private |
Euclidean norm of inverse Cholesky factor.
Referenced by create_checkpoint(), GetDensFromFock(), restore_from_checkpoint(), and set_invCholFactor().
|
private |
Information about leavesSizeMax and blocksize for CHTMatrix.
Referenced by create_checkpoint(), get_dens_from_fock_sparse(), GetDensFromFock(), restore_from_checkpoint(), and set_cht_matrix_params().
|
private |
|
private |
|
private |
Information about HML matrix block sizes etc.
Referenced by create_checkpoint(), get_dens_from_fock(), get_SizesAndBlocks(), restore_from_checkpoint(), and set_general_params().
|
private |
Maximum allowed number of matrix multiplications in the purification.
Referenced by create_checkpoint(), get_dens_from_fock_sparse(), GetDensFromFock(), restore_from_checkpoint(), and set_purification_maxmul().
|
private |
System size.
Referenced by create_checkpoint(), get_dens_from_fock(), get_dens_from_fock_sparse(), GetDensFromFock(), restore_from_checkpoint(), and set_general_params().
|
private |
Number of occupied orbitals.
Referenced by create_checkpoint(), get_dens_from_fock(), get_dens_from_fock_sparse(), GetDensFromFock(), restore_from_checkpoint(), and set_no_occupied_orbs().
|
private |
Compute homo and lumo eigenvectors and write them to the file.
Referenced by create_checkpoint(), get_dens_from_fock_sparse(), get_output_homo_and_lumo_eigenvectors(), GetDensFromFock(), restore_from_checkpoint(), set_output_homo_and_lumo_eigenvectors(), and unset_output_homo_and_lumo_eigenvectors().
|
private |
Overlap matrix (written to file)
Referenced by create_checkpoint(), get_dens_from_fock(), restore_from_checkpoint(), and set_overlapMatrix().
|
private |
Plot results of the purification from this function call.
Referenced by create_checkpoint(), get_dens_from_fock_sparse(), GetDensFromFock(), restore_from_checkpoint(), set_generate_figures(), and unset_generate_figures().
|
private |
|
private |
Compute eigenvectors in each iteration of the recursive expansion.
Referenced by get_dens_from_fock_sparse(), get_puri_compute_eigv_in_each_iteration(), GetDensFromFock(), set_puri_compute_eigv_in_each_iteration(), and unset_puri_compute_eigv_in_each_iteration().
|
private |
With this number will be multiplied the tolerated deviation of eigenvalues from 0 and 1 in the computed density matrix for the initial guess density matrix.
Referenced by get_puri_eig_acc_factor_for_guess(), GetDensFromFock(), set_puri_eig_acc_factor_for_guess(), and set_purification_limits().
|
private |
Referenced by clean_puri_stats(), get_dens_from_fock_sparse(), and get_puri_stats().
|
private |
Referenced by get_dens_from_fock(), and get_result_entropy_term().
|
private |
(for comparison) Run shift_and_square method to get eigenvectors of the matrix F for various shifts.
Referenced by get_dens_from_fock_sparse(), get_run_shift_and_square_method_on_F(), GetDensFromFock(), set_run_shift_and_square_method_on_F(), and unset_run_shift_and_square_method_on_F().
|
private |
Save sparse matrix F into bin file in the current permutation of rows and columns.
Referenced by get_dens_from_fock_sparse(), get_save_permuted_F_matrix_in_bin(), GetDensFromFock(), set_save_permuted_F_matrix_in_bin(), and unset_save_permuted_F_matrix_in_bin().
|
private |
|
static |
Referenced by create_checkpoint(), get_dens_from_fock(), get_dens_from_fock_sparse(), get_output_homo_and_lumo_eigenvectors(), get_purification_create_m_files(), get_purification_ignore_failure(), get_store_all_eigenvalues_to_file(), get_use_acceleration(), get_use_diag_on_error(), get_use_diag_on_error_guess(), get_use_diagonalization(), get_use_new_stopping_criterion(), get_use_purification(), get_use_rand_perturbation_for_alleigsint(), set_generate_figures(), set_output_homo_and_lumo_eigenvectors(), set_puri_compute_eigv_in_each_iteration(), set_purification_create_m_files(), set_purification_ignore_failure(), set_purification_use_rand_perturbation_for_alleigsint(), set_run_shift_and_square_method_on_F(), set_save_permuted_F_matrix_in_bin(), set_store_all_eigenvalues_to_file(), set_try_eigv_on_next_iteration_if_fail(), set_use_acceleration(), set_use_diag_on_error(), set_use_diag_on_error_guess(), set_use_diagonalization(), set_use_new_stopping_criterion(), set_use_prev_vector_as_initial_guess(), and set_use_purification().
|
private |
Prefix to be added to statistics files.
Referenced by create_checkpoint(), get_dens_from_fock_sparse(), get_stats_prefix(), GetDensFromFock(), restore_from_checkpoint(), set_stats_prefix(), and unset_stats_prefix().
|
private |
Norm to be used for stopping criterion.
Referenced by create_checkpoint(), get_dens_from_fock_sparse(), restore_from_checkpoint(), and set_stopCriterionNormPurification().
|
private |
Store eigenvalues to the file when doing diagonalization.
NOTE: works just with diagonalization
Referenced by create_checkpoint(), get_dens_from_fock(), get_store_all_eigenvalues_to_file(), GetDensFromFock(), restore_from_checkpoint(), set_store_all_eigenvalues_to_file(), and unset_store_all_eigenvalues_to_file().
|
private |
Tolerated error in the occupied subspace as measured by the sinus of the largest canonical angle.
Referenced by create_checkpoint(), get_dens_from_fock(), get_dens_from_fock_sparse(), get_subspaceErrorLimit(), GetDensFromFock(), restore_from_checkpoint(), and set_subspaceErrorLimit().
|
private |
Norm to be used for truncation.
Referenced by create_checkpoint(), get_dens_from_fock_sparse(), restore_from_checkpoint(), and set_truncationNormPurification().
|
private |
For square method: if eigenvector is not computed in iteration i, try to compute it in iteration i+1.
Referenced by create_checkpoint(), get_dens_from_fock_sparse(), get_try_eigv_on_next_iteration_if_fail(), GetDensFromFock(), restore_from_checkpoint(), set_try_eigv_on_next_iteration_if_fail(), and unset_try_eigv_on_next_iteration_if_fail().
|
static |
|
static |
Referenced by get_dens_from_fock_sparse(), and GetDensFromFock().
|
static |
Referenced by GetDensFromFock().
|
static |
Referenced by get_dens_from_fock_sparse(), GetDensFromFock(), and unset_SCF_step().
|
static |
Referenced by get_dens_from_fock_sparse(), unset_generate_figures(), unset_output_homo_and_lumo_eigenvectors(), unset_puri_compute_eigv_in_each_iteration(), unset_purification_create_m_files(), unset_purification_ignore_failure(), unset_purification_use_rand_perturbation_for_alleigsint(), unset_run_shift_and_square_method_on_F(), unset_save_permuted_F_matrix_in_bin(), unset_store_all_eigenvalues_to_file(), unset_try_eigv_on_next_iteration_if_fail(), unset_use_acceleration(), unset_use_diag_on_error(), unset_use_diag_on_error_guess(), unset_use_diagonalization(), unset_use_new_stopping_criterion(), unset_use_prev_vector_as_initial_guess(), and unset_use_purification().
|
private |
Use acceleration in the purification.
Referenced by create_checkpoint(), get_dens_from_fock_sparse(), get_use_acceleration(), GetDensFromFock(), restore_from_checkpoint(), set_use_acceleration(), and unset_use_acceleration().
|
private |
Flag to fall back on diagonalization if purification fails.
Referenced by create_checkpoint(), get_dens_from_fock(), get_use_diag_on_error(), GetDensFromFock(), restore_from_checkpoint(), set_use_diag_on_error(), and unset_use_diag_on_error().
|
private |
|
private |
Flag to turn on diagonalization.
Referenced by create_checkpoint(), get_dens_from_fock(), get_use_diagonalization(), GetDensFromFock(), restore_from_checkpoint(), set_use_diagonalization(), and unset_use_diagonalization().
|
private |
Use new parameterless stopping criterion.
Referenced by create_checkpoint(), get_dens_from_fock_sparse(), get_use_new_stopping_criterion(), GetDensFromFock(), restore_from_checkpoint(), set_use_new_stopping_criterion(), and unset_use_new_stopping_criterion().
|
private |
Use eigenvector from the previous SCF cycle as an initial guess in this cycle.
Referenced by create_checkpoint(), get_dens_from_fock_sparse(), get_use_prev_vector_as_initial_guess(), GetDensFromFock(), restore_from_checkpoint(), set_use_prev_vector_as_initial_guess(), and unset_use_prev_vector_as_initial_guess().
|
private |
Flag to turn on purification.
Referenced by create_checkpoint(), get_use_purification(), GetDensFromFock(), restore_from_checkpoint(), set_use_purification(), and unset_use_purification().
|
private |
Apply a random perturbation to (try to) improve the convergence speed of Lanczos calculation of extremal eigenvalues.
Referenced by create_checkpoint(), get_use_rand_perturbation_for_alleigsint(), GetDensFromFock(), restore_from_checkpoint(), set_purification_use_rand_perturbation_for_alleigsint(), and unset_purification_use_rand_perturbation_for_alleigsint().