davidson
Abstract module for Davidson’s diagonalization. It contains everything required for the Davidson algorithm, dressed or not. If a dressing is used, the dressing column should be defined and the davidson_dressed module should be used. If no dressing is required, the davidson module should be used, and it has a default zero dressing vector.
The important providers for that module are:
psi_energywhich is the expectation value over the wave function (psi_det,psi_coef) of the Hamiltonian, dressed or not. It uses the general subroutineu_0_H_u_0().psi_energy_two_ewhich is the expectation value over the wave function (psi_det,psi_coef) of the standard two-electron Coulomb operator. It uses the general routineu_0_H_u_0_two_e().
EZFIO parameters
- csf_based
If
true, use the CSF-based algorithmDefault: False
- only_expected_s2
If
true, use filter out all vectors with bad \(\widehat{S^2}\) valuesDefault: True
- without_diagonal
If
true, don’t use denominatorDefault: False
Providers
- ci_eigenvectors
File :
davidson/diagonalize_ci.irp.fdouble precision, allocatable :: ci_electronic_energy (N_states_diag) double precision, allocatable :: ci_eigenvectors (N_det,N_states_diag) double precision, allocatable :: ci_s2 (N_states_diag)
Eigenvectors/values of the CI matrix
Needs:
csf_baseddiag_algorithmdistributed_davidsondressing_column_hexpected_s2h_matrix_all_detsmo_two_e_integrals_in_map
n_detn_intn_statesn_states_diagnsomomaxnthreads_davidsononly_expected_s2
psi_coefpsi_dets2_eigs2_matrix_all_detsstate_followingthreshold_davidson
Needed by:
ci_energy
- ci_electronic_energy
File :
davidson/diagonalize_ci.irp.fdouble precision, allocatable :: ci_electronic_energy (N_states_diag) double precision, allocatable :: ci_eigenvectors (N_det,N_states_diag) double precision, allocatable :: ci_s2 (N_states_diag)
Eigenvectors/values of the CI matrix
Needs:
csf_baseddiag_algorithmdistributed_davidsondressing_column_hexpected_s2h_matrix_all_detsmo_two_e_integrals_in_map
n_detn_intn_statesn_states_diagnsomomaxnthreads_davidsononly_expected_s2
psi_coefpsi_dets2_eigs2_matrix_all_detsstate_followingthreshold_davidson
Needed by:
ci_energy
- ci_energy
File :
davidson/diagonalize_ci.irp.fdouble precision, allocatable :: ci_energy (N_states_diag)
n_stateslowest eigenvalues of the CI matrixNeeds:
ci_electronic_energydistributed_davidsonmpi_master
n_detn_statesn_states_diag
nuclear_repulsionoutput_wall_time_0
- ci_s2
File :
davidson/diagonalize_ci.irp.fdouble precision, allocatable :: ci_electronic_energy (N_states_diag) double precision, allocatable :: ci_eigenvectors (N_det,N_states_diag) double precision, allocatable :: ci_s2 (N_states_diag)
Eigenvectors/values of the CI matrix
Needs:
csf_baseddiag_algorithmdistributed_davidsondressing_column_hexpected_s2h_matrix_all_detsmo_two_e_integrals_in_map
n_detn_intn_statesn_states_diagnsomomaxnthreads_davidsononly_expected_s2
psi_coefpsi_dets2_eigs2_matrix_all_detsstate_followingthreshold_davidson
Needed by:
ci_energy
- diag_algorithm
File :
davidson/diagonalization_hs2_dressed.irp.fcharacter*(64) :: diag_algorithm
Diagonalization algorithm (Davidson or Lapack)
Needs:
n_det
n_det_max_full
n_states
Needed by:
ci_electronic_energy
- dressed_column_idx
File :
davidson/diagonalization_hs2_dressed.irp.finteger, allocatable :: dressed_column_idx (N_states)
Index of the dressed columns
Needs:
n_det
n_states
psi_coef
- overlap_states
File :
davidson/overlap_states.irp.fdouble precision, allocatable :: overlap_states (N_states,N_states) double precision, allocatable :: overlap_states_inv (N_states,N_states)
- S_kl = ck.T x cl
= psi_coef(:,k).T x psi_coef(:,l)
Needs:
n_det
n_states
psi_coef
- overlap_states_inv
File :
davidson/overlap_states.irp.fdouble precision, allocatable :: overlap_states (N_states,N_states) double precision, allocatable :: overlap_states_inv (N_states,N_states)
- S_kl = ck.T x cl
= psi_coef(:,k).T x psi_coef(:,l)
Needs:
n_det
n_states
psi_coef
- psi_energy
File :
davidson/u0_hs2_u0.irp.fdouble precision, allocatable :: psi_energy (N_states) double precision, allocatable :: psi_s2 (N_states)
psi_energy(i) = \(\langle \Psi_i | H | \Psi_i \rangle\)
psi_s2(i) = \(\langle \Psi_i | S^2 | \Psi_i \rangle\)
Needs:
distributed_davidsonh_matrix_all_detsn_detn_det_max_full
n_intn_statesn_states_diagpsi_coef
psi_detpsi_det_sizes2_matrix_all_dets
Needed by:
ci_energy_no_diag
psi_energy_with_nucl_rep
pt2_e0_denominator
- psi_energy_two_e
File :
davidson/u0_wee_u0.irp.fdouble precision, allocatable :: psi_energy_two_e (N_states)
Energy of the current wave function
Needs:
n_detn_int
n_statespsi_coef
psi_detpsi_det_size
- psi_energy_two_e_trans
File :
davidson/u0_wee_u0.irp.fdouble precision, allocatable :: psi_energy_two_e_trans (N_states,N_states)
psi_energy_two_e_trans(istate,jstate) = <Psi_istate|W_ee |Psi_jstate>
Needs:
big_array_coulomb_integralsbig_array_coulomb_integralsmo_integrals_mapmo_two_e_integrals_in_map
n_detn_intn_states
psi_coefpsi_detref_bitmask_energy
- psi_energy_with_nucl_rep
File :
davidson/u0_hs2_u0.irp.fdouble precision, allocatable :: psi_energy_with_nucl_rep (N_states)
Energy of the wave function with the nuclear repulsion energy.
Needs:
n_states
nuclear_repulsion
psi_energy
- psi_s2
File :
davidson/u0_hs2_u0.irp.fdouble precision, allocatable :: psi_energy (N_states) double precision, allocatable :: psi_s2 (N_states)
psi_energy(i) = \(\langle \Psi_i | H | \Psi_i \rangle\)
psi_s2(i) = \(\langle \Psi_i | S^2 | \Psi_i \rangle\)
Needs:
distributed_davidsonh_matrix_all_detsn_detn_det_max_full
n_intn_statesn_states_diagpsi_coef
psi_detpsi_det_sizes2_matrix_all_dets
Needed by:
ci_energy_no_diag
psi_energy_with_nucl_rep
pt2_e0_denominator
Subroutines / functions
- davidson_collector:
File :
davidson/davidson_parallel.irp.fsubroutine davidson_collector(zmq_to_qp_run_socket, zmq_socket_pull, v0, s0, sze, N_st)
Routine collecting the results of the workers in Davidson’s algorithm.
Needs:
n_det
Called by:
h_s2_u_0_nstates_zmq()
Calls:
davidson_pull_results()
- davidson_csf_collector:
File :
davidson/davidson_parallel_csf.irp.fsubroutine davidson_csf_collector(zmq_to_qp_run_socket, zmq_socket_pull, v0, sze, N_st)
Routine collecting the results of the workers in Davidson’s algorithm.
Needs:
n_det
Calls:
davidson_csf_pull_results()
- davidson_csf_pull_results:
File :
davidson/davidson_parallel_csf.irp.fsubroutine davidson_csf_pull_results(zmq_socket_pull, v_t, imin, imax, task_id)
Pull the results of $H | U rangle$ on the master.
Needs:
n_det
n_states_diag
Called by:
davidson_csf_collector()
- davidson_csf_push_results:
File :
davidson/davidson_parallel_csf.irp.fsubroutine davidson_csf_push_results(zmq_socket_push, v_t, imin, imax, task_id)
Push the results of $H | U rangle$ from a worker to the master.
Needs:
n_det
n_states_diag
- davidson_csf_push_results_async_send:
File :
davidson/davidson_parallel_csf.irp.fsubroutine davidson_csf_push_results_async_send(zmq_socket_push, v_t, imin, imax, task_id,sending)
Push the results of $H | U rangle$ from a worker to the master.
Needs:
n_det
n_states_diag
Called by:
davidson_csf_slave_work()
- davidson_csf_run_slave:
File :
davidson/davidson_parallel_csf.irp.fsubroutine davidson_csf_run_slave(thread,iproc)
Slave routine for Davidson’s diagonalization.
Needs:
n_det
n_states_diag
Called by:
davidson_csf_slave_inproc()
davidson_csf_slave_tcp()
Calls:
davidson_csf_slave_work()end_zmq_push_socket()
end_zmq_to_qp_run_socket()
sleep()
- davidson_csf_slave_inproc:
File :
davidson/davidson_parallel_csf.irp.fsubroutine davidson_csf_slave_inproc(i)
Calls:
davidson_csf_run_slave()
- davidson_csf_slave_tcp:
File :
davidson/davidson_parallel_csf.irp.fsubroutine davidson_csf_slave_tcp(i)
Calls:
davidson_csf_run_slave()
- davidson_csf_slave_work:
File :
davidson/davidson_parallel_csf.irp.fsubroutine davidson_csf_slave_work(zmq_to_qp_run_socket, zmq_socket_push, N_st, sze, worker_id)
Needs:
mpi_initializedmpi_rankn_detn_states_diag
nprocpsi_bilinear_matrix_columns_locpsi_bilinear_matrix_order_transp_reversepsi_bilinear_matrix_transp_values
psi_bilinear_matrix_valuespsi_det_alpha_uniquepsi_det_beta_uniqueref_bitmask_energy
Called by:
davidson_csf_run_slave()
Calls:
davidson_csf_push_results_async_send()
davidson_push_results_async_recv()
h_u_0_nstates_openmp_work()
- davidson_diag_csf_hjj:
File :
davidson/diagonalization_hcsf_dressed.irp.fsubroutine davidson_diag_csf_hjj(dets_in,u_in,H_jj,energies,dim_in,sze,sze_csf,N_st,N_st_diag_in,Nint,dressing_state,converged)
Davidson diagonalization with specific diagonal elements of the H matrix
H_jj : specific diagonal H matrix elements to diagonalize de Davidson
dets_in : bitmasks corresponding to determinants
- u_inguess coefficients on the various states. Overwritten
on exit
dim_in : leftmost dimension of u_in
sze : Number of determinants
N_st : Number of eigenstates
N_st_diag_in : Number of states in which H is diagonalized. Assumed > sze
Needs:
davidson_sze_maxdisk_based_davidsondistributed_davidsondressed_column_idxdressing_column_hexpected_s2ezfio_work_dirn_det
n_intnprocnthreads_davidsonnuclear_repulsionpsi_bilinear_matrix_valuespsi_bilinear_matrix_order_reversepsi_coefpsi_det_alpha_unique
psi_det_beta_uniqueqp_max_memstate_followingthreshold_davidsonthreshold_davidson_from_pt2threshold_davidson_pt2without_diagonal
Called by:
davidson_diag_h_csf()
Calls:
c_f_pointer()check_mem()convertwffromcsftodet()convertwffromdettocsf()dgemm()dsygv()
h_u_0_nstates_openmp()h_u_0_nstates_zmq()mmap()munmap()normalize()nullify_small_elements()
random_number()resident_memory()write_double()write_int()write_time()
Touches:
nthreads_davidson
- davidson_diag_h:
File :
davidson/diagonalization_h_dressed.irp.fsubroutine davidson_diag_h(dets_in,u_in,dim_in,energies,sze,N_st,N_st_diag,Nint,dressing_state,converged)
Davidson diagonalization.
dets_in : bitmasks corresponding to determinants
- u_inguess coefficients on the various states. Overwritten
on exit
dim_in : leftmost dimension of u_in
sze : Number of determinants
N_st : Number of eigenstates
Initial guess vectors are not necessarily orthonormal
Needs:
dressing_column_h
mo_two_e_integrals_in_map
Calls:
davidson_diag_hjj()
Touches:
nthreads_davidson
- davidson_diag_h_csf:
File :
davidson/diagonalization_hcsf_dressed.irp.fsubroutine davidson_diag_h_csf(dets_in,u_in,dim_in,energies,sze,sze_csf,N_st,N_st_diag,Nint,dressing_state,converged)
Davidson diagonalization.
dets_in : bitmasks corresponding to determinants
- u_inguess coefficients on the various states. Overwritten
on exit
dim_in : leftmost dimension of u_in
sze : Number of determinants
N_st : Number of eigenstates
Needs:
dressing_column_h
mo_two_e_integrals_in_map
Called by:
ci_electronic_energy
Calls:
davidson_diag_csf_hjj()
Touches:
nthreads_davidson
- davidson_diag_hjj:
File :
davidson/diagonalization_h_dressed.irp.fsubroutine davidson_diag_hjj(dets_in,u_in,H_jj,energies,dim_in,sze,N_st,N_st_diag_in,Nint,dressing_state,converged)
Davidson diagonalization with specific diagonal elements of the H matrix
H_jj : specific diagonal H matrix elements to diagonalize de Davidson
dets_in : bitmasks corresponding to determinants
- u_inguess coefficients on the various states. Overwritten
on exit
dim_in : leftmost dimension of u_in
sze : Number of determinants
N_st : Number of eigenstates
N_st_diag_in : Number of states in which H is diagonalized. Assumed > sze
Initial guess vectors are not necessarily orthonormal
Needs:
davidson_sze_maxdisk_based_davidsondistributed_davidsondressed_column_idxdressing_column_hexpected_s2ezfio_work_dirn_det
n_intnprocnthreads_davidsonnuclear_repulsionpsi_bilinear_matrix_valuespsi_bilinear_matrix_order_reversepsi_coef
psi_det_alpha_uniquepsi_det_beta_uniqueqp_max_memstate_followingthreshold_davidsonthreshold_davidson_from_pt2threshold_davidson_pt2
Called by:
davidson_diag_h()
Calls:
c_f_pointer()check_mem()dgemm()dsygv()h_u_0_nstates_openmp()
h_u_0_nstates_zmq()mmap()munmap()normalize()nullify_small_elements()
random_number()resident_memory()write_double()write_int()write_time()
Touches:
nthreads_davidson
- davidson_diag_hjj_sjj:
File :
davidson/diagonalization_hs2_dressed.irp.fsubroutine davidson_diag_hjj_sjj(dets_in,u_in,H_jj,s2_out,energies,dim_in,sze,N_st,N_st_diag_in,Nint,dressing_state,converged)
Davidson diagonalization with specific diagonal elements of the H matrix
H_jj : specific diagonal H matrix elements to diagonalize de Davidson
S2_out : Output : s^2
dets_in : bitmasks corresponding to determinants
- u_inguess coefficients on the various states. Overwritten
on exit
dim_in : leftmost dimension of u_in
sze : Number of determinants
N_st : Number of eigenstates
N_st_diag_in : Number of states in which H is diagonalized. Assumed > sze
Initial guess vectors are not necessarily orthonormal
Needs:
davidson_sze_maxdisk_based_davidsondistributed_davidsondressed_column_idxdressing_column_hexpected_s2n_detn_int
nprocnthreads_davidsonnuclear_repulsiononly_expected_s2psi_bilinear_matrix_valuespsi_bilinear_matrix_order_reversepsi_coef
psi_det_alpha_uniquepsi_det_beta_uniqueqp_max_memstate_followingthreshold_davidsonthreshold_davidson_from_pt2threshold_davidson_pt2
Called by:
davidson_diag_hs2()
Calls:
check_mem()dgemm()dswap()dsygv()h_s2_u_0_nstates_openmp()h_s2_u_0_nstates_zmq()
mmap_create_d()mmap_create_s()mmap_destroy()normalize()nullify_small_elements()random_number()
resident_memory()sgemm()write_double()write_int()write_time()
Touches:
nthreads_davidson
- davidson_diag_hs2:
File :
davidson/diagonalization_hs2_dressed.irp.fsubroutine davidson_diag_hs2(dets_in,u_in,s2_out,dim_in,energies,sze,N_st,N_st_diag,Nint,dressing_state,converged)
Davidson diagonalization.
dets_in : bitmasks corresponding to determinants
- u_inguess coefficients on the various states. Overwritten
on exit
dim_in : leftmost dimension of u_in
sze : Number of determinants
N_st : Number of eigenstates
Initial guess vectors are not necessarily orthonormal
Needs:
dressing_column_h
mo_two_e_integrals_in_map
Called by:
ci_electronic_energy
Calls:
davidson_diag_hjj_sjj()
Touches:
nthreads_davidson
- davidson_diag_nonsym_h:
File :
davidson/diagonalization_nonsym_h_dressed.irp.fsubroutine davidson_diag_nonsym_h(dets_in, u_in, dim_in, energies, sze, N_st, N_st_diag, Nint, dressing_state, converged)
non-sym Davidson diagonalization.
dets_in : bitmasks corresponding to determinants
u_in : guess coefficients on the various states. Overwritten on exit
dim_in : leftmost dimension of u_in
sze : Number of determinants
N_st : Number of eigenstates
Initial guess vectors are not necessarily orthonormal
Needs:
dressing_column_h
mo_two_e_integrals_in_map
overlap_states
Calls:
davidson_diag_nonsym_hjj()
Touches:
nthreads_davidson
- davidson_diag_nonsym_hjj:
File :
davidson/diagonalization_nonsym_h_dressed.irp.fsubroutine davidson_diag_nonsym_hjj(dets_in, u_in, H_jj, energies, dim_in, sze, N_st, N_st_diag_in, Nint, dressing_state, converged)
non-sym Davidson diagonalization with specific diagonal elements of the H matrix
H_jj : specific diagonal H matrix elements to diagonalize de Davidson
dets_in : bitmasks corresponding to determinants
u_in : guess coefficients on the various states. Overwritten on exit
dim_in : leftmost dimension of u_in
sze : Number of determinants
N_st : Number of eigenstates
N_st_diag_in : Number of states in which H is diagonalized. Assumed > sze
Initial guess vectors are not necessarily orthonormal
Needs:
davidson_sze_maxdisk_based_davidsondistributed_davidsondressing_column_hexpected_s2ezfio_work_dirn_detn_int
nprocnthreads_davidsonnuclear_repulsionoverlap_statespsi_bilinear_matrix_valuespsi_bilinear_matrix_order_reversepsi_coef
psi_det_alpha_uniquepsi_det_beta_uniqueqp_max_memstate_followingthreshold_davidson_from_pt2threshold_davidson_pt2threshold_nonsym_davidson
Called by:
davidson_diag_nonsym_h()
Calls:
c_f_pointer()check_mem()dgemm()diag_nonsym_right()h_u_0_nstates_openmp()h_u_0_nstates_zmq()
mmap()munmap()normalize()nullify_small_elements()ortho_qr()
random_number()resident_memory()write_double()write_int()write_time()
Touches:
nthreads_davidson
- davidson_nos2_collector:
File :
davidson/davidson_parallel_nos2.irp.fsubroutine davidson_nos2_collector(zmq_to_qp_run_socket, zmq_socket_pull, v0, sze, N_st)
Routine collecting the results of the workers in Davidson’s algorithm.
Needs:
n_det
Called by:
h_u_0_nstates_zmq()
Calls:
davidson_nos2_pull_results()
- davidson_nos2_pull_results:
File :
davidson/davidson_parallel_nos2.irp.fsubroutine davidson_nos2_pull_results(zmq_socket_pull, v_t, imin, imax, task_id)
Pull the results of $H | U rangle$ on the master.
Needs:
n_det
n_states_diag
Called by:
davidson_nos2_collector()
- davidson_nos2_push_results:
File :
davidson/davidson_parallel_nos2.irp.fsubroutine davidson_nos2_push_results(zmq_socket_push, v_t, imin, imax, task_id)
Push the results of $H | U rangle$ from a worker to the master.
Needs:
n_det
n_states_diag
- davidson_nos2_push_results_async_send:
File :
davidson/davidson_parallel_nos2.irp.fsubroutine davidson_nos2_push_results_async_send(zmq_socket_push, v_t, imin, imax, task_id,sending)
Push the results of $H | U rangle$ from a worker to the master.
Needs:
n_det
n_states_diag
Called by:
davidson_nos2_slave_work()
- davidson_nos2_run_slave:
File :
davidson/davidson_parallel_nos2.irp.fsubroutine davidson_nos2_run_slave(thread,iproc)
Slave routine for Davidson’s diagonalization.
Needs:
n_det
n_states_diag
Called by:
davidson_nos2_slave_inproc()
davidson_nos2_slave_tcp()
Calls:
davidson_nos2_slave_work()end_zmq_push_socket()
end_zmq_to_qp_run_socket()
sleep()
- davidson_nos2_slave_inproc:
File :
davidson/davidson_parallel_nos2.irp.fsubroutine davidson_nos2_slave_inproc(i)
Called by:
h_u_0_nstates_zmq()
Calls:
davidson_nos2_run_slave()
- davidson_nos2_slave_tcp:
File :
davidson/davidson_parallel_nos2.irp.fsubroutine davidson_nos2_slave_tcp(i)
Calls:
davidson_nos2_run_slave()
- davidson_nos2_slave_work:
File :
davidson/davidson_parallel_nos2.irp.fsubroutine davidson_nos2_slave_work(zmq_to_qp_run_socket, zmq_socket_push, N_st, sze, worker_id)
Needs:
mpi_initializedmpi_rankn_detn_states_diag
nprocpsi_bilinear_matrix_columns_locpsi_bilinear_matrix_order_transp_reversepsi_bilinear_matrix_transp_values
psi_bilinear_matrix_valuespsi_det_alpha_uniquepsi_det_beta_uniqueref_bitmask_energy
Called by:
davidson_nos2_run_slave()
Calls:
davidson_nos2_push_results_async_send()
davidson_push_results_async_recv()
h_u_0_nstates_openmp_work()
- davidson_pull_results:
File :
davidson/davidson_parallel.irp.fsubroutine davidson_pull_results(zmq_socket_pull, v_t, s_t, imin, imax, task_id)
Pull the results of $H | U rangle$ on the master.
Needs:
n_det
n_states_diag
Called by:
davidson_collector()
- davidson_push_results:
File :
davidson/davidson_parallel.irp.fsubroutine davidson_push_results(zmq_socket_push, v_t, s_t, imin, imax, task_id)
Push the results of $H | U rangle$ from a worker to the master.
Needs:
n_det
n_states_diag
- davidson_push_results_async_recv:
File :
davidson/davidson_parallel.irp.fsubroutine davidson_push_results_async_recv(zmq_socket_push,sending)
Push the results of $H | U rangle$ from a worker to the master.
Called by:
davidson_csf_slave_work()
davidson_nos2_slave_work()
davidson_slave_work()
- davidson_push_results_async_send:
File :
davidson/davidson_parallel.irp.fsubroutine davidson_push_results_async_send(zmq_socket_push, v_t, s_t, imin, imax, task_id,sending)
Push the results of $H | U rangle$ from a worker to the master.
Needs:
n_det
n_states_diag
Called by:
davidson_slave_work()
- davidson_run_slave:
File :
davidson/davidson_parallel.irp.fsubroutine davidson_run_slave(thread,iproc)
Slave routine for Davidson’s diagonalization.
Needs:
n_det
n_states_diag
Called by:
davidson_slave_inproc()
davidson_slave_tcp()
Calls:
davidson_slave_work()end_zmq_push_socket()
end_zmq_to_qp_run_socket()
sleep()
- davidson_slave_inproc:
File :
davidson/davidson_parallel.irp.fsubroutine davidson_slave_inproc(i)
Called by:
h_s2_u_0_nstates_zmq()
Calls:
davidson_run_slave()
- davidson_slave_tcp:
File :
davidson/davidson_parallel.irp.fsubroutine davidson_slave_tcp(i)
Called by:
run_slave_main()
Calls:
davidson_run_slave()
- davidson_slave_work:
File :
davidson/davidson_parallel.irp.fsubroutine davidson_slave_work(zmq_to_qp_run_socket, zmq_socket_push, N_st, sze, worker_id)
Needs:
mpi_initializedmpi_rankn_detn_states_diag
nprocpsi_bilinear_matrix_columns_locpsi_bilinear_matrix_order_transp_reversepsi_bilinear_matrix_transp_values
psi_bilinear_matrix_valuespsi_det_alpha_uniquepsi_det_beta_uniqueref_bitmask_energy
Called by:
davidson_run_slave()
Calls:
davidson_push_results_async_recv()davidson_push_results_async_send()
h_s2_u_0_nstates_openmp_work()lock_io()
unlock_io()
- diagonalize_ci:
File :
davidson/diagonalize_ci.irp.fsubroutine diagonalize_CI
Replace the coefficients of the CI states by the coefficients of the eigenstates of the CI matrix.
Needs:
ci_electronic_energyci_electronic_energyci_energyci_electronic_energy
distributed_davidsonn_detn_states
psi_coefpsi_energypsi_energy
Called by:
remove_small_contributions()run_cipsi()
run_orb_opt_trust_v2()run_stochastic_cipsi()
update_parameters()
Touches:
ci_electronic_energyci_electronic_energyci_energy
ci_electronic_energypsi_coef
psi_energypsi_energy
- h_s2_u_0_nstates_openmp:
File :
davidson/u0_hs2_u0.irp.fsubroutine H_S2_u_0_nstates_openmp(v_0,s_0,u_0,N_st,sze)
Computes $v_0 = H | u_0rangle$ and $s_0 = S^2 | u_0rangle$.
Assumes that the determinants are in psi_det
istart, iend, ishift, istep are used in ZMQ parallelization.
Needs:
n_det
psi_bilinear_matrix_order_reverse
psi_bilinear_matrix_values
Called by:
davidson_diag_hjj_sjj()
u_0_hs2_u_0()
Calls:
dset_order()
dtranspose()
h_s2_u_0_nstates_openmp_work()
- h_s2_u_0_nstates_openmp_work:
File :
davidson/u0_hs2_u0.irp.fsubroutine H_S2_u_0_nstates_openmp_work(v_t,s_t,u_t,N_st,sze,istart,iend,ishift,istep)
Computes $v_t = H | u_trangle$ and $s_t = S^2 | u_trangle$
Default should be 1,N_det,0,1
Needs:
n_det
n_int
ref_bitmask_energy
Called by:
davidson_slave_work()
h_s2_u_0_nstates_openmp()
Calls:
h_s2_u_0_nstates_openmp_work_1()h_s2_u_0_nstates_openmp_work_2()
h_s2_u_0_nstates_openmp_work_3()h_s2_u_0_nstates_openmp_work_4()
h_s2_u_0_nstates_openmp_work_n_int()
- h_s2_u_0_nstates_openmp_work_1:
File :
davidson/u0_hs2_u0.irp.f_template_807subroutine H_S2_u_0_nstates_openmp_work_1(v_t,s_t,u_t,N_st,sze,istart,iend,ishift,istep)
Computes $v_t = H | u_t rangle$ and $s_t = S^2 | u_trangle$
Default should be 1,N_det,0,1
Needs:
n_detn_intnthreads_davidsonpsi_bilinear_matrix_columns_locpsi_bilinear_matrix_order_transp_reverse
psi_bilinear_matrix_transp_rows_locpsi_bilinear_matrix_transp_valuespsi_bilinear_matrix_valuespsi_det_alpha_uniquepsi_det_beta_unique
singles_alpha_cscsingles_alpha_csc_idxsingles_beta_cscsingles_beta_csc_idx
Called by:
h_s2_u_0_nstates_openmp_work()
Calls:
get_all_spin_singles_1()get_all_spin_singles_and_doubles_1()
get_s2()i_h_j_double_alpha_beta()
i_h_j_double_spin()i_h_j_single_spin()
- h_s2_u_0_nstates_openmp_work_2:
File :
davidson/u0_hs2_u0.irp.f_template_807subroutine H_S2_u_0_nstates_openmp_work_2(v_t,s_t,u_t,N_st,sze,istart,iend,ishift,istep)
Computes $v_t = H | u_t rangle$ and $s_t = S^2 | u_trangle$
Default should be 1,N_det,0,1
Needs:
n_detn_intnthreads_davidsonpsi_bilinear_matrix_columns_locpsi_bilinear_matrix_order_transp_reverse
psi_bilinear_matrix_transp_rows_locpsi_bilinear_matrix_transp_valuespsi_bilinear_matrix_valuespsi_det_alpha_uniquepsi_det_beta_unique
singles_alpha_cscsingles_alpha_csc_idxsingles_beta_cscsingles_beta_csc_idx
Called by:
h_s2_u_0_nstates_openmp_work()
Calls:
get_all_spin_singles_2()get_all_spin_singles_and_doubles_2()
get_s2()i_h_j_double_alpha_beta()
i_h_j_double_spin()i_h_j_single_spin()
- h_s2_u_0_nstates_openmp_work_3:
File :
davidson/u0_hs2_u0.irp.f_template_807subroutine H_S2_u_0_nstates_openmp_work_3(v_t,s_t,u_t,N_st,sze,istart,iend,ishift,istep)
Computes $v_t = H | u_t rangle$ and $s_t = S^2 | u_trangle$
Default should be 1,N_det,0,1
Needs:
n_detn_intnthreads_davidsonpsi_bilinear_matrix_columns_locpsi_bilinear_matrix_order_transp_reverse
psi_bilinear_matrix_transp_rows_locpsi_bilinear_matrix_transp_valuespsi_bilinear_matrix_valuespsi_det_alpha_uniquepsi_det_beta_unique
singles_alpha_cscsingles_alpha_csc_idxsingles_beta_cscsingles_beta_csc_idx
Called by:
h_s2_u_0_nstates_openmp_work()
Calls:
get_all_spin_singles_3()get_all_spin_singles_and_doubles_3()
get_s2()i_h_j_double_alpha_beta()
i_h_j_double_spin()i_h_j_single_spin()
- h_s2_u_0_nstates_openmp_work_4:
File :
davidson/u0_hs2_u0.irp.f_template_807subroutine H_S2_u_0_nstates_openmp_work_4(v_t,s_t,u_t,N_st,sze,istart,iend,ishift,istep)
Computes $v_t = H | u_t rangle$ and $s_t = S^2 | u_trangle$
Default should be 1,N_det,0,1
Needs:
n_detn_intnthreads_davidsonpsi_bilinear_matrix_columns_locpsi_bilinear_matrix_order_transp_reverse
psi_bilinear_matrix_transp_rows_locpsi_bilinear_matrix_transp_valuespsi_bilinear_matrix_valuespsi_det_alpha_uniquepsi_det_beta_unique
singles_alpha_cscsingles_alpha_csc_idxsingles_beta_cscsingles_beta_csc_idx
Called by:
h_s2_u_0_nstates_openmp_work()
Calls:
get_all_spin_singles_4()get_all_spin_singles_and_doubles_4()
get_s2()i_h_j_double_alpha_beta()
i_h_j_double_spin()i_h_j_single_spin()
- h_s2_u_0_nstates_openmp_work_n_int:
File :
davidson/u0_hs2_u0.irp.f_template_807subroutine H_S2_u_0_nstates_openmp_work_N_int(v_t,s_t,u_t,N_st,sze,istart,iend,ishift,istep)
Computes $v_t = H | u_t rangle$ and $s_t = S^2 | u_trangle$
Default should be 1,N_det,0,1
Needs:
n_detn_intnthreads_davidsonpsi_bilinear_matrix_columns_locpsi_bilinear_matrix_order_transp_reverse
psi_bilinear_matrix_transp_rows_locpsi_bilinear_matrix_transp_valuespsi_bilinear_matrix_valuespsi_det_alpha_uniquepsi_det_beta_unique
singles_alpha_cscsingles_alpha_csc_idxsingles_beta_cscsingles_beta_csc_idx
Called by:
h_s2_u_0_nstates_openmp_work()
Calls:
get_all_spin_singles_and_doubles_n_int()get_all_spin_singles_n_int()
get_s2()i_h_j_double_alpha_beta()
i_h_j_double_spin()i_h_j_single_spin()
- h_s2_u_0_nstates_zmq:
File :
davidson/davidson_parallel.irp.fsubroutine H_S2_u_0_nstates_zmq(v_0,s_0,u_0,N_st,sze)
Computes $v_0 = H | u_0rangle$ and $s_0 = S^2 | u_0rangle$
n : number of determinants
H_jj : array of $langle j | H | j rangle$
S2_jj : array of $langle j | S^2 | j rangle$
Needs:
mpi_initializedn_detnprocpsi_bilinear_matrix_columns_loc
psi_bilinear_matrix_order_reversepsi_bilinear_matrix_order_transp_reversepsi_bilinear_matrix_transp_valuespsi_bilinear_matrix_values
psi_det_alpha_uniquepsi_det_beta_uniqueref_bitmask_energy
Called by:
davidson_diag_hjj_sjj()
u_0_hs2_u_0()
Calls:
davidson_collector()davidson_slave_inproc()dset_order()
dtranspose()end_parallel_job()
new_parallel_job()set_multiple_levels_omp()
- h_s2_u_0_two_e_nstates_openmp:
File :
davidson/u0_wee_u0.irp.fsubroutine H_S2_u_0_two_e_nstates_openmp(v_0,s_0,u_0,N_st,sze)
Computes $v_0 = H | u_0rangle$ and $s_0 = S^2 | u_0rangle$
Assumes that the determinants are in psi_det
istart, iend, ishift, istep are used in ZMQ parallelization.
Needs:
n_det
psi_bilinear_matrix_order_reverse
psi_bilinear_matrix_values
Called by:
u_0_h_u_0_two_e()
Calls:
dset_order()
dtranspose()
h_s2_u_0_two_e_nstates_openmp_work()
- h_s2_u_0_two_e_nstates_openmp_work:
File :
davidson/u0_wee_u0.irp.fsubroutine H_S2_u_0_two_e_nstates_openmp_work(v_t,s_t,u_t,N_st,sze,istart,iend,ishift,istep)
Computes $v_t = H | u_trangle$ and $s_t = S^2 | u_trangle$
Default should be 1,N_det,0,1
Needs:
n_det
n_int
ref_bitmask_energy
Called by:
h_s2_u_0_two_e_nstates_openmp()
Calls:
h_s2_u_0_two_e_nstates_openmp_work_1()h_s2_u_0_two_e_nstates_openmp_work_2()
h_s2_u_0_two_e_nstates_openmp_work_3()h_s2_u_0_two_e_nstates_openmp_work_4()
h_s2_u_0_two_e_nstates_openmp_work_n_int()
- h_s2_u_0_two_e_nstates_openmp_work_1:
File :
davidson/u0_wee_u0.irp.f_template_457subroutine H_S2_u_0_two_e_nstates_openmp_work_1(v_t,s_t,u_t,N_st,sze,istart,iend,ishift,istep)
Computes $v_t = H | u_t rangle$ and $s_t = S^2 | u_t rangle$
Default should be 1,N_det,0,1
Needs:
n_detn_intnthreads_davidsonpsi_bilinear_matrix_columns_loc
psi_bilinear_matrix_order_transp_reversepsi_bilinear_matrix_transp_rows_locpsi_bilinear_matrix_transp_values
psi_bilinear_matrix_valuespsi_det_alpha_uniquepsi_det_beta_unique
Called by:
h_s2_u_0_two_e_nstates_openmp_work()
Calls:
get_all_spin_singles_1()get_all_spin_singles_and_doubles_1()
get_s2()i_h_j_double_alpha_beta()
i_h_j_double_spin()i_wee_j_single()
- h_s2_u_0_two_e_nstates_openmp_work_2:
File :
davidson/u0_wee_u0.irp.f_template_457subroutine H_S2_u_0_two_e_nstates_openmp_work_2(v_t,s_t,u_t,N_st,sze,istart,iend,ishift,istep)
Computes $v_t = H | u_t rangle$ and $s_t = S^2 | u_t rangle$
Default should be 1,N_det,0,1
Needs:
n_detn_intnthreads_davidsonpsi_bilinear_matrix_columns_loc
psi_bilinear_matrix_order_transp_reversepsi_bilinear_matrix_transp_rows_locpsi_bilinear_matrix_transp_values
psi_bilinear_matrix_valuespsi_det_alpha_uniquepsi_det_beta_unique
Called by:
h_s2_u_0_two_e_nstates_openmp_work()
Calls:
get_all_spin_singles_2()get_all_spin_singles_and_doubles_2()
get_s2()i_h_j_double_alpha_beta()
i_h_j_double_spin()i_wee_j_single()
- h_s2_u_0_two_e_nstates_openmp_work_3:
File :
davidson/u0_wee_u0.irp.f_template_457subroutine H_S2_u_0_two_e_nstates_openmp_work_3(v_t,s_t,u_t,N_st,sze,istart,iend,ishift,istep)
Computes $v_t = H | u_t rangle$ and $s_t = S^2 | u_t rangle$
Default should be 1,N_det,0,1
Needs:
n_detn_intnthreads_davidsonpsi_bilinear_matrix_columns_loc
psi_bilinear_matrix_order_transp_reversepsi_bilinear_matrix_transp_rows_locpsi_bilinear_matrix_transp_values
psi_bilinear_matrix_valuespsi_det_alpha_uniquepsi_det_beta_unique
Called by:
h_s2_u_0_two_e_nstates_openmp_work()
Calls:
get_all_spin_singles_3()get_all_spin_singles_and_doubles_3()
get_s2()i_h_j_double_alpha_beta()
i_h_j_double_spin()i_wee_j_single()
- h_s2_u_0_two_e_nstates_openmp_work_4:
File :
davidson/u0_wee_u0.irp.f_template_457subroutine H_S2_u_0_two_e_nstates_openmp_work_4(v_t,s_t,u_t,N_st,sze,istart,iend,ishift,istep)
Computes $v_t = H | u_t rangle$ and $s_t = S^2 | u_t rangle$
Default should be 1,N_det,0,1
Needs:
n_detn_intnthreads_davidsonpsi_bilinear_matrix_columns_loc
psi_bilinear_matrix_order_transp_reversepsi_bilinear_matrix_transp_rows_locpsi_bilinear_matrix_transp_values
psi_bilinear_matrix_valuespsi_det_alpha_uniquepsi_det_beta_unique
Called by:
h_s2_u_0_two_e_nstates_openmp_work()
Calls:
get_all_spin_singles_4()get_all_spin_singles_and_doubles_4()
get_s2()i_h_j_double_alpha_beta()
i_h_j_double_spin()i_wee_j_single()
- h_s2_u_0_two_e_nstates_openmp_work_n_int:
File :
davidson/u0_wee_u0.irp.f_template_457subroutine H_S2_u_0_two_e_nstates_openmp_work_N_int(v_t,s_t,u_t,N_st,sze,istart,iend,ishift,istep)
Computes $v_t = H | u_t rangle$ and $s_t = S^2 | u_t rangle$
Default should be 1,N_det,0,1
Needs:
n_detn_intnthreads_davidsonpsi_bilinear_matrix_columns_loc
psi_bilinear_matrix_order_transp_reversepsi_bilinear_matrix_transp_rows_locpsi_bilinear_matrix_transp_values
psi_bilinear_matrix_valuespsi_det_alpha_uniquepsi_det_beta_unique
Called by:
h_s2_u_0_two_e_nstates_openmp_work()
Calls:
get_all_spin_singles_and_doubles_n_int()get_all_spin_singles_n_int()
get_s2()i_h_j_double_alpha_beta()
i_h_j_double_spin()i_wee_j_single()
- h_u_0_nstates_openmp:
File :
davidson/u0_h_u0.irp.fsubroutine H_u_0_nstates_openmp(v_0,u_0,N_st,sze)
Computes $v_0 = H | u_0rangle$.
Assumes that the determinants are in psi_det
istart, iend, ishift, istep are used in ZMQ parallelization.
Needs:
n_det
psi_bilinear_matrix_order_reverse
psi_bilinear_matrix_values
Called by:
davidson_diag_csf_hjj()davidson_diag_hjj()
davidson_diag_nonsym_hjj()
u_0_h_u_0()
Calls:
dset_order()
dtranspose()
h_u_0_nstates_openmp_work()
- h_u_0_nstates_openmp_work:
File :
davidson/u0_h_u0.irp.fsubroutine H_u_0_nstates_openmp_work(v_t,u_t,N_st,sze,istart,iend,ishift,istep)
Computes $v_t = H | u_trangle$
Default should be 1,N_det,0,1
Needs:
n_det
n_int
ref_bitmask_energy
Called by:
davidson_csf_slave_work()
davidson_nos2_slave_work()
h_u_0_nstates_openmp()
Calls:
h_u_0_nstates_openmp_work_1()h_u_0_nstates_openmp_work_2()
h_u_0_nstates_openmp_work_3()h_u_0_nstates_openmp_work_4()
h_u_0_nstates_openmp_work_n_int()
- h_u_0_nstates_openmp_work_1:
File :
davidson/u0_h_u0.irp.f_template_757subroutine H_u_0_nstates_openmp_work_1(v_t,u_t,N_st,sze,istart,iend,ishift,istep)
Computes $v_t = H | u_t rangle$
Default should be 1,N_det,0,1
Needs:
n_detn_intnthreads_davidsonpsi_bilinear_matrix_columns_locpsi_bilinear_matrix_order_transp_reverse
psi_bilinear_matrix_transp_rows_locpsi_bilinear_matrix_transp_valuespsi_bilinear_matrix_valuespsi_det_alpha_uniquepsi_det_beta_unique
singles_alpha_cscsingles_alpha_csc_idxsingles_beta_cscsingles_beta_csc_idx
Called by:
h_u_0_nstates_openmp_work()
Calls:
get_all_spin_singles_1()get_all_spin_singles_and_doubles_1()
i_h_j_double_alpha_beta()i_h_j_double_spin()
i_h_j_single_spin()
- h_u_0_nstates_openmp_work_2:
File :
davidson/u0_h_u0.irp.f_template_757subroutine H_u_0_nstates_openmp_work_2(v_t,u_t,N_st,sze,istart,iend,ishift,istep)
Computes $v_t = H | u_t rangle$
Default should be 1,N_det,0,1
Needs:
n_detn_intnthreads_davidsonpsi_bilinear_matrix_columns_locpsi_bilinear_matrix_order_transp_reverse
psi_bilinear_matrix_transp_rows_locpsi_bilinear_matrix_transp_valuespsi_bilinear_matrix_valuespsi_det_alpha_uniquepsi_det_beta_unique
singles_alpha_cscsingles_alpha_csc_idxsingles_beta_cscsingles_beta_csc_idx
Called by:
h_u_0_nstates_openmp_work()
Calls:
get_all_spin_singles_2()get_all_spin_singles_and_doubles_2()
i_h_j_double_alpha_beta()i_h_j_double_spin()
i_h_j_single_spin()
- h_u_0_nstates_openmp_work_3:
File :
davidson/u0_h_u0.irp.f_template_757subroutine H_u_0_nstates_openmp_work_3(v_t,u_t,N_st,sze,istart,iend,ishift,istep)
Computes $v_t = H | u_t rangle$
Default should be 1,N_det,0,1
Needs:
n_detn_intnthreads_davidsonpsi_bilinear_matrix_columns_locpsi_bilinear_matrix_order_transp_reverse
psi_bilinear_matrix_transp_rows_locpsi_bilinear_matrix_transp_valuespsi_bilinear_matrix_valuespsi_det_alpha_uniquepsi_det_beta_unique
singles_alpha_cscsingles_alpha_csc_idxsingles_beta_cscsingles_beta_csc_idx
Called by:
h_u_0_nstates_openmp_work()
Calls:
get_all_spin_singles_3()get_all_spin_singles_and_doubles_3()
i_h_j_double_alpha_beta()i_h_j_double_spin()
i_h_j_single_spin()
- h_u_0_nstates_openmp_work_4:
File :
davidson/u0_h_u0.irp.f_template_757subroutine H_u_0_nstates_openmp_work_4(v_t,u_t,N_st,sze,istart,iend,ishift,istep)
Computes $v_t = H | u_t rangle$
Default should be 1,N_det,0,1
Needs:
n_detn_intnthreads_davidsonpsi_bilinear_matrix_columns_locpsi_bilinear_matrix_order_transp_reverse
psi_bilinear_matrix_transp_rows_locpsi_bilinear_matrix_transp_valuespsi_bilinear_matrix_valuespsi_det_alpha_uniquepsi_det_beta_unique
singles_alpha_cscsingles_alpha_csc_idxsingles_beta_cscsingles_beta_csc_idx
Called by:
h_u_0_nstates_openmp_work()
Calls:
get_all_spin_singles_4()get_all_spin_singles_and_doubles_4()
i_h_j_double_alpha_beta()i_h_j_double_spin()
i_h_j_single_spin()
- h_u_0_nstates_openmp_work_n_int:
File :
davidson/u0_h_u0.irp.f_template_757subroutine H_u_0_nstates_openmp_work_N_int(v_t,u_t,N_st,sze,istart,iend,ishift,istep)
Computes $v_t = H | u_t rangle$
Default should be 1,N_det,0,1
Needs:
n_detn_intnthreads_davidsonpsi_bilinear_matrix_columns_locpsi_bilinear_matrix_order_transp_reverse
psi_bilinear_matrix_transp_rows_locpsi_bilinear_matrix_transp_valuespsi_bilinear_matrix_valuespsi_det_alpha_uniquepsi_det_beta_unique
singles_alpha_cscsingles_alpha_csc_idxsingles_beta_cscsingles_beta_csc_idx
Called by:
h_u_0_nstates_openmp_work()
Calls:
get_all_spin_singles_and_doubles_n_int()get_all_spin_singles_n_int()
i_h_j_double_alpha_beta()i_h_j_double_spin()
i_h_j_single_spin()
- h_u_0_nstates_zmq:
File :
davidson/davidson_parallel_nos2.irp.fsubroutine H_u_0_nstates_zmq(v_0,u_0,N_st,sze)
Computes $v_0 = H | u_0rangle$
n : number of determinants
H_jj : array of $langle j | H | j rangle$
Needs:
mpi_initializedn_detnprocpsi_bilinear_matrix_columns_loc
psi_bilinear_matrix_order_reversepsi_bilinear_matrix_order_transp_reversepsi_bilinear_matrix_transp_valuespsi_bilinear_matrix_values
psi_det_alpha_uniquepsi_det_beta_uniqueref_bitmask_energy
Called by:
davidson_diag_csf_hjj()davidson_diag_hjj()
davidson_diag_nonsym_hjj()
u_0_h_u_0()
Calls:
davidson_nos2_collector()davidson_nos2_slave_inproc()dset_order()
dtranspose()end_parallel_job()
new_parallel_job()set_multiple_levels_omp()
- u_0_h_u_0:
File :
davidson/u0_h_u0.irp.fsubroutine u_0_H_u_0(e_0,u_0,n,keys_tmp,Nint,N_st,sze)
Computes $E_0 = frac{langle u_0 | H | u_0 rangle}{langle u_0 | u_0 rangle}$
n : number of determinants
Needs:
distributed_davidsonh_matrix_all_dets
n_det_max_full
n_states_diag
Calls:
h_u_0_nstates_openmp()
h_u_0_nstates_zmq()
- u_0_h_u_0_two_e:
File :
davidson/u0_wee_u0.irp.fsubroutine u_0_H_u_0_two_e(e_0,u_0,n,keys_tmp,Nint,N_st,sze)
Computes $E_0 = frac{ langle u_0 | H | u_0rangle}{langle u_0 | u_0 rangle}$.
n : number of determinants
Called by:
psi_energy_two_e
Calls:
h_s2_u_0_two_e_nstates_openmp()
- u_0_hs2_u_0:
File :
davidson/u0_hs2_u0.irp.fsubroutine u_0_HS2_u_0(e_0,s_0,u_0,n,keys_tmp,Nint,N_st,sze)
Computes $E_0 = frac{langle u_0 | H | u_0 rangle}{langle u_0 | u_0 rangle}$
and $S_0 = frac{langle u_0 | S^2 | u_0 rangle}{langle u_0 | u_0 rangle}$
n : number of determinants
Needs:
distributed_davidsonh_matrix_all_dets
n_det_max_fulln_states_diag
s2_matrix_all_dets
Called by:
psi_energy
Calls:
h_s2_u_0_nstates_openmp()
h_s2_u_0_nstates_zmq()
- zmq_get_n_states_diag:
File :
davidson/davidson_parallel.irp.finteger function zmq_get_N_states_diag(zmq_to_qp_run_socket, worker_id)
Get N_states_diag from the qp_run scheduler
Needs:
mpi_master
n_states_diag
zmq_state
Touches:
n_states_diag
- zmq_put_n_states_diag:
File :
davidson/davidson_parallel.irp.finteger function zmq_put_N_states_diag(zmq_to_qp_run_socket,worker_id)
Put N_states_diag on the qp_run scheduler
Needs:
n_states_diag
zmq_state