10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-06-14 01:05:27 +02:00

Merge branch 'master' of https://github.com/eginer/quantum_package into eginer-master

Conflicts:
	plugins/CISD/README.rst
	plugins/CISD_SC2_selected/README.rst
	plugins/CISD_selected/README.rst
	plugins/DDCI_selected/README.rst
	plugins/MRCC_CASSD/.gitignore
	src/Determinants/davidson.irp.f
	src/Determinants/slater_rules.irp.f
	src/Ezfio_files/README.rst
This commit is contained in:
Anthony Scemama 2015-07-28 18:36:50 +02:00
commit 8671e53615
38 changed files with 1623 additions and 140 deletions

6
ocaml/.gitignore vendored
View File

@ -38,12 +38,12 @@ qp_print
qp_run
qp_set_ddci
qp_set_mo_class
Input_determinants.ml
Input_hartree_fock.ml
Input_integrals_bielec.ml
Input_pseudo.ml
Input_perturbation.ml
Input_properties.ml
Input_pseudo.ml
Input_determinants.ml
Input_hartree_fock.ml
qp_edit.ml
qp_edit
qp_edit.native

View File

@ -24,6 +24,7 @@ Selectors_full
Utils
cas_sd
cas_sd_selected
cas_sd_selected_no_skip
ezfio_interface.irp.f
irpf90.make
irpf90_entities

View File

@ -13,11 +13,11 @@ Documentation
.. Do not edit this section. It was auto-generated from the
.. by the `update_README.py` script.
`full_ci <http://github.com/LCPQ/quantum_package/tree/master/src/CAS_SD/cas_sd_selected.irp.f#L1>`_
`full_ci <http://github.com/LCPQ/quantum_package/tree/master/src/CAS_SD/cas_sd_selected_no_skip.irp.f#L1>`_
Undocumented
`h_apply_cas_sd <http://github.com/LCPQ/quantum_package/tree/master/src/CAS_SD/H_apply.irp.f_shell_22#L408>`_
`h_apply_cas_sd <http://github.com/LCPQ/quantum_package/tree/master/src/CAS_SD/H_apply.irp.f_shell_22#L414>`_
Calls H_apply on the HF determinant and selects all connected single and double
excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script.
@ -28,58 +28,58 @@ Documentation
Assume N_int is already provided.
`h_apply_cas_sd_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/CAS_SD/H_apply.irp.f_shell_22#L264>`_
`h_apply_cas_sd_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/CAS_SD/H_apply.irp.f_shell_22#L269>`_
Generate all single excitations of key_in using the bit masks of holes and
particles.
Assume N_int is already provided.
`h_apply_cas_sd_pt2 <http://github.com/LCPQ/quantum_package/tree/master/src/CAS_SD/H_apply.irp.f_shell_22#L2586>`_
`h_apply_cas_sd_pt2 <http://github.com/LCPQ/quantum_package/tree/master/src/CAS_SD/H_apply.irp.f_shell_22#L2610>`_
Calls H_apply on the HF determinant and selects all connected single and double
excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script.
`h_apply_cas_sd_pt2_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/CAS_SD/H_apply.irp.f_shell_22#L2100>`_
`h_apply_cas_sd_pt2_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/CAS_SD/H_apply.irp.f_shell_22#L2118>`_
Generate all double excitations of key_in using the bit masks of holes and
particles.
Assume N_int is already provided.
`h_apply_cas_sd_pt2_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/CAS_SD/H_apply.irp.f_shell_22#L2404>`_
`h_apply_cas_sd_pt2_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/CAS_SD/H_apply.irp.f_shell_22#L2427>`_
Generate all single excitations of key_in using the bit masks of holes and
particles.
Assume N_int is already provided.
`h_apply_cas_sd_selected <http://github.com/LCPQ/quantum_package/tree/master/src/CAS_SD/H_apply.irp.f_shell_22#L1854>`_
`h_apply_cas_sd_selected <http://github.com/LCPQ/quantum_package/tree/master/src/CAS_SD/H_apply.irp.f_shell_22#L1872>`_
Calls H_apply on the HF determinant and selects all connected single and double
excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script.
`h_apply_cas_sd_selected_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/CAS_SD/H_apply.irp.f_shell_22#L1334>`_
`h_apply_cas_sd_selected_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/CAS_SD/H_apply.irp.f_shell_22#L1346>`_
Generate all double excitations of key_in using the bit masks of holes and
particles.
Assume N_int is already provided.
`h_apply_cas_sd_selected_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/CAS_SD/H_apply.irp.f_shell_22#L1658>`_
`h_apply_cas_sd_selected_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/CAS_SD/H_apply.irp.f_shell_22#L1675>`_
Generate all single excitations of key_in using the bit masks of holes and
particles.
Assume N_int is already provided.
`h_apply_cas_sd_selected_no_skip <http://github.com/LCPQ/quantum_package/tree/master/src/CAS_SD/H_apply.irp.f_shell_22#L1116>`_
`h_apply_cas_sd_selected_no_skip <http://github.com/LCPQ/quantum_package/tree/master/src/CAS_SD/H_apply.irp.f_shell_22#L1128>`_
Calls H_apply on the HF determinant and selects all connected single and double
excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script.
`h_apply_cas_sd_selected_no_skip_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/CAS_SD/H_apply.irp.f_shell_22#L596>`_
`h_apply_cas_sd_selected_no_skip_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/CAS_SD/H_apply.irp.f_shell_22#L602>`_
Generate all double excitations of key_in using the bit masks of holes and
particles.
Assume N_int is already provided.
`h_apply_cas_sd_selected_no_skip_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/CAS_SD/H_apply.irp.f_shell_22#L920>`_
`h_apply_cas_sd_selected_no_skip_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/CAS_SD/H_apply.irp.f_shell_22#L931>`_
Generate all single excitations of key_in using the bit masks of holes and
particles.
Assume N_int is already provided.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 100 KiB

After

Width:  |  Height:  |  Size: 111 KiB

View File

@ -43,7 +43,6 @@ Documentation
particles.
Assume N_int is already provided.
`h_apply_cisd_selection_dipole_moment_z_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/CISD_selected/H_apply.irp.f_shell_10#L4921>`_
Generate all single excitations of key_in using the bit masks of holes and
particles.

View File

@ -14,7 +14,7 @@ Documentation
Undocumented
`h_apply_fci <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L521>`_
`h_apply_fci <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L527>`_
Calls H_apply on the HF determinant and selects all connected single and double
excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script.
@ -25,126 +25,126 @@ Documentation
Assume N_int is already provided.
`h_apply_fci_mono <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L2720>`_
`h_apply_fci_mono <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L2744>`_
Calls H_apply on the HF determinant and selects all connected single and double
excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script.
`h_apply_fci_mono_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L2198>`_
`h_apply_fci_mono_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L2216>`_
Generate all double excitations of key_in using the bit masks of holes and
particles.
Assume N_int is already provided.
`h_apply_fci_mono_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L2522>`_
`h_apply_fci_mono_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L2545>`_
Generate all single excitations of key_in using the bit masks of holes and
particles.
Assume N_int is already provided.
`h_apply_fci_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L325>`_
`h_apply_fci_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L330>`_
Generate all single excitations of key_in using the bit masks of holes and
particles.
Assume N_int is already provided.
`h_apply_fci_no_skip <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L1980>`_
`h_apply_fci_no_skip <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L1998>`_
Calls H_apply on the HF determinant and selects all connected single and double
excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script.
`h_apply_fci_no_skip_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L1460>`_
`h_apply_fci_no_skip_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L1472>`_
Generate all double excitations of key_in using the bit masks of holes and
particles.
Assume N_int is already provided.
`h_apply_fci_no_skip_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L1784>`_
`h_apply_fci_no_skip_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L1801>`_
Generate all single excitations of key_in using the bit masks of holes and
particles.
Assume N_int is already provided.
`h_apply_fci_pt2 <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L1253>`_
`h_apply_fci_pt2 <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L1265>`_
Calls H_apply on the HF determinant and selects all connected single and double
excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script.
`h_apply_fci_pt2_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L767>`_
`h_apply_fci_pt2_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L773>`_
Generate all double excitations of key_in using the bit masks of holes and
particles.
Assume N_int is already provided.
`h_apply_fci_pt2_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L1071>`_
`h_apply_fci_pt2_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L1082>`_
Generate all single excitations of key_in using the bit masks of holes and
particles.
Assume N_int is already provided.
`h_apply_pt2_mono_delta_rho <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L4222>`_
`h_apply_pt2_mono_delta_rho <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L4258>`_
Calls H_apply on the HF determinant and selects all connected single and double
excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script.
`h_apply_pt2_mono_delta_rho_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L3734>`_
`h_apply_pt2_mono_delta_rho_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L3764>`_
Generate all double excitations of key_in using the bit masks of holes and
particles.
Assume N_int is already provided.
`h_apply_pt2_mono_delta_rho_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L4038>`_
`h_apply_pt2_mono_delta_rho_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L4073>`_
Generate all single excitations of key_in using the bit masks of holes and
particles.
Assume N_int is already provided.
`h_apply_pt2_mono_di_delta_rho <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L5681>`_
`h_apply_pt2_mono_di_delta_rho <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L5729>`_
Calls H_apply on the HF determinant and selects all connected single and double
excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script.
`h_apply_pt2_mono_di_delta_rho_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L5195>`_
`h_apply_pt2_mono_di_delta_rho_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L5237>`_
Generate all double excitations of key_in using the bit masks of holes and
particles.
Assume N_int is already provided.
`h_apply_pt2_mono_di_delta_rho_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L5499>`_
`h_apply_pt2_mono_di_delta_rho_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L5546>`_
Generate all single excitations of key_in using the bit masks of holes and
particles.
Assume N_int is already provided.
`h_apply_select_mono_delta_rho <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L3488>`_
`h_apply_select_mono_delta_rho <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L3518>`_
Calls H_apply on the HF determinant and selects all connected single and double
excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script.
`h_apply_select_mono_delta_rho_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L2966>`_
`h_apply_select_mono_delta_rho_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L2990>`_
Generate all double excitations of key_in using the bit masks of holes and
particles.
Assume N_int is already provided.
`h_apply_select_mono_delta_rho_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L3290>`_
`h_apply_select_mono_delta_rho_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L3319>`_
Generate all single excitations of key_in using the bit masks of holes and
particles.
Assume N_int is already provided.
`h_apply_select_mono_di_delta_rho <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L4949>`_
`h_apply_select_mono_di_delta_rho <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L4991>`_
Calls H_apply on the HF determinant and selects all connected single and double
excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script.
`h_apply_select_mono_di_delta_rho_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L4429>`_
`h_apply_select_mono_di_delta_rho_diexc <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L4465>`_
Generate all double excitations of key_in using the bit masks of holes and
particles.
Assume N_int is already provided.
`h_apply_select_mono_di_delta_rho_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L4753>`_
`h_apply_select_mono_di_delta_rho_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/Full_CI/H_apply.irp.f_shell_43#L4794>`_
Generate all single excitations of key_in using the bit masks of holes and
particles.
Assume N_int is already provided.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 98 KiB

After

Width:  |  Height:  |  Size: 111 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 61 KiB

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 73 KiB

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 KiB

After

Width:  |  Height:  |  Size: 66 KiB

View File

@ -29,4 +29,4 @@ ezfio_interface.irp.f
irpf90.make
irpf90_entities
mrcc_cassd
tags
tags

View File

