9
1
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-06-15 00:55:17 +02:00

added the definition of the input density in the AO basis

This commit is contained in:
Emmanuel Giner 2019-04-09 00:10:01 +02:00
parent 06f9010c12
commit 400427157d
3 changed files with 40 additions and 14 deletions

View File

@ -24,3 +24,17 @@ type: double precision
size: (mo_basis.mo_num,mo_basis.mo_num,determinants.n_states)
[data_one_e_dm_alpha_ao]
interface: ezfio, provider
doc: Alpha one body density matrix on the |AO| basis computed with the wave function
type: double precision
size: (ao_basis.ao_num,ao_basis.ao_num,determinants.n_states)
[data_one_e_dm_beta_ao]
interface: ezfio, provider
doc: Beta one body density matrix on the |AO| basis computed with the wave function
type: double precision
size: (ao_basis.ao_num,ao_basis.ao_num,determinants.n_states)

View File

@ -9,6 +9,8 @@ BEGIN_PROVIDER [double precision, one_e_dm_mo_alpha_for_dft, (mo_num,mo_num, N_s
one_e_dm_mo_alpha_for_dft = data_one_e_dm_alpha_mo + damping_for_rs_dft * delta_alpha
else if (density_for_dft .EQ. "input_density")then
one_e_dm_mo_alpha_for_dft = data_one_e_dm_alpha_mo
else if (density_for_dft .EQ. "input_density_ao")then
call ao_to_mo(data_one_e_dm_alpha_mo,size(data_one_e_dm_alpha_mo,1),one_e_dm_mo_alpha_for_dft,size(one_e_dm_mo_alpha_for_dft,1))
else if (density_for_dft .EQ. "WFT")then
provide mo_coef
one_e_dm_mo_alpha_for_dft = one_e_dm_mo_alpha
@ -58,6 +60,8 @@ BEGIN_PROVIDER [double precision, one_e_dm_mo_beta_for_dft, (mo_num,mo_num, N_st
one_e_dm_mo_beta_for_dft = data_one_e_dm_beta_mo + damping_for_rs_dft * delta_beta
else if (density_for_dft .EQ. "input_density")then
one_e_dm_mo_beta_for_dft = data_one_e_dm_beta_mo
else if (density_for_dft .EQ. "input_density_ao")then
call ao_to_mo(data_one_e_dm_beta_mo,size(data_one_e_dm_beta_mo,1),one_e_dm_mo_beta_for_dft,size(one_e_dm_mo_beta_for_dft,1))
else if (density_for_dft .EQ. "WFT")then
provide mo_coef
one_e_dm_mo_beta_for_dft = one_e_dm_mo_beta
@ -119,16 +123,22 @@ END_PROVIDER
one_e_dm_alpha_ao_for_dft = 0.d0
one_e_dm_beta_ao_for_dft = 0.d0
do istate = 1, N_states
call mo_to_ao_no_overlap( one_e_dm_mo_alpha_for_dft(1,1,istate), &
size(one_e_dm_mo_alpha_for_dft,1), &
one_e_dm_alpha_ao_for_dft(1,1,istate), &
size(one_e_dm_alpha_ao_for_dft,1) )
call mo_to_ao_no_overlap( one_e_dm_mo_beta_for_dft(1,1,istate), &
size(one_e_dm_mo_beta_for_dft,1), &
one_e_dm_beta_ao_for_dft(1,1,istate), &
size(one_e_dm_beta_ao_for_dft,1) )
enddo
if (density_for_dft .EQ. "input_density_ao")then
one_e_dm_alpha_ao_for_dft = data_one_e_dm_alpha_ao
one_e_dm_beta_ao_for_dft = data_one_e_dm_beta_ao
else
do istate = 1, N_states
call mo_to_ao_no_overlap( one_e_dm_mo_alpha_for_dft(1,1,istate), &
size(one_e_dm_mo_alpha_for_dft,1), &
one_e_dm_alpha_ao_for_dft(1,1,istate), &
size(one_e_dm_alpha_ao_for_dft,1) )
call mo_to_ao_no_overlap( one_e_dm_mo_beta_for_dft(1,1,istate), &
size(one_e_dm_mo_beta_for_dft,1), &
one_e_dm_beta_ao_for_dft(1,1,istate), &
size(one_e_dm_beta_ao_for_dft,1) )
enddo
endif
END_PROVIDER

View File

@ -1,15 +1,15 @@
program save_one_e_dm
implicit none
BEGIN_DOC
! Program that computes the one body density on the |MO| basis
! Program that computes the one body density on the |MO| and |AO| basis
! for $\alpha$ and $\beta$ electrons from the wave function
! stored in the |EZFIO| directory, and then saves it into the
! :ref:`module_aux_quantities`.
!
! Then, the global variable :option:`aux_quantities data_one_e_dm_alpha_mo`
! and :option:`aux_quantities data_one_e_dm_beta_mo` will automatically
! read this density in the next calculation. This can be used to perform
! damping on the density in |RSDFT| calculations (see
! and :option:`aux_quantities data_one_e_dm_beta_mo` (and the corresponding for |AO|)
! will automatically ! read this density in the next calculation.
! This can be used to perform damping on the density in |RSDFT| calculations (see
! :ref:`module_density_for_dft`).
END_DOC
read_wf = .True.
@ -25,4 +25,6 @@ subroutine routine_save_one_e_dm
END_DOC
call ezfio_set_aux_quantities_data_one_e_dm_alpha_mo(one_e_dm_mo_alpha)
call ezfio_set_aux_quantities_data_one_e_dm_beta_mo(one_e_dm_mo_beta)
call ezfio_set_aux_quantities_data_one_e_dm_alpha_ao(one_e_dm_ao_alpha)
call ezfio_set_aux_quantities_data_one_e_dm_beta_ao(one_e_dm_ao_beta)
end