10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-07-03 18:05:59 +02:00
This commit is contained in:
Yann Garniron 2018-02-12 14:00:56 +01:00
commit 7cd8ea50f5
40 changed files with 429 additions and 391 deletions

View File

@ -58,7 +58,7 @@ let input_data = "
* Det_number_max : int
assert (x > 0) ;
if (x > 10000000000) then
if (x > 10_00_000_000) then
warning \"More than 10 billion determinants\";
* States_number : int
@ -142,18 +142,18 @@ let input_data = "
let input_ezfio = "
* MO_number : int
mo_basis_mo_tot_num
1 : 10000
More than 10000 MOs
1 : 10_000
More than 10_000 MOs
* AO_number : int
ao_basis_ao_num
1 : 10000
More than 10000 AOs
1 : 10_000
More than 10_000 AOs
* Nucl_number : int
nuclei_nucl_num
1 : 10000
More than 10000 nuclei
1 : 10_000
More than 10_000 nuclei
* N_int_number : int
determinants_n_int
@ -162,8 +162,8 @@ let input_ezfio = "
* Det_number : int
determinants_n_det
1 : 10000000000
More than 10 billion of determinants
1 : 10_000_000_000
More than 10 billion determinants
"

View File

@ -1,2 +1,2 @@
Generators_CAS Perturbation Selectors_CASSD ZMQ DavidsonUndressed
Generators_CAS Perturbation Selectors_CASSD ZMQ Davidson

View File

@ -1 +1 @@
Selectors_full SingleRefMethod DavidsonUndressed
Selectors_full SingleRefMethod Davidson

View File

@ -1 +1 @@
Perturbation CID DavidsonUndressed
Perturbation CID Davidson

View File

@ -1 +1 @@
Selectors_full SingleRefMethod DavidsonUndressed
Selectors_full SingleRefMethod Davidson

View File

@ -1 +1 @@
Selectors_full SingleRefMethod DavidsonUndressed
Selectors_full SingleRefMethod Davidson

View File

@ -1 +1 @@
Determinants DavidsonUndressed
Determinants Davidson

View File

@ -0,0 +1 @@
Davidson_Utils

View File

@ -1 +1 @@
Perturbation Selectors_full Generators_full ZMQ FourIdx MPI DavidsonUndressed
Perturbation Selectors_full Generators_full ZMQ FourIdx MPI Davidson

View File