@ -94,7 +94,7 @@ Documentation
Undocumented
`h_apply_mrcc <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC_Utils/H_apply.irp.f_shell_27#L416>`_
`h_apply_mrcc <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC_Utils/H_apply.irp.f_shell_27#L422>`_
Calls H_apply on the HF determinant and selects all connected single and double
excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script.
@ -105,7 +105,7 @@ Documentation
Assume N_int is already provided.
`h_apply_mrcc_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC_Utils/H_apply.irp.f_shell_27#L268>`_
`h_apply_mrcc_monoexc <http://github.com/LCPQ/quantum_package/tree/master/src/MRCC_Utils/H_apply.irp.f_shell_27#L273>`_
Generate all single excitations of key_in using the bit masks of holes and
particles.
Assume N_int is already provided.

View File

@ -1,5 +1,12 @@
subroutine run_mrcc
implicit none
call set_generators_bitmasks_as_holes_and_particles
call mrcc_iterations
end
subroutine mrcc_iterations
implicit none
integer :: i,j
double precision :: E_new, E_old, delta_e
@ -24,7 +31,37 @@ subroutine run_mrcc
call save_wavefunction
enddo
call write_double(6,ci_energy_dressed(1),"Final MRCC energy")
call ezfio_set_mrcc_energy(ci_energy_dressed(1))
call ezfio_set_mrcc_cassd_energy(ci_energy_dressed(1))
call save_wavefunction
end
subroutine set_generators_bitmasks_as_holes_and_particles
implicit none
integer :: i,k
do k = 1, N_generators_bitmask
do i = 1, N_int
! Pure single part
generators_bitmask(i,1,1,k) = holes_operators(i,1) ! holes for pure single exc alpha
generators_bitmask(i,1,2,k) = particles_operators(i,1) ! particles for pure single exc alpha
generators_bitmask(i,2,1,k) = holes_operators(i,2) ! holes for pure single exc beta
generators_bitmask(i,2,2,k) = particles_operators(i,2) ! particles for pure single exc beta
! Double excitation
generators_bitmask(i,1,3,k) = holes_operators(i,1) ! holes for first single exc alpha
generators_bitmask(i,1,4,k) = particles_operators(i,1) ! particles for first single exc alpha
generators_bitmask(i,2,3,k) = holes_operators(i,2) ! holes for first single exc beta
generators_bitmask(i,2,4,k) = particles_operators(i,2) ! particles for first single exc beta
generators_bitmask(i,1,5,k) = holes_operators(i,1) ! holes for second single exc alpha
generators_bitmask(i,1,6,k) = particles_operators(i,1) ! particles for second single exc alpha
generators_bitmask(i,2,5,k) = holes_operators(i,2) ! holes for second single exc beta
generators_bitmask(i,2,6,k) = particles_operators(i,2) ! particles for second single exc beta
enddo
enddo
touch generators_bitmask
end

View File

@ -63,7 +63,7 @@ BEGIN_PROVIDER [ double precision, h_matrix_dressed, (N_det,N_det,N_states) ]
i =idx_ref(ii)
h_matrix_dressed(i,i,istate) += delta_ii(ii,istate)
do jj = 1, N_det_non_ref
j =idx_ref(jj)
j =idx_non_ref(jj)
h_matrix_dressed(i,j,istate) += delta_ij(ii,jj,istate)
h_matrix_dressed(j,i,istate) += delta_ij(ii,jj,istate)
enddo

View File

@ -0,0 +1,23 @@
===========
MRCC Module
===========
Needed Modules
==============
.. Do not edit this section. It was auto-generated from the
.. by the `update_README.py` script.
.. image:: tree_dependency.png
* `Perturbation <http://github.com/LCPQ/quantum_package/tree/master/src/Perturbation>`_
* `Selectors_full <http://github.com/LCPQ/quantum_package/tree/master/src/Selectors_full>`_
* `Generators_full <http://github.com/LCPQ/quantum_package/tree/master/src/Generators_full>`_
* `Psiref_Utils <http://github.com/LCPQ/quantum_package/tree/master/src/Psiref_Utils>`_
Documentation
=============
.. Do not edit this section. It was auto-generated from the
.. by the `update_README.py` script.

View File

@ -0,0 +1,430 @@
subroutine davidson_diag_mrcc(dets_in,u_in,energies,dim_in,sze,N_st,Nint,iunit,istate)
use bitmasks
implicit none
BEGIN_DOC
! 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
!
! iunit : Unit number for the I/O
!
! Initial guess vectors are not necessarily orthonormal
END_DOC
integer, intent(in) :: dim_in, sze, N_st, Nint, iunit, istate
integer(bit_kind), intent(in) :: dets_in(Nint,2,sze)
double precision, intent(inout) :: u_in(dim_in,N_st)
double precision, intent(out) :: energies(N_st)
double precision, allocatable :: H_jj(:)
double precision :: diag_h_mat_elem
integer :: i
ASSERT (N_st > 0)
ASSERT (sze > 0)
ASSERT (Nint > 0)
ASSERT (Nint == N_int)
PROVIDE mo_bielec_integrals_in_map
allocate(H_jj(sze))
!$OMP PARALLEL DEFAULT(NONE) &
!$OMP SHARED(sze,H_jj,N_det_ref,dets_in,Nint,istate,delta_ii,idx_ref) &
!$OMP PRIVATE(i)
!$OMP DO SCHEDULE(guided)
do i=1,sze
H_jj(i) = diag_h_mat_elem(dets_in(1,1,i),Nint)
enddo
!$OMP END DO
!$OMP DO SCHEDULE(guided)
do i=1,N_det_ref
H_jj(idx_ref(i)) += delta_ii(i,istate)
enddo
!$OMP END DO
!$OMP END PARALLEL
call davidson_diag_hjj_mrcc(dets_in,u_in,H_jj,energies,dim_in,sze,N_st,Nint,iunit,istate)
deallocate (H_jj)
end
subroutine davidson_diag_hjj_mrcc(dets_in,u_in,H_jj,energies,dim_in,sze,N_st,Nint,iunit,istate)
use bitmasks
implicit none
BEGIN_DOC
! 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
!
! iunit : Unit for the I/O
!
! Initial guess vectors are not necessarily orthonormal
END_DOC
integer, intent(in) :: dim_in, sze, N_st, Nint, istate
integer(bit_kind), intent(in) :: dets_in(Nint,2,sze)
double precision, intent(in) :: H_jj(sze)
integer, intent(in) :: iunit
double precision, intent(inout) :: u_in(dim_in,N_st)
double precision, intent(out) :: energies(N_st)
integer :: iter
integer :: i,j,k,l,m
logical :: converged
double precision :: overlap(N_st,N_st)
double precision :: u_dot_v, u_dot_u
integer, allocatable :: kl_pairs(:,:)
integer :: k_pairs, kl
integer :: iter2
double precision, allocatable :: W(:,:,:), U(:,:,:), R(:,:)
double precision, allocatable :: y(:,:,:,:), h(:,:,:,:), lambda(:)
double precision :: diag_h_mat_elem
double precision :: residual_norm(N_st)
character*(16384) :: write_buffer
double precision :: to_print(2,N_st)
double precision :: cpu, wall
PROVIDE det_connections
call write_time(iunit)
call wall_time(wall)
call cpu_time(cpu)
write(iunit,'(A)') ''
write(iunit,'(A)') 'Davidson Diagonalization'
write(iunit,'(A)') '------------------------'
write(iunit,'(A)') ''
call write_int(iunit,N_st,'Number of states')
call write_int(iunit,sze,'Number of determinants')
write(iunit,'(A)') ''
write_buffer = '===== '
do i=1,N_st
write_buffer = trim(write_buffer)//' ================ ================'
enddo
write(iunit,'(A)') trim(write_buffer)
write_buffer = ' Iter'
do i=1,N_st
write_buffer = trim(write_buffer)//' Energy Residual'
enddo
write(iunit,'(A)') trim(write_buffer)
write_buffer = '===== '
do i=1,N_st
write_buffer = trim(write_buffer)//' ================ ================'
enddo
write(iunit,'(A)') trim(write_buffer)
allocate( &
kl_pairs(2,N_st*(N_st+1)/2), &
W(sze,N_st,davidson_sze_max), &
U(sze,N_st,davidson_sze_max), &
R(sze,N_st), &
h(N_st,davidson_sze_max,N_st,davidson_sze_max), &
y(N_st,davidson_sze_max,N_st,davidson_sze_max), &
lambda(N_st*davidson_sze_max))
ASSERT (N_st > 0)
ASSERT (sze > 0)
ASSERT (Nint > 0)
ASSERT (Nint == N_int)
! Initialization
! ==============
k_pairs=0
do l=1,N_st
do k=1,l
k_pairs+=1
kl_pairs(1,k_pairs) = k
kl_pairs(2,k_pairs) = l
enddo
enddo
!$OMP PARALLEL DEFAULT(NONE) &
!$OMP SHARED(U,sze,N_st,overlap,kl_pairs,k_pairs, &
!$OMP Nint,dets_in,u_in) &
!$OMP PRIVATE(k,l,kl,i)
! Orthonormalize initial guess
! ============================
!$OMP DO
do kl=1,k_pairs
k = kl_pairs(1,kl)
l = kl_pairs(2,kl)
if (k/=l) then
overlap(k,l) = u_dot_v(U_in(1,k),U_in(1,l),sze)
overlap(l,k) = overlap(k,l)
else
overlap(k,k) = u_dot_u(U_in(1,k),sze)
endif
enddo
!$OMP END DO
!$OMP END PARALLEL
call ortho_lowdin(overlap,size(overlap,1),N_st,U_in,size(U_in,1),sze)
! Davidson iterations
! ===================
converged = .False.
do while (.not.converged)
!$OMP PARALLEL DEFAULT(NONE) &
!$OMP PRIVATE(k,i) SHARED(U,u_in,sze,N_st)
do k=1,N_st
!$OMP DO
do i=1,sze
U(i,k,1) = u_in(i,k)
enddo
!$OMP END DO
enddo
!$OMP END PARALLEL
do iter=1,davidson_sze_max-1
! Compute W_k = H |u_k>
! ----------------------
do k=1,N_st
call H_u_0_mrcc(W(1,k,iter),U(1,k,iter),H_jj,sze,dets_in,Nint,istate)
enddo
! Compute h_kl = <u_k | W_l> = <u_k| H |u_l>
! -------------------------------------------
do l=1,N_st
do k=1,N_st
do iter2=1,iter-1
h(k,iter2,l,iter) = u_dot_v(U(1,k,iter2),W(1,l,iter),sze)
h(k,iter,l,iter2) = h(k,iter2,l,iter)
enddo
enddo
do k=1,l
h(k,iter,l,iter) = u_dot_v(U(1,k,iter),W(1,l,iter),sze)
h(l,iter,k,iter) = h(k,iter,l,iter)
enddo
enddo
!DEBUG H MATRIX
!do i=1,iter
! print '(10(x,F16.10))', h(1,i,1,1:i)
!enddo
!print *, ''
!END
! Diagonalize h
! -------------
call lapack_diag(lambda,y,h,N_st*davidson_sze_max,N_st*iter)
! Express eigenvectors of h in the determinant basis
! --------------------------------------------------
do k=1,N_st
do i=1,sze
U(i,k,iter+1) = 0.d0
W(i,k,iter+1) = 0.d0
do l=1,N_st
do iter2=1,iter
U(i,k,iter+1) = U(i,k,iter+1) + U(i,l,iter2)*y(l,iter2,k,1)
W(i,k,iter+1) = W(i,k,iter+1) + W(i,l,iter2)*y(l,iter2,k,1)
enddo
enddo
enddo
enddo
! Compute residual vector
! -----------------------
do k=1,N_st
do i=1,sze
R(i,k) = lambda(k) * U(i,k,iter+1) - W(i,k,iter+1)
enddo
residual_norm(k) = u_dot_u(R(1,k),sze)
to_print(1,k) = lambda(k) + nuclear_repulsion
to_print(2,k) = residual_norm(k)
enddo
write(iunit,'(X,I3,X,100(X,F16.10,X,E16.6))'), iter, to_print(:,1:N_st)
call davidson_converged(lambda,residual_norm,wall,iter,cpu,N_st,converged)
if (converged) then
exit
endif
! Davidson step
! -------------
do k=1,N_st
do i=1,sze
U(i,k,iter+1) = -1.d0/max(H_jj(i) - lambda(k),1.d-2) * R(i,k)
enddo
enddo
! Gram-Schmidt
! ------------
double precision :: c
do k=1,N_st
do iter2=1,iter
do l=1,N_st
c = u_dot_v(U(1,k,iter+1),U(1,l,iter2),sze)
do i=1,sze
U(i,k,iter+1) -= c * U(i,l,iter2)
enddo
enddo
enddo
do l=1,k-1
c = u_dot_v(U(1,k,iter+1),U(1,l,iter+1),sze)
do i=1,sze
U(i,k,iter+1) -= c * U(i,l,iter+1)
enddo
enddo
call normalize( U(1,k,iter+1), sze )
enddo
!DEBUG : CHECK OVERLAP
!print *, '==='
!do k=1,iter+1
! do l=1,k
! c = u_dot_v(U(1,1,k),U(1,1,l),sze)
! print *, k,l, c
! enddo
!enddo
!print *, '==='
!pause
!END DEBUG
enddo
if (.not.converged) then
iter = davidson_sze_max-1
endif
! Re-contract to u_in
! -----------
do k=1,N_st
energies(k) = lambda(k)
do i=1,sze
u_in(i,k) = 0.d0
do iter2=1,iter
do l=1,N_st
u_in(i,k) += U(i,l,iter2)*y(l,iter2,k,1)
enddo
enddo
enddo
enddo
enddo
write_buffer = '===== '
do i=1,N_st
write_buffer = trim(write_buffer)//' ================ ================'
enddo
write(iunit,'(A)') trim(write_buffer)
write(iunit,'(A)') ''
call write_time(iunit)
deallocate ( &
kl_pairs, &
W, &
U, &
R, &
h, &
y, &
lambda &
)
abort_here = abort_all
end
subroutine H_u_0_mrcc(v_0,u_0,H_jj,n,keys_tmp,Nint,istate)
use bitmasks
implicit none
BEGIN_DOC
! Computes v_0 = H|u_0>
!
! n : number of determinants
!
! H_jj : array of <j|H|j>
END_DOC
integer, intent(in) :: n,Nint,istate
double precision, intent(out) :: v_0(n)
double precision, intent(in) :: u_0(n)
double precision, intent(in) :: H_jj(n)
integer(bit_kind),intent(in) :: keys_tmp(Nint,2,n)
integer, allocatable :: idx(:)
double precision :: hij
double precision, allocatable :: vt(:)
integer :: i,j,k,l, jj,ii
integer :: i0, j0
ASSERT (Nint > 0)
ASSERT (Nint == N_int)
ASSERT (n>0)
PROVIDE ref_bitmask_energy delta_ij
integer, parameter :: block_size = 157
!$OMP PARALLEL DEFAULT(NONE) &
!$OMP PRIVATE(i,hij,j,k,idx,jj,ii,vt) &
!$OMP SHARED(n_det_ref,n_det_non_ref,idx_ref,idx_non_ref,n,H_jj,u_0,keys_tmp,Nint,v_0,istate,delta_ij)
!$OMP DO SCHEDULE(static)
do i=1,n
v_0(i) = H_jj(i) * u_0(i)
enddo
!$OMP END DO
allocate(idx(0:n), vt(n))
Vt = 0.d0
!$OMP DO SCHEDULE(guided)
do i=1,n
idx(0) = i
call filter_connected_davidson(keys_tmp,keys_tmp(1,1,i),Nint,i-1,idx)
do jj=1,idx(0)
j = idx(jj)
if ( (dabs(u_0(j)) > 1.d-7).or.((dabs(u_0(i)) > 1.d-7)) ) then
call i_H_j(keys_tmp(1,1,j),keys_tmp(1,1,i),Nint,hij)
hij = hij
vt (i) = vt (i) + hij*u_0(j)
vt (j) = vt (j) + hij*u_0(i)
endif
enddo
enddo
!$OMP END DO
!$OMP DO SCHEDULE(guided)
do ii=1,n_det_ref
i = idx_ref(ii)
do jj = 1, n_det_non_ref
j = idx_non_ref(jj)
vt (i) = vt (i) + delta_ij(ii,jj,istate)*u_0(j)
vt (j) = vt (j) + delta_ij(ii,jj,istate)*u_0(i)
enddo
enddo
!$OMP END DO
!$OMP CRITICAL
do i=1,n
v_0(i) = v_0(i) + vt(i)
enddo
!$OMP END CRITICAL
deallocate(idx,vt)
!$OMP END PARALLEL
end

View File

@ -0,0 +1,85 @@
subroutine get_excitation_operators_for_one_ref(det_ref,i_state,ndetnonref,N_connect_ref,excitation_operators,amplitudes_phase_less,index_connected)
use bitmasks
implicit none
integer(bit_kind), intent(in) :: det_ref(N_int,2)
integer, intent(in) :: i_state,ndetnonref
integer*2, intent(out) :: excitation_operators(5,ndetnonref)
integer, intent(out) :: index_connected(ndetnonref)
integer, intent(out) :: N_connect_ref
double precision, intent(out) :: amplitudes_phase_less(ndetnonref)
integer :: i,j,k,l,degree,h1,p1,h2,p2,s1,s2
integer :: exc(0:2,2,2)
double precision :: phase,hij
BEGIN_DOC
! This subroutine provides all the amplitudes and excitation operators
! that one needs to go from the reference to the non reference wave function
! you enter with det_ref that is a reference determinant
!
! N_connect_ref is the number of determinants belonging to psi_non_ref
! that are connected to det_ref.
!
! amplitudes_phase_less(i) = amplitude phase less t_{I->i} = <I|H|i> * lambda_mrcc(i) * phase(I->i)
!
! excitation_operators(:,i) represents the holes and particles that
! link the ith connected determinant to det_ref
! if ::
! excitation_operators(5,i) = 2 :: double excitation alpha
! excitation_operators(5,i) = -2 :: double excitation beta
!!! excitation_operators(1,i) :: hole 1
!!! excitation_operators(2,i) :: particle 1
!!! excitation_operators(3,i) :: hole 2
!!! excitation_operators(4,i) :: particle 2
! else if ::
! excitation_operators(5,i) = 1 :: single excitation alpha
!!! excitation_operators(1,i) :: hole 1
!!! excitation_operators(2,i) :: particle 1
! else if ::
! excitation_operators(5,i) = -1 :: single excitation beta
!!! excitation_operators(3,i) :: hole 1
!!! excitation_operators(4,i) :: particle 1
! else if ::
!!! excitation_operators(5,i) = 0 :: double excitation alpha/beta
!!! excitation_operators(1,i) :: hole 1 alpha
!!! excitation_operators(2,i) :: particle 1 alpha
!!! excitation_operators(3,i) :: hole 2 beta
!!! excitation_operators(4,i) :: particle 2 beta
END_DOC
N_connect_ref = 0
do i = 1, ndetnonref
call i_H_j_phase_out(det_ref,psi_non_ref(1,1,i),N_int,hij,phase,exc,degree)
! if(dabs(hij).le.mo_integrals_threshold)cycle
N_connect_ref +=1
index_connected(N_connect_ref) = i
call decode_exc(exc,degree,h1,p1,h2,p2,s1,s2)
amplitudes_phase_less(N_connect_ref) = hij * lambda_mrcc(i_state,i) !*phase
if(degree==2)then
excitation_operators(1,N_connect_ref) = h1
excitation_operators(2,N_connect_ref) = p1
excitation_operators(3,N_connect_ref) = h2
excitation_operators(4,N_connect_ref) = p2
if(s1==s2.and.s1==1)then ! double alpha
excitation_operators(5,N_connect_ref)= 2
elseif(s1==s2.and.s1==2)then ! double beta
excitation_operators(5,N_connect_ref)=-2
else
excitation_operators(5,N_connect_ref)= 0 ! double alpha/beta
endif
elseif(degree==1)then
if(s1==1)then ! mono alpha
excitation_operators(5,N_connect_ref)= 1
excitation_operators(1,N_connect_ref) = h1
excitation_operators(2,N_connect_ref) = p1
else ! mono beta
excitation_operators(5,N_connect_ref)=-1
excitation_operators(3,N_connect_ref) = h1
excitation_operators(4,N_connect_ref) = p1
endif
else
N_connect_ref-=1
endif
enddo
end

View File