@ -12,7 +12,7 @@ subroutine pt2_dipole_moment_z(det_pert,c_pert,e_2_pert,H_pert_diag,Nint,ndet,n_
integer(bit_kind), intent(in) :: minilist(Nint,2,N_det_selectors)
BEGIN_DOC
! compute the perturbatibe contribution to the dipole moment of one determinant
! compute the perturbative contribution to the dipole moment of one determinant
!
! for the various n_st states, at various level of theory.
!

View File

@ -1 +1 @@
Determinants DavidsonUndressed
Determinants Davidson

View File

@ -1 +1 @@
Psiref_Utils DavidsonUndressed
Psiref_Utils

View File

@ -1 +1 @@
Perturbation Selectors_full Generators_full Psiref_CAS MRCC_Utils ZMQ
Perturbation Selectors_full Generators_full Psiref_CAS MRCC_Utils ZMQ DavidsonDressed

View File

@ -0,0 +1,29 @@
BEGIN_PROVIDER [ double precision, dressing_column_h, (N_det,N_states) ]
&BEGIN_PROVIDER [ double precision, dressing_column_s, (N_det,N_states) ]
implicit none
BEGIN_DOC
! Null dressing vectors
END_DOC
dressing_column_h(:,:) = 0.d0
dressing_column_s(:,:) = 0.d0
integer :: i,ii,k,j,jj, l
double precision :: f, tmp
double precision, external :: u_dot_v
do k=1,N_states
l = dressed_column_idx(k)
f = 1.d0/psi_coef(l,k)
do jj = 1, n_det_non_ref
j = idx_non_ref(jj)
dressing_column_h(j,k) = delta_ij (k,jj)
dressing_column_s(j,k) = delta_ij_s2(k,jj)
enddo
tmp = u_dot_v(dressing_column_h(1,k), psi_coef(1,k), N_det)
dressing_column_h(l,k) -= tmp * f
tmp = u_dot_v(dressing_column_s(1,k), psi_coef(1,k), N_det)
dressing_column_s(l,k) -= tmp * f
enddo
END_PROVIDER

View File

@ -1 +1 @@
Determinants DavidsonDressed
Davidson_Utils

View File

@ -1,322 +1,14 @@
=================
DavidsonUndressed
=================
Module for main files with undressed Davidson
Needed Modules
==============
.. Do not edit this section It was auto-generated
.. by the `update_README.py` script.
.. image:: tree_dependency.png
* `Determinants <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants>`_
Documentation
=============
.. Do not edit this section It was auto-generated
.. by the `update_README.py` script.
`ci_eigenvectors <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/diagonalize_CI.irp.f#L23>`_
Eigenvectors/values of the CI matrix
`ci_eigenvectors_s2 <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/diagonalize_CI.irp.f#L24>`_
Eigenvectors/values of the CI matrix
`ci_electronic_energy <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/diagonalize_CI.irp.f#L22>`_
Eigenvectors/values of the CI matrix
`ci_energy <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/diagonalize_CI.irp.f#L2>`_
N_states lowest eigenvalues of the CI matrix
`davidson_collector <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/davidson_parallel.irp.f#L235>`_
Undocumented
`davidson_converged <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/parameters.irp.f#L9>`_
True if the Davidson algorithm is converged
`davidson_criterion <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/parameters.irp.f#L1>`_
Can be : [ energy | residual | both | wall_time | cpu_time | iterations ]
`davidson_diag <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/diagonalization.irp.f#L1>`_
Davidson diagonalization.
.br
dets_in : bitmasks corresponding to determinants
.br
u_in : guess coefficients on the various states. Overwritten
on exit
.br
dim_in : leftmost dimension of u_in
.br
sze : Number of determinants
.br
N_st : Number of eigenstates
.br
iunit : Unit number for the I/O
.br
Initial guess vectors are not necessarily orthonormal
`davidson_diag_hjj <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/diagonalization.irp.f#L273>`_
Davidson diagonalization with specific diagonal elements of the H matrix
.br
H_jj : specific diagonal H matrix elements to diagonalize de Davidson
.br
dets_in : bitmasks corresponding to determinants
.br
u_in : guess coefficients on the various states. Overwritten
on exit
.br
dim_in : leftmost dimension of u_in
.br
sze : Number of determinants
.br
N_st : Number of eigenstates
.br
N_st_diag : Number of states in which H is diagonalized
.br
iunit : Unit for the I/O
.br
Initial guess vectors are not necessarily orthonormal
`davidson_diag_hjj_sjj <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/diagonalization_hs2.irp.f#L52>`_
Davidson diagonalization with specific diagonal elements of the H matrix
.br
H_jj : specific diagonal H matrix elements to diagonalize de Davidson
.br
S2_out : Output : s^2
.br
dets_in : bitmasks corresponding to determinants
.br
u_in : guess coefficients on the various states. Overwritten
on exit
.br
dim_in : leftmost dimension of u_in
.br
sze : Number of determinants
.br
N_st : Number of eigenstates
.br
N_st_diag : Number of states in which H is diagonalized. Assumed > sze
.br
iunit : Unit for the I/O
.br
Initial guess vectors are not necessarily orthonormal
`davidson_diag_hs2 <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/diagonalization_hs2.irp.f#L1>`_
Davidson diagonalization.
.br
dets_in : bitmasks corresponding to determinants
.br
u_in : guess coefficients on the various states. Overwritten
on exit
.br
dim_in : leftmost dimension of u_in
.br
sze : Number of determinants
.br
N_st : Number of eigenstates
.br
iunit : Unit number for the I/O
.br
Initial guess vectors are not necessarily orthonormal
`davidson_pull_results <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/davidson_parallel.irp.f#L192>`_
Undocumented
`davidson_push_results <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/davidson_parallel.irp.f#L149>`_
Undocumented
`davidson_run_slave <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/davidson_parallel.irp.f#L22>`_
Undocumented
`davidson_slave <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/davidson_slave.irp.f#L1>`_
Undocumented
`davidson_slave_inproc <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/davidson_parallel.irp.f#L5>`_
Undocumented
`davidson_slave_tcp <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/davidson_parallel.irp.f#L13>`_
Undocumented
`davidson_slave_work <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/davidson_parallel.irp.f#L55>`_
Undocumented
`davidson_sze_max <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/ezfio_interface.irp.f#L6>`_
Number of micro-iterations before re-contracting
`det_inf <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/diagonalization.irp.f#L52>`_
Ordering function for determinants
`diag_and_save <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/diagonalize_restart_and_save_one_state.irp.f#L1>`_
Undocumented
`diagonalize_ci <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/diagonalize_CI.irp.f#L154>`_
Replace the coefficients of the CI states by the coefficients of the
eigenstates of the CI matrix
`disk_based_davidson <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/ezfio_interface.irp.f#L101>`_
If true, disk space is used to store the vectors
`distributed_davidson <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/ezfio_interface.irp.f#L44>`_
If true, use the distributed algorithm
`find_reference <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/find_reference.irp.f#L1>`_
Undocumented
`first_guess <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/guess_lowest_state.irp.f#L1>`_
Select all the determinants with the lowest energy as a starting point.
`h_s2_u_0_nstates <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/u0Hu0_old.irp.f#L231>`_
Computes v_0 = H|u_0> and s_0 = S^2 |u_0>
.br
n : number of determinants
.br
H_jj : array of <j|H|j>
.br
S2_jj : array of <j|S^2|j>
`h_s2_u_0_nstates_openmp <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/u0Hu0.irp.f#L11>`_
Computes v_0 = H|u_0> and s_0 = S^2 |u_0>
.br
Assumes that the determinants are in psi_det
.br
istart, iend, ishift, istep are used in ZMQ parallelization.
`h_s2_u_0_nstates_openmp_work <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/u0Hu0.irp.f#L65>`_
Computes v_t = H|u_t> and s_t = S^2 |u_t>
.br
Default should be 1,N_det,0,1
`h_s2_u_0_nstates_openmp_work_1 <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/u0Hu0.irp.f_template_454#L3>`_
Computes v_t = H|u_t> and s_t = S^2 |u_t>
.br
Default should be 1,N_det,0,1
`h_s2_u_0_nstates_openmp_work_2 <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/u0Hu0.irp.f_template_454#L357>`_
Computes v_t = H|u_t> and s_t = S^2 |u_t>
.br
Default should be 1,N_det,0,1
`h_s2_u_0_nstates_openmp_work_3 <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/u0Hu0.irp.f_template_454#L711>`_
Computes v_t = H|u_t> and s_t = S^2 |u_t>
.br
Default should be 1,N_det,0,1
`h_s2_u_0_nstates_openmp_work_4 <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/u0Hu0.irp.f_template_454#L1065>`_
Computes v_t = H|u_t> and s_t = S^2 |u_t>
.br
Default should be 1,N_det,0,1
`h_s2_u_0_nstates_openmp_work_n_int <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/u0Hu0.irp.f_template_454#L1419>`_
Computes v_t = H|u_t> and s_t = S^2 |u_t>
.br
Default should be 1,N_det,0,1
`h_s2_u_0_nstates_test <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/u0Hu0_old.irp.f#L460>`_
Undocumented
`h_s2_u_0_nstates_zmq <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/davidson_parallel.irp.f#L275>`_
Computes v_0 = H|u_0> and s_0 = S^2 |u_0>
.br
n : number of determinants
.br
H_jj : array of <j|H|j>
.br
S2_jj : array of <j|S^2|j>
`h_u_0_nstates <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/u0Hu0_old.irp.f#L2>`_
Computes v_0 = H|u_0>
.br
n : number of determinants
.br
H_jj : array of <j|H|j>
.br
`n_states_diag <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/ezfio_interface.irp.f#L82>`_
Number of states to consider during the Davdison diagonalization
`nthreads_davidson <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/davidson_parallel.irp.f#L418>`_
Number of threads for Davdison
`print_h_matrix_restart <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/print_H_matrix_restart.irp.f#L1>`_
Undocumented
`provide_everything <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/davidson_slave.irp.f#L29>`_
Undocumented
`psi_energy <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/u0Hu0.irp.f#L1>`_
Energy of the current wave function
`routine <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/print_H_matrix_restart.irp.f#L9>`_
Undocumented
`sort_dets_ab <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/diagonalization.irp.f#L219>`_
Uncodumented : TODO
`sort_dets_ab_v <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/diagonalization.irp.f#L149>`_
Uncodumented : TODO
`sort_dets_ba_v <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/diagonalization.irp.f#L120>`_
Uncodumented : TODO
`state_following <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/ezfio_interface.irp.f#L25>`_
If true, the states are re-ordered to match the input states
`tamiser <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/diagonalization.irp.f#L77>`_
Uncodumented : TODO
`threshold_davidson <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/ezfio_interface.irp.f#L63>`_
Thresholds of Davidson's algorithm
`u_0_h_u_0 <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/diagonalization_hs2.irp.f#L447>`_
Computes e_0 = <u_0|H|u_0>/<u_0|u_0>
.br
n : number of determinants
.br

View File

@ -1 +0,0 @@
Davidson UndressedMethod

View File

@ -1,14 +0,0 @@
=================
DavidsonUndressed
=================
Module for main files with undressed Davidson
Needed Modules
==============
.. Do not edit this section It was auto-generated
.. by the `update_README.py` script.
Documentation
=============
.. Do not edit this section It was auto-generated
.. by the `update_README.py` script.

View File

@ -0,0 +1 @@
Determinants

View File

@ -0,0 +1,331 @@
Davidson_Utils
==============
Abstract module for Davidson diagonalization. Contains everything required for the
Davidson algorithm, dressed or not. If a dressing is used, the dressing column should
be defined and the DavidsonDressed module should be used. If no dressing is required,
the Davidson module should be used, and it has a default null dressing vector.
Needed Modules
==============
.. Do not edit this section It was auto-generated
.. by the `update_README.py` script.
.. image:: tree_dependency.png
* `Determinants <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants>`_
Documentation
=============
.. Do not edit this section It was auto-generated
.. by the `update_README.py` script.
`ci_eigenvectors <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/diagonalize_CI.irp.f#L23>`_
Eigenvectors/values of the CI matrix
`ci_eigenvectors_s2 <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/diagonalize_CI.irp.f#L24>`_
Eigenvectors/values of the CI matrix
`ci_electronic_energy <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/diagonalize_CI.irp.f#L22>`_
Eigenvectors/values of the CI matrix
`ci_energy <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/diagonalize_CI.irp.f#L2>`_
N_states lowest eigenvalues of the CI matrix
`davidson_collector <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/davidson_parallel.irp.f#L235>`_
Undocumented
`davidson_converged <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/parameters.irp.f#L9>`_
True if the Davidson algorithm is converged
`davidson_criterion <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/parameters.irp.f#L1>`_
Can be : [ energy | residual | both | wall_time | cpu_time | iterations ]
`davidson_diag <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/diagonalization.irp.f#L1>`_
Davidson diagonalization.
.br
dets_in : bitmasks corresponding to determinants
.br
u_in : guess coefficients on the various states. Overwritten
on exit
.br
dim_in : leftmost dimension of u_in
.br
sze : Number of determinants
.br
N_st : Number of eigenstates
.br
iunit : Unit number for the I/O
.br
Initial guess vectors are not necessarily orthonormal
`davidson_diag_hjj <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/diagonalization.irp.f#L273>`_
Davidson diagonalization with specific diagonal elements of the H matrix
.br
H_jj : specific diagonal H matrix elements to diagonalize de Davidson
.br
dets_in : bitmasks corresponding to determinants
.br
u_in : guess coefficients on the various states. Overwritten
on exit
.br
dim_in : leftmost dimension of u_in
.br
sze : Number of determinants
.br
N_st : Number of eigenstates
.br
N_st_diag : Number of states in which H is diagonalized
.br
iunit : Unit for the I/O
.br
Initial guess vectors are not necessarily orthonormal
`davidson_diag_hjj_sjj <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/diagonalization_hs2.irp.f#L52>`_
Davidson diagonalization with specific diagonal elements of the H matrix
.br
H_jj : specific diagonal H matrix elements to diagonalize de Davidson
.br
S2_out : Output : s^2
.br
dets_in : bitmasks corresponding to determinants
.br
u_in : guess coefficients on the various states. Overwritten
on exit
.br
dim_in : leftmost dimension of u_in
.br
sze : Number of determinants
.br
N_st : Number of eigenstates
.br
N_st_diag : Number of states in which H is diagonalized. Assumed > sze
.br
iunit : Unit for the I/O
.br
Initial guess vectors are not necessarily orthonormal
`davidson_diag_hs2 <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/diagonalization_hs2.irp.f#L1>`_
Davidson diagonalization.
.br
dets_in : bitmasks corresponding to determinants
.br
u_in : guess coefficients on the various states. Overwritten
on exit
.br
dim_in : leftmost dimension of u_in
.br
sze : Number of determinants
.br
N_st : Number of eigenstates
.br
iunit : Unit number for the I/O
.br
Initial guess vectors are not necessarily orthonormal
`davidson_pull_results <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/davidson_parallel.irp.f#L192>`_
Undocumented
`davidson_push_results <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/davidson_parallel.irp.f#L149>`_
Undocumented
`davidson_run_slave <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/davidson_parallel.irp.f#L22>`_
Undocumented
`davidson_slave <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/davidson_slave.irp.f#L1>`_
Undocumented
`davidson_slave_inproc <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/davidson_parallel.irp.f#L5>`_
Undocumented
`davidson_slave_tcp <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/davidson_parallel.irp.f#L13>`_
Undocumented
`davidson_slave_work <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/davidson_parallel.irp.f#L55>`_
Undocumented
`davidson_sze_max <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/ezfio_interface.irp.f#L6>`_
Number of micro-iterations before re-contracting
`det_inf <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/diagonalization.irp.f#L52>`_
Ordering function for determinants
`diag_and_save <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/diagonalize_restart_and_save_one_state.irp.f#L1>`_
Undocumented
`diagonalize_ci <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/diagonalize_CI.irp.f#L154>`_
Replace the coefficients of the CI states by the coefficients of the
eigenstates of the CI matrix
`disk_based_davidson <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/ezfio_interface.irp.f#L101>`_
If true, disk space is used to store the vectors
`distributed_davidson <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/ezfio_interface.irp.f#L44>`_
If true, use the distributed algorithm
`find_reference <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/find_reference.irp.f#L1>`_
Undocumented
`first_guess <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/guess_lowest_state.irp.f#L1>`_
Select all the determinants with the lowest energy as a starting point.
`h_s2_u_0_nstates <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/u0Hu0_old.irp.f#L231>`_
Computes v_0 = H|u_0> and s_0 = S^2 |u_0>
.br
n : number of determinants
.br
H_jj : array of <j|H|j>
.br
S2_jj : array of <j|S^2|j>
`h_s2_u_0_nstates_openmp <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/u0Hu0.irp.f#L11>`_
Computes v_0 = H|u_0> and s_0 = S^2 |u_0>
.br
Assumes that the determinants are in psi_det
.br
istart, iend, ishift, istep are used in ZMQ parallelization.
`h_s2_u_0_nstates_openmp_work <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/u0Hu0.irp.f#L65>`_
Computes v_t = H|u_t> and s_t = S^2 |u_t>
.br
Default should be 1,N_det,0,1
`h_s2_u_0_nstates_openmp_work_1 <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/u0Hu0.irp.f_template_454#L3>`_
Computes v_t = H|u_t> and s_t = S^2 |u_t>
.br
Default should be 1,N_det,0,1
`h_s2_u_0_nstates_openmp_work_2 <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/u0Hu0.irp.f_template_454#L357>`_
Computes v_t = H|u_t> and s_t = S^2 |u_t>
.br
Default should be 1,N_det,0,1
`h_s2_u_0_nstates_openmp_work_3 <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/u0Hu0.irp.f_template_454#L711>`_
Computes v_t = H|u_t> and s_t = S^2 |u_t>
.br
Default should be 1,N_det,0,1
`h_s2_u_0_nstates_openmp_work_4 <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/u0Hu0.irp.f_template_454#L1065>`_
Computes v_t = H|u_t> and s_t = S^2 |u_t>
.br
Default should be 1,N_det,0,1
`h_s2_u_0_nstates_openmp_work_n_int <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/u0Hu0.irp.f_template_454#L1419>`_
Computes v_t = H|u_t> and s_t = S^2 |u_t>
.br
Default should be 1,N_det,0,1
`h_s2_u_0_nstates_test <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/u0Hu0_old.irp.f#L460>`_
Undocumented
`h_s2_u_0_nstates_zmq <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/davidson_parallel.irp.f#L275>`_
Computes v_0 = H|u_0> and s_0 = S^2 |u_0>
.br
n : number of determinants
.br
H_jj : array of <j|H|j>
.br
S2_jj : array of <j|S^2|j>
`h_u_0_nstates <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/u0Hu0_old.irp.f#L2>`_
Computes v_0 = H|u_0>
.br
n : number of determinants
.br
H_jj : array of <j|H|j>
.br
`n_states_diag <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/ezfio_interface.irp.f#L82>`_
Number of states to consider during the Davdison diagonalization
`nthreads_davidson <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/davidson_parallel.irp.f#L418>`_
Number of threads for Davdison
`print_h_matrix_restart <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/print_H_matrix_restart.irp.f#L1>`_
Undocumented
`provide_everything <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/davidson_slave.irp.f#L29>`_
Undocumented
`psi_energy <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/u0Hu0.irp.f#L1>`_
Energy of the current wave function
`routine <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/print_H_matrix_restart.irp.f#L9>`_
Undocumented
`sort_dets_ab <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/diagonalization.irp.f#L219>`_
Uncodumented : TODO
`sort_dets_ab_v <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/diagonalization.irp.f#L149>`_
Uncodumented : TODO
`sort_dets_ba_v <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/diagonalization.irp.f#L120>`_
Uncodumented : TODO
`state_following <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/ezfio_interface.irp.f#L25>`_
If true, the states are re-ordered to match the input states
`tamiser <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/diagonalization.irp.f#L77>`_
Uncodumented : TODO
`threshold_davidson <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/ezfio_interface.irp.f#L63>`_
Thresholds of Davidson's algorithm
`u_0_h_u_0 <http://github.com/LCPQ/quantum_package/tree/master/src/Davidson/diagonalization_hs2.irp.f#L447>`_
Computes e_0 = <u_0|H|u_0>/<u_0|u_0>
.br
n : number of determinants
.br

View File

@ -478,43 +478,3 @@ end
subroutine u_0_H_u_0(e_0,u_0,n,keys_tmp,Nint,N_st,sze)
use bitmasks
implicit none
BEGIN_DOC
! Computes e_0 = <u_0|H|u_0>/<u_0|u_0>
!
! n : number of determinants
!
END_DOC
integer, intent(in) :: n,Nint, N_st, sze
double precision, intent(out) :: e_0(N_st)
double precision, intent(inout) :: u_0(sze,N_st)
integer(bit_kind),intent(in) :: keys_tmp(Nint,2,n)
double precision, allocatable :: v_0(:,:), s_0(:,:), u_1(:,:)
double precision :: u_dot_u,u_dot_v,diag_H_mat_elem
integer :: i,j
if ((sze > 100000).and.distributed_davidson) then
allocate (v_0(sze,N_states_diag),s_0(sze,N_states_diag), u_1(sze,N_states_diag))
u_1(1:sze,1:N_states) = u_0(1:sze,1:N_states)
u_1(1:sze,N_states+1:N_states_diag) = 0.d0
call H_S2_u_0_nstates_zmq(v_0,s_0,u_1,N_states_diag,sze)
deallocate(u_1)
else
allocate (v_0(sze,N_st),s_0(sze,N_st))
call H_S2_u_0_nstates_openmp(v_0,s_0,u_0,N_st,sze)
endif
double precision :: norm
do i=1,N_st
norm = u_dot_u(u_0(1,i),n)
if (norm /= 0.d0) then
e_0(i) = u_dot_v(v_0(1,i),u_0(1,i),n)
else
e_0(i) = 0.d0
endif
enddo
deallocate (s_0, v_0)
end

View File

@ -458,3 +458,43 @@ N_int;;
END_TEMPLATE
subroutine u_0_H_u_0(e_0,u_0,n,keys_tmp,Nint,N_st,sze)
use bitmasks
implicit none
BEGIN_DOC
! Computes e_0 = <u_0|H|u_0>/<u_0|u_0>
!
! n : number of determinants
!
END_DOC
integer, intent(in) :: n,Nint, N_st, sze
double precision, intent(out) :: e_0(N_st)
double precision, intent(inout) :: u_0(sze,N_st)
integer(bit_kind),intent(in) :: keys_tmp(Nint,2,n)
double precision, allocatable :: v_0(:,:), s_0(:,:), u_1(:,:)
double precision :: u_dot_u,u_dot_v,diag_H_mat_elem
integer :: i,j
if ((sze > 100000).and.distributed_davidson) then
allocate (v_0(sze,N_states_diag),s_0(sze,N_states_diag), u_1(sze,N_states_diag))
u_1(1:sze,1:N_states) = u_0(1:sze,1:N_states)
u_1(1:sze,N_states+1:N_states_diag) = 0.d0
call H_S2_u_0_nstates_zmq(v_0,s_0,u_1,N_states_diag,sze)
deallocate(u_1)
else
allocate (v_0(sze,N_st),s_0(sze,N_st))
call H_S2_u_0_nstates_openmp(v_0,s_0,u_0,N_st,sze)
endif
double precision :: norm
do i=1,N_st
norm = u_dot_u(u_0(1,i),n)
if (norm /= 0.d0) then
e_0(i) = u_dot_v(v_0(1,i),u_0(1,i),n)
else
e_0(i) = 0.d0
endif
enddo
deallocate (s_0, v_0)
end