@ -0,0 +1,129 @@
subroutine mrcc_dress(ndetref,ndetnonref,nstates,delta_ij_,delta_ii_)
use bitmasks
implicit none
integer, intent(in) :: ndetref,nstates,ndetnonref
double precision, intent(inout) :: delta_ii_(ndetref,nstates),delta_ij_(ndetref,ndetnonref,nstates)
integer :: i,j,k,l
integer :: i_state
integer :: N_connect_ref
integer*2,allocatable :: excitation_operators(:,:)
double precision, allocatable :: amplitudes_phase_less(:)
double precision, allocatable :: coef_test(:)
integer(bit_kind), allocatable :: key_test(:,:)
integer, allocatable :: index_connected(:)
integer :: i_hole,i_particle,ispin,i_ok,connected_to_ref,index_wf
integer, allocatable :: idx_vector(:), degree_vector(:)
double precision :: phase_ij
double precision :: dij,phase_la
double precision :: hij,phase
integer :: exc(0:2,2,2),degree
logical :: is_in_wavefunction
allocate(excitation_operators(5,N_det_non_ref))
allocate(amplitudes_phase_less(N_det_non_ref))
allocate(key_test(N_int,2))
allocate(index_connected(N_det_non_ref))
allocate(idx_vector(0:N_det_non_ref))
allocate(degree_vector(N_det_non_ref))
i_state = 1
do i = 1, N_det_ref
call get_excitation_operators_for_one_ref(psi_ref(1,1,i),i_state,N_det_non_ref,N_connect_ref,excitation_operators,amplitudes_phase_less,index_connected)
print*,'N_connect_ref =',N_connect_ref
do l = 1, N_det_non_ref
double precision :: t_il,phase_il,hil
call i_H_j_phase_out(psi_ref(1,1,i),psi_non_ref(1,1,l),N_int,hil,phase_il,exc,degree)
t_il = hil * lambda_mrcc(i_state,l)
! loop on the non ref determinants
do j = 1, N_connect_ref
! loop on the excitation operators linked to i
if(j==l)cycle
do k = 1, N_int
key_test(k,1) = psi_non_ref(k,1,l)
key_test(k,2) = psi_non_ref(k,2,l)
enddo
! we apply the excitation operator T_I->j
call apply_excitation_operator(key_test,excitation_operators(1,j),i_ok)
if(i_ok.ne.1)cycle
! we check if such determinant is already in the wave function
if(is_in_wavefunction(key_test,N_int,N_det))cycle
! we get the phase for psi_non_ref(l) -> T_I->j |psi_non_ref(l)>
call get_excitation(psi_non_ref(1,1,l),key_test,exc,degree,phase_la,N_int)
! we get the phase T_I->j
call i_H_j_phase_out(psi_ref(1,1,i),psi_non_ref(1,1,index_connected(j)),N_int,hij,phase_ij,exc,degree)
! we compute the contribution to the coef of key_test
dij = t_il * hij * phase_la *phase_ij *lambda_mrcc(i_state,index_connected(j)) * 0.5d0
! we compute the interaction of such determinant with all the non_ref dets
call get_excitation_degree_vector(psi_non_ref,key_test,degree_vector,N_int,N_det_non_ref,idx_vector)
do k = 1, idx_vector(0)
call i_H_j_phase_out(key_test,psi_non_ref(1,1,idx_vector(k)),N_int,hij,phase,exc,degree)
delta_ij_(i,idx_vector(k),i_state) += hij * dij
enddo
enddo
if(dabs(psi_ref_coef(i,i_state)).le.5.d-5)cycle
! delta_ij_(i,l,i_state) = delta_ij_(i,l,i_state) * 0.5d0
delta_ii_(i,i_state) -= delta_ij_(i,l,i_state) * psi_non_ref_coef(l,i_state) / psi_ref_coef(i,i_state)
enddo
enddo
deallocate(excitation_operators)
deallocate(amplitudes_phase_less)
deallocate(key_test)
deallocate(idx_vector)
deallocate(degree_vector)
end
subroutine apply_excitation_operator(key_in,excitation_operator,i_ok)
use bitmasks
implicit none
integer(bit_kind), intent(inout) :: key_in
integer, intent (out) :: i_ok
integer*2 :: excitation_operator(5)
integer :: i_particle,i_hole,ispin
! Do excitation
if(excitation_operator(5)==1)then ! mono alpha
i_hole = excitation_operator(1)
i_particle = excitation_operator(2)
ispin = 1
call do_mono_excitation(key_in,i_hole,i_particle,ispin,i_ok)
else if (excitation_operator(5)==-1)then ! mono beta
i_hole = excitation_operator(3)
i_particle = excitation_operator(4)
ispin = 2
call do_mono_excitation(key_in,i_hole,i_particle,ispin,i_ok)
else if (excitation_operator(5) == -2 )then ! double beta
i_hole = excitation_operator(1)
i_particle = excitation_operator(2)
ispin = 2
call do_mono_excitation(key_in,i_hole,i_particle,ispin,i_ok)
if(i_ok.ne.1)return
i_hole = excitation_operator(3)
i_particle = excitation_operator(4)
ispin = 2
call do_mono_excitation(key_in,i_hole,i_particle,ispin,i_ok)
else if (excitation_operator(5) == 2 )then ! double alpha
i_hole = excitation_operator(1)
i_particle = excitation_operator(2)
ispin = 1
call do_mono_excitation(key_in,i_hole,i_particle,ispin,i_ok)
if(i_ok.ne.1)return
i_hole = excitation_operator(3)
i_particle = excitation_operator(4)
ispin = 1
call do_mono_excitation(key_in,i_hole,i_particle,ispin,i_ok)
else if (excitation_operator(5) == 0 )then ! double alpha/alpha
i_hole = excitation_operator(1)
i_particle = excitation_operator(2)
ispin = 1
call do_mono_excitation(key_in,i_hole,i_particle,ispin,i_ok)
if(i_ok.ne.1)return
i_hole = excitation_operator(3)
i_particle = excitation_operator(4)
ispin = 2
call do_mono_excitation(key_in,i_hole,i_particle,ispin,i_ok)
endif
end

View File

@ -0,0 +1,67 @@
subroutine run_mrcc
implicit none
call set_generators_bitmasks_as_holes_and_particles
call mrcc_iterations
end
subroutine mrcc_iterations
implicit none
integer :: i,j
double precision :: E_new, E_old, delta_e
integer :: iteration
E_new = 0.d0
delta_E = 1.d0
iteration = 0
do while (delta_E > 1.d-8)
iteration += 1
print *, '==========================='
print *, 'MRCC Iteration', iteration
print *, '==========================='
print *, ''
E_old = sum(ci_energy_dressed)
call write_double(6,ci_energy_dressed(1),"MRCC energy")
call diagonalize_ci_dressed
E_new = sum(ci_energy_dressed)
delta_E = dabs(E_new - E_old)
! stop
if (iteration > 200) then
exit
endif
enddo
call write_double(6,ci_energy_dressed(1),"Final MRCC energy")
call ezfio_set_mrcc_cassd_energy(ci_energy_dressed(1))
call save_wavefunction
end
subroutine set_generators_bitmasks_as_holes_and_particles
implicit none
integer :: i,k
do k = 1, N_generators_bitmask
do i = 1, N_int
! Pure single part
generators_bitmask(i,1,1,k) = holes_operators(i,1) ! holes for pure single exc alpha
generators_bitmask(i,1,2,k) = particles_operators(i,1) ! particles for pure single exc alpha
generators_bitmask(i,2,1,k) = holes_operators(i,2) ! holes for pure single exc beta
generators_bitmask(i,2,2,k) = particles_operators(i,2) ! particles for pure single exc beta
! Double excitation
generators_bitmask(i,1,3,k) = holes_operators(i,1) ! holes for first single exc alpha
generators_bitmask(i,1,4,k) = particles_operators(i,1) ! particles for first single exc alpha
generators_bitmask(i,2,3,k) = holes_operators(i,2) ! holes for first single exc beta
generators_bitmask(i,2,4,k) = particles_operators(i,2) ! particles for first single exc beta
generators_bitmask(i,1,5,k) = holes_operators(i,1) ! holes for second single exc alpha
generators_bitmask(i,1,6,k) = particles_operators(i,1) ! particles for second single exc alpha
generators_bitmask(i,2,5,k) = holes_operators(i,2) ! holes for second single exc beta
generators_bitmask(i,2,6,k) = particles_operators(i,2) ! particles for second single exc beta
enddo
enddo
touch generators_bitmask
end

View File

@ -0,0 +1,179 @@
BEGIN_PROVIDER [ double precision, lambda_mrcc, (N_states,psi_det_size) ]
&BEGIN_PROVIDER [ double precision, lambda_pert, (N_states,psi_det_size) ]
implicit none
BEGIN_DOC
! cm/<Psi_0|H|D_m> or perturbative 1/Delta_E(m)
END_DOC
integer :: i,k
double precision :: ihpsi(N_states), hii
integer :: i_ok
i_ok = 0
do i=1,N_det_non_ref
call i_h_psi(psi_non_ref(1,1,i), psi_ref, psi_ref_coef, N_int, N_det_ref,&
size(psi_ref_coef,1), n_states, ihpsi)
call i_h_j(psi_non_ref(1,1,i),psi_non_ref(1,1,i),N_int,hii)
do k=1,N_states
lambda_pert(k,i) = 1.d0 / (psi_ref_energy_diagonalized(k)-hii)
if (dabs(ihpsi(k)).le.1.d-3) then
i_ok +=1
lambda_mrcc(k,i) = lambda_pert(k,i)
else
lambda_mrcc(k,i) = psi_non_ref_coef(i,k)/ihpsi(k)
endif
enddo
enddo
print*,'N_det_non_ref = ',N_det_non_ref
print*,'Number of Perturbatively treated determinants = ',i_ok
print*,'psi_coef_ref_ratio = ',psi_ref_coef(2,1)/psi_ref_coef(1,1)
END_PROVIDER
!BEGIN_PROVIDER [ double precision, delta_ij_non_ref, (N_det_non_ref, N_det_non_ref,N_states) ]
!implicit none
!BEGIN_DOC
!! Dressing matrix in SD basis
!END_DOC
!delta_ij_non_ref = 0.d0
!call H_apply_mrcc_simple(delta_ij_non_ref,N_det_non_ref)
!END_PROVIDER
BEGIN_PROVIDER [ double precision, delta_ij, (N_det_ref,N_det_non_ref,N_states) ]
&BEGIN_PROVIDER [ double precision, delta_ii, (N_det_ref,N_states) ]
implicit none
BEGIN_DOC
! Dressing matrix in N_det basis
END_DOC
integer :: i,j,m
delta_ij = 0.d0
delta_ii = 0.d0
call mrcc_dress(N_det_ref,N_det_non_ref,N_states,delta_ij,delta_ii)
write(33,*)delta_ij
write(34,*)delta_ii
END_PROVIDER
BEGIN_PROVIDER [ double precision, h_matrix_dressed, (N_det,N_det,N_states) ]
implicit none
BEGIN_DOC
! Dressed H with Delta_ij
END_DOC
integer :: i, j,istate,ii,jj
do istate = 1,N_states
do j=1,N_det
do i=1,N_det
h_matrix_dressed(i,j,istate) = h_matrix_all_dets(i,j)
enddo
enddo
do ii = 1, N_det_ref
i =idx_ref(ii)
h_matrix_dressed(i,i,istate) += delta_ii(ii,istate)
do jj = 1, N_det_non_ref
j =idx_non_ref(jj)
h_matrix_dressed(i,j,istate) += delta_ij(ii,jj,istate)
h_matrix_dressed(j,i,istate) += delta_ij(ii,jj,istate)
enddo
enddo
enddo
END_PROVIDER
BEGIN_PROVIDER [ double precision, CI_electronic_energy_dressed, (N_states_diag) ]
&BEGIN_PROVIDER [ double precision, CI_eigenvectors_dressed, (N_det,N_states_diag) ]
&BEGIN_PROVIDER [ double precision, CI_eigenvectors_s2_dressed, (N_states_diag) ]
implicit none
BEGIN_DOC
! Eigenvectors/values of the CI matrix
END_DOC
integer :: i,j
do j=1,N_states_diag
do i=1,N_det
CI_eigenvectors_dressed(i,j) = psi_coef(i,j)
enddo
enddo
if (diag_algorithm == "Davidson") then
integer :: istate
istate = 1
call davidson_diag_mrcc(psi_det,CI_eigenvectors_dressed,CI_electronic_energy_dressed,&
size(CI_eigenvectors_dressed,1),N_det,N_states_diag,N_int,output_determinants,istate)
else if (diag_algorithm == "Lapack") then
double precision, allocatable :: eigenvectors(:,:), eigenvalues(:)
allocate (eigenvectors(size(H_matrix_dressed,1),N_det))
allocate (eigenvalues(N_det))
call lapack_diag(eigenvalues,eigenvectors, &
H_matrix_dressed,size(H_matrix_dressed,1),N_det)
CI_electronic_energy_dressed(:) = 0.d0
do i=1,N_det
CI_eigenvectors_dressed(i,1) = eigenvectors(i,1)
enddo
integer :: i_state
double precision :: s2
i_state = 0
if (s2_eig) then
do j=1,N_det
call get_s2_u0(psi_det,eigenvectors(1,j),N_det,N_det,s2)
if(dabs(s2-expected_s2).le.0.3d0)then
i_state += 1
do i=1,N_det
CI_eigenvectors_dressed(i,i_state) = eigenvectors(i,j)
enddo
CI_electronic_energy_dressed(i_state) = eigenvalues(j)
CI_eigenvectors_s2_dressed(i_state) = s2
endif
if (i_state.ge.N_states_diag) then
exit
endif
enddo
else
do j=1,N_states_diag
call get_s2_u0(psi_det,eigenvectors(1,j),N_det,N_det,s2)
i_state += 1
do i=1,N_det
CI_eigenvectors_dressed(i,i_state) = eigenvectors(i,j)
enddo
CI_electronic_energy_dressed(i_state) = eigenvalues(j)
CI_eigenvectors_s2_dressed(i_state) = s2
enddo
endif
deallocate(eigenvectors,eigenvalues)
endif
END_PROVIDER
BEGIN_PROVIDER [ double precision, CI_energy_dressed, (N_states_diag) ]
implicit none
BEGIN_DOC
! N_states lowest eigenvalues of the dressed CI matrix
END_DOC
integer :: j
character*(8) :: st
call write_time(output_determinants)
do j=1,N_states_diag
CI_energy_dressed(j) = CI_electronic_energy_dressed(j) + nuclear_repulsion
enddo
END_PROVIDER
subroutine diagonalize_CI_dressed
implicit none
BEGIN_DOC
! Replace the coefficients of the CI states by the coefficients of the
! eigenstates of the CI matrix
END_DOC
integer :: i,j
do j=1,N_states_diag
do i=1,N_det
psi_coef(i,j) = CI_eigenvectors_dressed(i,j)
enddo
enddo
SOFT_TOUCH psi_coef
end

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

View File

@ -1,18 +1,18 @@
# Automatically created by /home/giner/quantum_package/scripts/module/module_handler.py
IRPF90_temp
IRPF90_man
irpf90_entities
tags
irpf90.make
Makefile
Makefile.depend
.ninja_log
# Automatically created by $QP_ROOT/scripts/module/module_handler.py
.ninja_deps
ezfio_interface.irp.f
Ezfio_files
MO_Basis
Utils
.ninja_log
AO_Basis
Electrons
Ezfio_files
IRPF90_man
IRPF90_temp
MO_Basis
Makefile
Makefile.depend
Nuclei
Utils
ezfio_interface.irp.f
irpf90.make
irpf90_entities
print_mo
tags

View File

@ -90,32 +90,32 @@ Documentation
routine.
`perturb_buffer_by_mono_dipole_moment_z <http://github.com/LCPQ/quantum_package/tree/master/src/Perturbation/perturbation.irp.f_shell_13#L686>`_
`perturb_buffer_by_mono_dipole_moment_z <http://github.com/LCPQ/quantum_package/tree/master/src/Perturbation/perturbation.irp.f_shell_13#L896>`_
Applly pertubration ``dipole_moment_z`` to the buffer of determinants generated in the H_apply
routine.
`perturb_buffer_by_mono_epstein_nesbet <http://github.com/LCPQ/quantum_package/tree/master/src/Perturbation/perturbation.irp.f_shell_13#L476>`_
`perturb_buffer_by_mono_epstein_nesbet <http://github.com/LCPQ/quantum_package/tree/master/src/Perturbation/perturbation.irp.f_shell_13#L161>`_
Applly pertubration ``epstein_nesbet`` to the buffer of determinants generated in the H_apply
routine.
`perturb_buffer_by_mono_epstein_nesbet_2x2 <http://github.com/LCPQ/quantum_package/tree/master/src/Perturbation/perturbation.irp.f_shell_13#L581>`_
`perturb_buffer_by_mono_epstein_nesbet_2x2 <http://github.com/LCPQ/quantum_package/tree/master/src/Perturbation/perturbation.irp.f_shell_13#L266>`_
Applly pertubration ``epstein_nesbet_2x2`` to the buffer of determinants generated in the H_apply
routine.
`perturb_buffer_by_mono_epstein_nesbet_sc2 <http://github.com/LCPQ/quantum_package/tree/master/src/Perturbation/perturbation.irp.f_shell_13#L371>`_
`perturb_buffer_by_mono_epstein_nesbet_sc2 <http://github.com/LCPQ/quantum_package/tree/master/src/Perturbation/perturbation.irp.f_shell_13#L581>`_
Applly pertubration ``epstein_nesbet_sc2`` to the buffer of determinants generated in the H_apply
routine.
`perturb_buffer_by_mono_epstein_nesbet_sc2_no_projected <http://github.com/LCPQ/quantum_package/tree/master/src/Perturbation/perturbation.irp.f_shell_13#L266>`_
`perturb_buffer_by_mono_epstein_nesbet_sc2_no_projected <http://github.com/LCPQ/quantum_package/tree/master/src/Perturbation/perturbation.irp.f_shell_13#L476>`_
Applly pertubration ``epstein_nesbet_sc2_no_projected`` to the buffer of determinants generated in the H_apply
routine.
`perturb_buffer_by_mono_epstein_nesbet_sc2_projected <http://github.com/LCPQ/quantum_package/tree/master/src/Perturbation/perturbation.irp.f_shell_13#L161>`_
`perturb_buffer_by_mono_epstein_nesbet_sc2_projected <http://github.com/LCPQ/quantum_package/tree/master/src/Perturbation/perturbation.irp.f_shell_13#L371>`_
Applly pertubration ``epstein_nesbet_sc2_projected`` to the buffer of determinants generated in the H_apply
routine.
@ -125,7 +125,7 @@ Documentation
routine.
`perturb_buffer_by_mono_moller_plesset <http://github.com/LCPQ/quantum_package/tree/master/src/Perturbation/perturbation.irp.f_shell_13#L896>`_
`perturb_buffer_by_mono_moller_plesset <http://github.com/LCPQ/quantum_package/tree/master/src/Perturbation/perturbation.irp.f_shell_13#L686>`_
Applly pertubration ``moller_plesset`` to the buffer of determinants generated in the H_apply
routine.
@ -135,32 +135,32 @@ Documentation
routine.
`perturb_buffer_dipole_moment_z <http://github.com/LCPQ/quantum_package/tree/master/src/Perturbation/perturbation.irp.f_shell_13#L635>`_
`perturb_buffer_dipole_moment_z <http://github.com/LCPQ/quantum_package/tree/master/src/Perturbation/perturbation.irp.f_shell_13#L845>`_
Applly pertubration ``dipole_moment_z`` to the buffer of determinants generated in the H_apply
routine.
`perturb_buffer_epstein_nesbet <http://github.com/LCPQ/quantum_package/tree/master/src/Perturbation/perturbation.irp.f_shell_13#L425>`_
`perturb_buffer_epstein_nesbet <http://github.com/LCPQ/quantum_package/tree/master/src/Perturbation/perturbation.irp.f_shell_13#L110>`_
Applly pertubration ``epstein_nesbet`` to the buffer of determinants generated in the H_apply
routine.
`perturb_buffer_epstein_nesbet_2x2 <http://github.com/LCPQ/quantum_package/tree/master/src/Perturbation/perturbation.irp.f_shell_13#L530>`_
`perturb_buffer_epstein_nesbet_2x2 <http://github.com/LCPQ/quantum_package/tree/master/src/Perturbation/perturbation.irp.f_shell_13#L215>`_
Applly pertubration ``epstein_nesbet_2x2`` to the buffer of determinants generated in the H_apply
routine.
`perturb_buffer_epstein_nesbet_sc2 <http://github.com/LCPQ/quantum_package/tree/master/src/Perturbation/perturbation.irp.f_shell_13#L320>`_
`perturb_buffer_epstein_nesbet_sc2 <http://github.com/LCPQ/quantum_package/tree/master/src/Perturbation/perturbation.irp.f_shell_13#L530>`_
Applly pertubration ``epstein_nesbet_sc2`` to the buffer of determinants generated in the H_apply
routine.
`perturb_buffer_epstein_nesbet_sc2_no_projected <http://github.com/LCPQ/quantum_package/tree/master/src/Perturbation/perturbation.irp.f_shell_13#L215>`_
`perturb_buffer_epstein_nesbet_sc2_no_projected <http://github.com/LCPQ/quantum_package/tree/master/src/Perturbation/perturbation.irp.f_shell_13#L425>`_
Applly pertubration ``epstein_nesbet_sc2_no_projected`` to the buffer of determinants generated in the H_apply
routine.
`perturb_buffer_epstein_nesbet_sc2_projected <http://github.com/LCPQ/quantum_package/tree/master/src/Perturbation/perturbation.irp.f_shell_13#L110>`_
`perturb_buffer_epstein_nesbet_sc2_projected <http://github.com/LCPQ/quantum_package/tree/master/src/Perturbation/perturbation.irp.f_shell_13#L320>`_
Applly pertubration ``epstein_nesbet_sc2_projected`` to the buffer of determinants generated in the H_apply
routine.
@ -170,7 +170,7 @@ Documentation
routine.
`perturb_buffer_moller_plesset <http://github.com/LCPQ/quantum_package/tree/master/src/Perturbation/perturbation.irp.f_shell_13#L845>`_
`perturb_buffer_moller_plesset <http://github.com/LCPQ/quantum_package/tree/master/src/Perturbation/perturbation.irp.f_shell_13#L635>`_
Applly pertubration ``moller_plesset`` to the buffer of determinants generated in the H_apply
routine.

View File

@ -1,36 +0,0 @@
use bitmasks
BEGIN_PROVIDER [ integer(bit_kind), psi_ref, (N_int,2,psi_det_size) ]
&BEGIN_PROVIDER [ double precision, psi_ref_coef, (psi_det_size,n_states) ]
&BEGIN_PROVIDER [ integer, idx_ref, (psi_det_size) ]
&BEGIN_PROVIDER [ integer, N_det_ref ]
implicit none
BEGIN_DOC
! Reference wave function, defined as determinants with coefficients > 0.05
! idx_ref gives the indice of the ref determinant in psi_det.
END_DOC
integer :: i, k, l
logical :: good
N_det_ref = 0
do i=1,N_det
good = .False.
do l = 1, N_states
psi_ref_coef(i,l) = 0.d0
good = good.or.(dabs(psi_coef(i,l)) > 0.05d0)
enddo
if (good) then
N_det_ref = N_det_ref+1
do k=1,N_int
psi_ref(k,1,N_det_ref) = psi_det(k,1,i)
psi_ref(k,2,N_det_ref) = psi_det(k,2,i)
enddo
idx_ref(N_det_ref) = i
do k=1,N_states
psi_ref_coef(N_det_ref,k) = psi_coef(i,k)
enddo
endif
enddo
call write_int(output_determinants,N_det_ref, 'Number of determinants in the reference')
END_PROVIDER

View File

@ -0,0 +1,45 @@
use bitmasks
BEGIN_PROVIDER [integer(bit_kind), holes_operators, (N_int,2)]
&BEGIN_PROVIDER [integer(bit_kind), particles_operators, (N_int,2)]
BEGIN_DOC
! holes_operators represents an array of integers where all the holes have
! been done going from psi_ref to psi_non_ref
! particles_operators represents an array of integers where all the particles have
! been done going from psi_ref to psi_non_ref
END_DOC
holes_operators = 0_bit_kind
particles_operators = 0_bit_kind
implicit none
integer(bit_kind), allocatable :: key_test(:,:)
integer(bit_kind), allocatable :: holes(:,:),particles(:,:)
allocate(key_test(N_int,2))
allocate(holes(N_int,2),particles(N_int,2))
integer :: i,j,k
print*,'providing holes_operators and particles_operators'
do i = 1, N_det_ref
do j = 1, N_det_non_ref
do k = 1, N_int
key_test(k,1) = xor(psi_ref(k,1,i),psi_non_ref(k,1,j))
key_test(k,2) = xor(psi_ref(k,2,i),psi_non_ref(k,2,j))
enddo
do k = 1,N_int
holes(k,1) = iand(psi_ref(k,1,i),key_test(k,1))
holes(k,2) = iand(psi_ref(k,2,i),key_test(k,2))
particles(k,1) = iand(psi_non_ref(k,1,j),key_test(k,1))
particles(k,2) = iand(psi_non_ref(k,2,j),key_test(k,2))
enddo
do k = 1, N_int
holes_operators(k,1) = ior(holes_operators(k,1),holes(k,1))
holes_operators(k,2) = ior(holes_operators(k,2),holes(k,2))
particles_operators(k,1) = ior(particles_operators(k,1),particles(k,1))
particles_operators(k,2) = ior(particles_operators(k,2),particles(k,2))
enddo
enddo
enddo
deallocate(key_test)
deallocate(holes,particles)
END_PROVIDER

View File

@ -28,6 +28,7 @@ filterhole
filterparticle
do_double_excitations
check_double_excitation
filter_vvvv_excitation
""".split()
class H_apply(object):
@ -51,7 +52,7 @@ class H_apply(object):
!$OMP accu,i_a,hole_tmp,particle_tmp,occ_particle_tmp, &
!$OMP occ_hole_tmp,key_idx,i_b,j_b,key,N_elec_in_key_part_1,&
!$OMP N_elec_in_key_hole_1,N_elec_in_key_part_2, &
!$OMP N_elec_in_key_hole_2,ia_ja_pairs) &
!$OMP N_elec_in_key_hole_2,ia_ja_pairs,key_union_hole_part) &
!$OMP SHARED(key_in,N_int,elec_num_tab,mo_tot_num, &
!$OMP hole_1, particl_1, hole_2, particl_2, &
!$OMP elec_alpha_num,i_generator) FIRSTPRIVATE(iproc)"""
@ -126,6 +127,21 @@ class H_apply(object):
self["check_double_excitation"] = """
check_double_excitation = .False.
"""
def filter_vvvv_excitation(self):
self["filter_vvvv_excitation"] = """
key_union_hole_part = 0_bit_kind
call set_bite_to_integer(i_a,key_union_hole_part,N_int)
call set_bite_to_integer(j_a,key_union_hole_part,N_int)
call set_bite_to_integer(i_b,key_union_hole_part,N_int)
call set_bite_to_integer(j_b,key_union_hole_part,N_int)
do jtest_vvvv = 1, N_int
if(iand(key_union_hole_part(jtest_vvvv),virt_bitmask(jtest_vvvv,1).ne.key_union_hole_part(jtest_vvvv)))then
b_cycle = .False.
endif
enddo
if(b_cycle) cycle
"""
def set_filter_holes(self):
self["filterhole"] = """
if(iand(ibset(0_bit_kind,j),hole(k,other_spin)).eq.0_bit_kind )cycle

View File

@ -62,7 +62,7 @@ Documentation
Transform a bit string to a string for printing
`cas_bitmask <http://github.com/LCPQ/quantum_package/tree/master/src/Bitmask/bitmasks.irp.f#L173>`_
`cas_bitmask <http://github.com/LCPQ/quantum_package/tree/master/src/Bitmask/bitmasks.irp.f#L220>`_
Bitmasks for CAS reference determinants. (N_int, alpha/beta, CAS reference)
@ -70,6 +70,10 @@ Documentation
Bitmask to include all possible single excitations from Hartree-Fock
`core_bitmask <http://github.com/LCPQ/quantum_package/tree/master/src/Bitmask/bitmasks.irp.f#L347>`_
Reunion of the inactive, active and virtual bitmasks
`debug_det <http://github.com/LCPQ/quantum_package/tree/master/src/Bitmask/bitmasks_routines.irp.f#L120>`_
Subroutine to print the content of a determinant in '+-' notation and
hexadecimal representation.
@ -84,7 +88,27 @@ Documentation
Bitmask to include all possible MOs
`generators_bitmask <http://github.com/LCPQ/quantum_package/tree/master/src/Bitmask/bitmasks.irp.f#L100>`_
`generators_bitmask <http://github.com/LCPQ/quantum_package/tree/master/src/Bitmask/bitmasks.irp.f#L147>`_
Bitmasks for generator determinants.
(N_int, alpha/beta, hole/particle, generator).
.br
3rd index is :
.br
* 1 : hole for single exc
.br
* 2 : particle for single exc
.br
* 3 : hole for 1st exc of double
.br
* 4 : particle for 1st exc of double
.br
* 5 : hole for 2nd exc of double
.br
* 6 : particle for 2nd exc of double
.br
`generators_bitmask_restart <http://github.com/LCPQ/quantum_package/tree/master/src/Bitmask/bitmasks.irp.f#L103>`_
Bitmasks for generator determinants.
(N_int, alpha/beta, hole/particle, generator).
.br
@ -108,24 +132,36 @@ Documentation
Hartree Fock bit mask
`i_bitmask_gen <http://github.com/LCPQ/quantum_package/tree/master/src/Bitmask/bitmasks.irp.f#L211>`_
`i_bitmask_gen <http://github.com/LCPQ/quantum_package/tree/master/src/Bitmask/bitmasks.irp.f#L361>`_
Current bitmask for the generators
`inact_bitmask <http://github.com/LCPQ/quantum_package/tree/master/src/Bitmask/bitmasks.irp.f#L193>`_
`inact_bitmask <http://github.com/LCPQ/quantum_package/tree/master/src/Bitmask/bitmasks.irp.f#L251>`_
Bitmasks for the inactive orbitals that are excited in post CAS method
`inact_virt_bitmask <http://github.com/LCPQ/quantum_package/tree/master/src/Bitmask/bitmasks.irp.f#L335>`_
Reunion of the inactive and virtual bitmasks
`is_a_two_holes_two_particles <http://github.com/LCPQ/quantum_package/tree/master/src/Bitmask/bitmask_cas_routines.irp.f#L206>`_
Undocumented
`list_inact <http://github.com/LCPQ/quantum_package/tree/master/src/Bitmask/bitmasks.irp.f#L301>`_
Undocumented
`list_to_bitstring <http://github.com/LCPQ/quantum_package/tree/master/src/Bitmask/bitmasks_routines.irp.f#L29>`_
Returns the physical string "string(N_int,2)" from the array of
occupations "list(N_int*bit_kind_size,2)
`n_cas_bitmask <http://github.com/LCPQ/quantum_package/tree/master/src/Bitmask/bitmasks.irp.f#L143>`_
`list_virt <http://github.com/LCPQ/quantum_package/tree/master/src/Bitmask/bitmasks.irp.f#L302>`_
Undocumented
`n_cas_bitmask <http://github.com/LCPQ/quantum_package/tree/master/src/Bitmask/bitmasks.irp.f#L190>`_
Number of bitmasks for CAS
@ -133,10 +169,18 @@ Documentation
Number of bitmasks for generators
`n_inact_orb <http://github.com/LCPQ/quantum_package/tree/master/src/Bitmask/bitmasks.irp.f#L253>`_
Bitmasks for the inactive orbitals that are excited in post CAS method
`n_int <http://github.com/LCPQ/quantum_package/tree/master/src/Bitmask/bitmasks.irp.f#L3>`_
Number of 64-bit integers needed to represent determinants as binary strings
`n_virt_orb <http://github.com/LCPQ/quantum_package/tree/master/src/Bitmask/bitmasks.irp.f#L254>`_
Bitmasks for the inactive orbitals that are excited in post CAS method
`number_of_holes <http://github.com/LCPQ/quantum_package/tree/master/src/Bitmask/bitmask_cas_routines.irp.f#L1>`_
Undocumented
@ -165,6 +209,14 @@ Documentation
Reference bit mask, used in Slater rules, chosen as Hartree-Fock bitmask
`virt_bitmask <http://github.com/LCPQ/quantum_package/tree/master/src/Bitmask/bitmasks.irp.f#L194>`_
`reunion_of_bitmask <http://github.com/LCPQ/quantum_package/tree/master/src/Bitmask/bitmasks.irp.f#L322>`_
Reunion of the inactive, active and virtual bitmasks
`unpaired_alpha_electrons <http://github.com/LCPQ/quantum_package/tree/master/src/Bitmask/bitmasks.irp.f#L370>`_
Bitmask reprenting the unpaired alpha electrons in the HF_bitmask
`virt_bitmask <http://github.com/LCPQ/quantum_package/tree/master/src/Bitmask/bitmasks.irp.f#L252>`_
Bitmasks for the inactive orbitals that are excited in post CAS method

View File

@ -97,6 +97,53 @@ BEGIN_PROVIDER [ integer, N_generators_bitmask ]
END_PROVIDER
BEGIN_PROVIDER [ integer(bit_kind), generators_bitmask_restart, (N_int,2,6,N_generators_bitmask) ]
implicit none
BEGIN_DOC
! Bitmasks for generator determinants.
! (N_int, alpha/beta, hole/particle, generator).
!
! 3rd index is :
!
! * 1 : hole for single exc
!
! * 2 : particle for single exc
!
! * 3 : hole for 1st exc of double
!
! * 4 : particle for 1st exc of double
!
! * 5 : hole for 2nd exc of double
!
! * 6 : particle for 2nd exc of double
!
END_DOC
logical :: exists
PROVIDE ezfio_filename
call ezfio_has_bitmasks_generators(exists)
if (exists) then
call ezfio_get_bitmasks_generators(generators_bitmask_restart)
else
integer :: k, ispin
do k=1,N_generators_bitmask
do ispin=1,2
generators_bitmask_restart(:,ispin,s_hole ,k) = full_ijkl_bitmask(:,d_hole1)
generators_bitmask_restart(:,ispin,s_part ,k) = full_ijkl_bitmask(:,d_part1)
generators_bitmask_restart(:,ispin,d_hole1,k) = full_ijkl_bitmask(:,d_hole1)
generators_bitmask_restart(:,ispin,d_part1,k) = full_ijkl_bitmask(:,d_part1)
generators_bitmask_restart(:,ispin,d_hole2,k) = full_ijkl_bitmask(:,d_hole2)
generators_bitmask_restart(:,ispin,d_part2,k) = full_ijkl_bitmask(:,d_part2)
enddo
enddo
endif
END_PROVIDER
BEGIN_PROVIDER [ integer(bit_kind), generators_bitmask, (N_int,2,6,N_generators_bitmask) ]
implicit none
BEGIN_DOC
@ -176,38 +223,144 @@ BEGIN_PROVIDER [ integer(bit_kind), cas_bitmask, (N_int,2,N_cas_bitmask) ]
! Bitmasks for CAS reference determinants. (N_int, alpha/beta, CAS reference)
END_DOC
logical :: exists
integer :: i
integer :: i,i_part,i_gen,j
PROVIDE ezfio_filename
call ezfio_has_bitmasks_cas(exists)
if (exists) then
print*,'---------------------'
print*,'CAS BITMASK RESTART'
call ezfio_get_bitmasks_cas(cas_bitmask)
print*,'---------------------'
else
if(N_generators_bitmask == 1)then
do i=1,N_cas_bitmask
cas_bitmask(:,:,i) = iand(not(HF_bitmask(:,:)),full_ijkl_bitmask(:,:))
enddo
else
i_part = 2
i_gen = 1
do j = 1, N_cas_bitmask
do i = 1, N_int
cas_bitmask(i,1,j) = generators_bitmask_restart(i,1,i_part,i_gen)
cas_bitmask(i,2,j) = generators_bitmask_restart(i,2,i_part,i_gen)
enddo
enddo
endif
endif
END_PROVIDER
BEGIN_PROVIDER [ integer(bit_kind), inact_bitmask, (N_int,2) ]
&BEGIN_PROVIDER [ integer(bit_kind), virt_bitmask, (N_int,2) ]
&BEGIN_PROVIDER [ integer, n_inact_orb ]
&BEGIN_PROVIDER [ integer, n_virt_orb ]
implicit none
BEGIN_DOC
! Bitmasks for the inactive orbitals that are excited in post CAS method
END_DOC
logical :: exists
integer :: j
integer :: j,i
integer :: i_hole,i_part,i_gen
PROVIDE ezfio_filename
do j = 1, N_int
inact_bitmask(j,1) = xor(generators_bitmask(j,1,1,1),cas_bitmask(j,1,1))
inact_bitmask(j,2) = xor(generators_bitmask(j,2,1,1),cas_bitmask(j,2,1))
virt_bitmask(j,1) = xor(generators_bitmask(j,1,2,1),cas_bitmask(j,1,1))
virt_bitmask(j,2) = xor(generators_bitmask(j,2,2,1),cas_bitmask(j,2,1))
enddo
!do j = 1, N_int
! inact_bitmask(j,1) = xor(generators_bitmask(j,1,1,1),cas_bitmask(j,1,1))
! inact_bitmask(j,2) = xor(generators_bitmask(j,2,1,1),cas_bitmask(j,2,1))
! virt_bitmask(j,1) = xor(generators_bitmask(j,1,2,1),cas_bitmask(j,1,1))
! virt_bitmask(j,2) = xor(generators_bitmask(j,2,2,1),cas_bitmask(j,2,1))
!enddo
n_inact_orb = 0
n_virt_orb = 0
if(N_generators_bitmask == 1)then
do j = 1, N_int
inact_bitmask(j,1) = xor(generators_bitmask_restart(j,1,1,1),cas_bitmask(j,1,1))
inact_bitmask(j,2) = xor(generators_bitmask_restart(j,2,1,1),cas_bitmask(j,2,1))
virt_bitmask(j,1) = xor(generators_bitmask_restart(j,1,2,1),cas_bitmask(j,1,1))
virt_bitmask(j,2) = xor(generators_bitmask_restart(j,2,2,1),cas_bitmask(j,2,1))
n_inact_orb += popcnt(inact_bitmask(j,1))
n_virt_orb += popcnt(virt_bitmask(j,1))
enddo
else
i_hole = 1
i_gen = 1
do i = 1, N_int
inact_bitmask(i,1) = generators_bitmask(i,1,i_hole,i_gen)
inact_bitmask(i,2) = generators_bitmask(i,2,i_hole,i_gen)
n_inact_orb += popcnt(inact_bitmask(i,1))
enddo
i_part = 2
i_gen = 3
do i = 1, N_int
virt_bitmask(i,1) = generators_bitmask(i,1,i_part,i_gen)
virt_bitmask(i,2) = generators_bitmask(i,2,i_part,i_gen)
n_virt_orb += popcnt(virt_bitmask(i,1))
enddo
endif
END_PROVIDER
BEGIN_PROVIDER [ integer, list_inact, (n_inact_orb)]
&BEGIN_PROVIDER [ integer, list_virt, (n_virt_orb)]
implicit none
integer :: occ_inact(N_int*bit_kind_size)
integer :: itest,i
occ_inact = 0
call bitstring_to_list(inact_bitmask(1,1), occ_inact(1), itest, N_int)
ASSERT(itest==n_inact_orb)
do i = 1, n_inact_orb
list_inact(i) = occ_inact(i)
enddo
occ_inact = 0
call bitstring_to_list(virt_bitmask(1,1), occ_inact(1), itest, N_int)
ASSERT(itest==n_virt_orb)
do i = 1, n_virt_orb
list_virt(i) = occ_inact(i)
enddo
END_PROVIDER
BEGIN_PROVIDER [ integer(bit_kind), reunion_of_bitmask, (N_int,2)]
implicit none
BEGIN_DOC
! Reunion of the inactive, active and virtual bitmasks
END_DOC
integer :: i,j
do i = 1, N_int
reunion_of_bitmask(i,1) = ior(ior(cas_bitmask(i,1,1),inact_bitmask(i,1)),virt_bitmask(i,1))
reunion_of_bitmask(i,2) = ior(ior(cas_bitmask(i,2,1),inact_bitmask(i,2)),virt_bitmask(i,2))
enddo
END_PROVIDER
BEGIN_PROVIDER [ integer(bit_kind), inact_virt_bitmask, (N_int,2)]
implicit none
BEGIN_DOC
! Reunion of the inactive and virtual bitmasks
END_DOC
integer :: i,j
do i = 1, N_int
inact_virt_bitmask(i,1) = ior(inact_bitmask(i,1),virt_bitmask(i,1))
inact_virt_bitmask(i,2) = ior(inact_bitmask(i,2),virt_bitmask(i,2))
enddo
END_PROVIDER
BEGIN_PROVIDER [ integer(bit_kind), core_bitmask, (N_int,2)]
implicit none
BEGIN_DOC
! Reunion of the inactive, active and virtual bitmasks
END_DOC
integer :: i,j
do i = 1, N_int
core_bitmask(i,1) = iand(ref_bitmask(i,1),reunion_of_bitmask(i,1))
core_bitmask(i,2) = iand(ref_bitmask(i,2),reunion_of_bitmask(i,2))
enddo
END_PROVIDER
BEGIN_PROVIDER [ integer, i_bitmask_gen ]
implicit none
BEGIN_DOC
@ -217,3 +370,14 @@ BEGIN_PROVIDER [ integer, i_bitmask_gen ]
END_PROVIDER
BEGIN_PROVIDER [ integer(bit_kind), unpaired_alpha_electrons, (N_int)]
implicit none
BEGIN_DOC
! Bitmask reprenting the unpaired alpha electrons in the HF_bitmask
END_DOC
integer :: i
unpaired_alpha_electrons = 0_bit_kind
do i = 1, N_int
unpaired_alpha_electrons(i) = xor(HF_bitmask(i,1),HF_bitmask(i,2))
enddo
END_PROVIDER

View File

@ -16,13 +16,17 @@ Nuclei
Pseudo
Utils
det_svd
diag_and_save
ezfio_interface.irp.f
guess_doublet
guess_singlet
guess_triplet
irpf90.make
irpf90_entities
print_cas_energy
print_s2
program_initial_determinants
save_natorb
save_wf_only_monos
tags
truncate_wf

View File

@ -18,6 +18,7 @@ subroutine $subroutine_diexc(key_in, hole_1,particl_1, hole_2, particl_2, i_gene
integer(bit_kind), allocatable :: hole_save(:,:)
integer(bit_kind), allocatable :: key(:,:),hole(:,:), particle(:,:)
integer(bit_kind), allocatable :: hole_tmp(:,:), particle_tmp(:,:)
integer(bit_kind), allocatable :: key_union_hole_part(:)
integer :: ii,i,jj,j,k,ispin,l
integer, allocatable :: occ_particle(:,:), occ_hole(:,:)
integer, allocatable :: occ_particle_tmp(:,:), occ_hole_tmp(:,:)
@ -31,6 +32,7 @@ subroutine $subroutine_diexc(key_in, hole_1,particl_1, hole_2, particl_2, i_gene
integer, allocatable :: ib_jb_pairs(:,:)
double precision :: diag_H_mat_elem
integer :: iproc
integer :: jtest_vvvv
integer(omp_lock_kind), save :: lck, ifirst=0
if (ifirst == 0) then
!$ call omp_init_lock(lck)
@ -38,6 +40,7 @@ subroutine $subroutine_diexc(key_in, hole_1,particl_1, hole_2, particl_2, i_gene
endif
logical :: check_double_excitation
logical :: b_cycle
check_double_excitation = .True.
iproc = iproc_in
@ -50,7 +53,7 @@ subroutine $subroutine_diexc(key_in, hole_1,particl_1, hole_2, particl_2, i_gene
key(N_int,2),hole(N_int,2), particle(N_int,2), hole_tmp(N_int,2),&
particle_tmp(N_int,2), occ_particle(N_int*bit_kind_size,2), &
occ_hole(N_int*bit_kind_size,2), occ_particle_tmp(N_int*bit_kind_size,2),&
occ_hole_tmp(N_int*bit_kind_size,2))
occ_hole_tmp(N_int*bit_kind_size,2),key_union_hole_part(N_int))
$init_thread
@ -151,6 +154,7 @@ subroutine $subroutine_diexc(key_in, hole_1,particl_1, hole_2, particl_2, i_gene
ASSERT (j_b > 0)
ASSERT (j_b <= mo_tot_num)
if (array_pairs(i_b,j_b)) then
$filter_vvvv_excitation
i+= 1
ib_jb_pairs(1,i) = i_b
ib_jb_pairs(2,i) = j_b
@ -200,6 +204,7 @@ subroutine $subroutine_diexc(key_in, hole_1,particl_1, hole_2, particl_2, i_gene
ASSERT (j_b <= mo_tot_num)
if (j_b <= j_a) cycle
if (array_pairs(i_b,j_b)) then
$filter_vvvv_excitation
i+= 1
ib_jb_pairs(1,i) = i_b
ib_jb_pairs(2,i) = j_b
@ -245,7 +250,7 @@ subroutine $subroutine_diexc(key_in, hole_1,particl_1, hole_2, particl_2, i_gene
key,hole, particle, hole_tmp,&
particle_tmp, occ_particle, &
occ_hole, occ_particle_tmp,&
occ_hole_tmp,array_pairs)
occ_hole_tmp,array_pairs,key_union_hole_part)
$omp_end_parallel
$finalization
end
@ -278,6 +283,7 @@ subroutine $subroutine_monoexc(key_in, hole_1,particl_1,i_generator,iproc_in $pa
integer :: N_elec_in_key_hole_1(2),N_elec_in_key_part_1(2)
integer :: N_elec_in_key_hole_2(2),N_elec_in_key_part_2(2)
logical :: is_a_two_holes_two_particles
integer(bit_kind), allocatable :: key_union_hole_part(:)
integer, allocatable :: ia_ja_pairs(:,:,:)
logical, allocatable :: array_pairs(:,:)
@ -305,7 +311,7 @@ subroutine $subroutine_monoexc(key_in, hole_1,particl_1,i_generator,iproc_in $pa
key(N_int,2),hole(N_int,2), particle(N_int,2), hole_tmp(N_int,2),&
particle_tmp(N_int,2), occ_particle(N_int*bit_kind_size,2), &
occ_hole(N_int*bit_kind_size,2), occ_particle_tmp(N_int*bit_kind_size,2),&
occ_hole_tmp(N_int*bit_kind_size,2))
occ_hole_tmp(N_int*bit_kind_size,2),key_union_hole_part(N_int))
$init_thread
!!!! First couple hole particle
do j = 1, N_int
@ -376,7 +382,7 @@ subroutine $subroutine_monoexc(key_in, hole_1,particl_1,i_generator,iproc_in $pa
key,hole, particle, hole_tmp,&
particle_tmp, occ_particle, &
occ_hole, occ_particle_tmp,&
occ_hole_tmp)
occ_hole_tmp,key_union_hole_part)
$omp_end_parallel
$finalization

View File

@ -221,7 +221,7 @@ Documentation
Build connection proxy between determinants
`det_num <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/ezfio_interface.irp.f#L248>`_
`det_num <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/ezfio_interface.irp.f#L116>`_
det_num
@ -621,6 +621,10 @@ Documentation
Undocumented
`print_psi_cas <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/print_cas_energy.irp.f#L1>`_
Undocumented
`psi_average_norm_contrib <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/determinants.irp.f#L273>`_
Contribution of determinants to the state-averaged density
@ -831,7 +835,11 @@ Documentation
Undocumented
`s2_eig <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/ezfio_interface.irp.f#L116>`_
`routine_count_mono_save_mono <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/save_wf_only_monos.irp.f#L9>`_
Undocumented
`s2_eig <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/ezfio_interface.irp.f#L248>`_
Force the wave function to be an eigenfunction of S^2
@ -863,10 +871,22 @@ Documentation
Save the wave function into the EZFIO file
`save_wavefunction_specified <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/determinants.irp.f#L752>`_
Save the wave function into the EZFIO file
`save_wavefunction_unsorted <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/determinants.irp.f#L655>`_
Save the wave function into the EZFIO file
`save_wf <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/save_wf_only_monos.irp.f#L1>`_
Undocumented
`set_bite_to_integer <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/create_excitations.irp.f#L38>`_
Undocumented
`set_natural_mos <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/density_matrix.irp.f#L180>`_
Set natural orbitals, obtained by diagonalization of the one-body density matrix in the MO basis

View File

@ -34,3 +34,14 @@ subroutine do_mono_excitation(key_in,i_hole,i_particle,ispin,i_ok)
i_ok = -1
endif
end
subroutine set_bite_to_integer(i_physical,key,Nint)
use bitmasks
implicit none
integer, intent(in) :: i_physical,Nint
integer(bit_kind), intent(inout) :: key(Nint)
integer :: k,j,i
k = ishft(i_physical-1,-bit_kind_shift)+1
j = i_physical-ishft(k-1,bit_kind_shift)-1
key(k) = ibset(key(k),j)
end

View File

@ -12,7 +12,7 @@ BEGIN_PROVIDER [ integer, davidson_sze_max ]
! Max number of Davidson sizes
END_DOC
ASSERT (davidson_sze_max <= davidson_iter_max)
davidson_sze_max = 8*N_states_diag
davidson_sze_max = min(8,2*N_states_diag)
END_PROVIDER
subroutine davidson_diag(dets_in,u_in,energies,dim_in,sze,N_st,Nint,iunit)

View File

@ -749,3 +749,91 @@ end
subroutine save_wavefunction_specified(ndet,nstates,psidet,psicoef,ndetsave,index_det_save)
implicit none
BEGIN_DOC
! Save the wave function into the EZFIO file
END_DOC
use bitmasks
integer, intent(in) :: ndet,nstates
integer(bit_kind), intent(in) :: psidet(N_int,2,ndet)
double precision, intent(in) :: psicoef(ndet,nstates)
integer, intent(in) :: index_det_save(ndet)
integer, intent(in) :: ndetsave
integer*8, allocatable :: psi_det_save(:,:,:)
double precision, allocatable :: psi_coef_save(:,:)
integer*8 :: det_8(100)
integer(bit_kind) :: det_bk((100*8)/bit_kind)
integer :: N_int2
equivalence (det_8, det_bk)
integer :: i,k
PROVIDE progress_bar
call start_progress(7,'Saving wfunction',0.d0)
progress_bar(1) = 1
progress_value = dble(progress_bar(1))
call ezfio_set_determinants_N_int(N_int)
progress_bar(1) = 2
progress_value = dble(progress_bar(1))
call ezfio_set_determinants_bit_kind(bit_kind)
progress_bar(1) = 3
progress_value = dble(progress_bar(1))
call ezfio_set_determinants_N_det(ndetsave)
progress_bar(1) = 4
progress_value = dble(progress_bar(1))
call ezfio_set_determinants_n_states(nstates)
progress_bar(1) = 5
progress_value = dble(progress_bar(1))
call ezfio_set_determinants_mo_label(mo_label)
progress_bar(1) = 6
progress_value = dble(progress_bar(1))
N_int2 = (N_int*bit_kind)/8
allocate (psi_det_save(N_int2,2,ndetsave))
do i=1,ndetsave
do k=1,N_int
det_bk(k) = psidet(k,1,index_det_save(i))
enddo
do k=1,N_int2
psi_det_save(k,1,i) = det_8(k)
enddo
do k=1,N_int
det_bk(k) = psidet(k,2,index_det_save(i))
enddo
do k=1,N_int2
psi_det_save(k,2,i) = det_8(k)
enddo
enddo
call ezfio_set_determinants_psi_det(psi_det_save)
deallocate (psi_det_save)
progress_bar(1) = 7
progress_value = dble(progress_bar(1))
allocate (psi_coef_save(ndetsave,nstates))
double precision :: accu_norm(nstates)
accu_norm = 0.d0
do k=1,nstates
do i=1,ndetsave
accu_norm(k) = accu_norm(k) + psicoef(index_det_save(i),k) * psicoef(index_det_save(i),k)
psi_coef_save(i,k) = psicoef(index_det_save(i),k)
enddo
enddo
do k = 1, nstates
accu_norm(k) = 1.d0/dsqrt(accu_norm(k))
enddo
do k=1,nstates
do i=1,ndetsave
psi_coef_save(i,k) = psi_coef_save(i,k) * accu_norm(k)
enddo
enddo
call ezfio_set_determinants_psi_coef(psi_coef_save)
call write_int(output_determinants,ndet,'Saved determinants')
call stop_progress
deallocate (psi_coef_save)
end

View File

@ -1095,13 +1095,9 @@ subroutine H_u_0(v_0,u_0,H_jj,n,keys_tmp,Nint)
!$OMP PARALLEL DEFAULT(NONE) &
!$OMP PRIVATE(i,hij,j,k,idx,jj,vt) &
!$OMP SHARED(n,H_jj,u_0,keys_tmp,Nint,v_0,davidson_threshold)
!$OMP DO SCHEDULE(static)
do i=1,n
v_0(i) = H_jj(i) * u_0(i)
enddo
!$OMP END DO
allocate(idx(0:n), vt(n))
Vt = 0.d0
v_0 = 0.d0
!$OMP DO SCHEDULE(guided)
do i=1,n
idx(0) = i
@ -1123,6 +1119,9 @@ subroutine H_u_0(v_0,u_0,H_jj,n,keys_tmp,Nint)
!$OMP END CRITICAL
deallocate(idx,vt)
!$OMP END PARALLEL
do i=1,n
v_0(i) += H_jj(i) * u_0(i)
enddo
end

164
src/Ezfio_files/README.rst Normal file
View File

@ -0,0 +1,164 @@
==================
Ezfio_files Module
==================
This modules essentially contains the name of the EZFIO directory in the
``ezfio_filename`` variable. This is read as the first argument of the
command-line, or as the ``QP_INPUT`` environment variable.
Documentation
=============
.. Do not edit this section. It was auto-generated from the
.. by the `update_README.py` script.
`ezfio_filename <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/ezfio.irp.f#L1>`_
Name of EZFIO file. It is obtained from the QPACKAGE_INPUT environment
variable if it is set, or as the 1st argument of the command line.
`getunitandopen <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/get_unit_and_open.irp.f#L1>`_
:f:
file name
.br
:mode:
'R' : READ, UNFORMATTED
'W' : WRITE, UNFORMATTED
'r' : READ, FORMATTED
'w' : WRITE, FORMATTED
'a' : APPEND, FORMATTED
'x' : READ/WRITE, FORMATTED
.br
`output_ao_basis <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L1>`_
Output file for AO_Basis
`output_bitmask <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L21>`_
Output file for Bitmask
`output_cas_sd <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L41>`_
Output file for CAS_SD
`output_cisd <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L61>`_
Output file for CISD
`output_cisd_sc2_selected <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L81>`_
Output file for CISD_SC2_selected
`output_cisd_selected <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L101>`_
Output file for CISD_selected
`output_cpu_time_0 <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f#L2>`_
Initial CPU and wall times when printing in the output files
`output_ddci_selected <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L121>`_
Output file for DDCI_selected
`output_determinants <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L141>`_
Output file for Determinants
`output_electrons <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L161>`_
Output file for Electrons
`output_ezfio_files <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L181>`_
Output file for Ezfio_files
`output_full_ci <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L201>`_
Output file for Full_CI
`output_generators_cas <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L221>`_
Output file for Generators_CAS
`output_generators_full <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L241>`_
Output file for Generators_full
`output_hartree_fock <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L261>`_
Output file for Hartree_Fock
`output_integrals_bielec <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L281>`_
Output file for Integrals_Bielec
`output_integrals_monoelec <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L301>`_
Output file for Integrals_Monoelec
`output_loc_cele <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L321>`_
Output file for loc_cele
`output_mo_basis <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L341>`_
Output file for MO_Basis
`output_moguess <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L361>`_
Output file for MOGuess
`output_molden <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L381>`_
Output file for Molden
`output_nuclei <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L401>`_
Output file for Nuclei
`output_perturbation <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L421>`_
Output file for Perturbation
`output_properties <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L441>`_
Output file for Properties
`output_pseudo <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L461>`_
Output file for Pseudo
`output_selectors_full <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L481>`_
Output file for Selectors_full
`output_singlerefmethod <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L501>`_
Output file for SingleRefMethod
`output_utils <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f_shell_40#L521>`_
Output file for Utils
`output_wall_time_0 <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f#L1>`_
Initial CPU and wall times when printing in the output files
`write_bool <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f#L88>`_
Write an logical value in output
`write_double <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f#L58>`_
Write a double precision value in output
`write_int <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f#L73>`_
Write an integer value in output
`write_time <http://github.com/LCPQ/quantum_package/tree/master/src/Ezfio_files/output.irp.f#L42>`_
Write a time stamp in the output for chronological reconstruction

View File

@ -27,7 +27,7 @@ Documentation
Array of the name of element, sorted by nuclear charge (integer)
`nucl_charge <http://github.com/LCPQ/quantum_package/tree/master/src/Nuclei/ezfio_interface.irp.f#L24>`_
`nucl_charge <http://github.com/LCPQ/quantum_package/tree/master/src/Nuclei/ezfio_interface.irp.f#L28>`_
Nuclear charges
@ -69,11 +69,11 @@ Documentation
nucl_dist_vec : Nucleus-nucleus distances vectors
`nucl_label <http://github.com/LCPQ/quantum_package/tree/master/src/Nuclei/ezfio_interface.irp.f#L6>`_
`nucl_label <http://github.com/LCPQ/quantum_package/tree/master/src/Nuclei/ezfio_interface.irp.f#L50>`_
Nuclear labels
`nucl_num <http://github.com/LCPQ/quantum_package/tree/master/src/Nuclei/ezfio_interface.irp.f#L46>`_
`nucl_num <http://github.com/LCPQ/quantum_package/tree/master/src/Nuclei/ezfio_interface.irp.f#L6>`_
Number of nuclei

View File

@ -26,7 +26,7 @@ Documentation
test
`pseudo_dz_kl <http://github.com/LCPQ/quantum_package/tree/master/src/Pseudo/ezfio_interface.irp.f#L94>`_
`pseudo_dz_kl <http://github.com/LCPQ/quantum_package/tree/master/src/Pseudo/ezfio_interface.irp.f#L226>`_
test
@ -42,7 +42,7 @@ Documentation
test
`pseudo_kmax <http://github.com/LCPQ/quantum_package/tree/master/src/Pseudo/ezfio_interface.irp.f#L72>`_
`pseudo_kmax <http://github.com/LCPQ/quantum_package/tree/master/src/Pseudo/ezfio_interface.irp.f#L94>`_
test
@ -50,7 +50,7 @@ Documentation
test
`pseudo_n_k <http://github.com/LCPQ/quantum_package/tree/master/src/Pseudo/ezfio_interface.irp.f#L226>`_
`pseudo_n_k <http://github.com/LCPQ/quantum_package/tree/master/src/Pseudo/ezfio_interface.irp.f#L72>`_
test