9
1
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-12-25 13:03:28 +01:00

fixed 1rdm in AO basis to be state-specific instead of average

This commit is contained in:
Kevin Gasperich 2021-05-14 10:48:02 -05:00
parent 2a5bd3d170
commit 4842d55a63
2 changed files with 32 additions and 2 deletions

View File

@ -309,6 +309,36 @@ END_PROVIDER
END_PROVIDER
BEGIN_PROVIDER [ complex*16, one_e_dm_ao_alpha_complex_nst, (ao_num,ao_num,N_states) ]
&BEGIN_PROVIDER [ complex*16, one_e_dm_ao_beta_complex_nst, (ao_num,ao_num,N_states) ]
BEGIN_DOC
! One body density matrix on the |AO| basis : $\rho_{AO}(\alpha), \rho_{AO}(\beta)$.
END_DOC
implicit none
integer :: i,j,k,l,ist
complex*16 :: mo_alpha,mo_beta
one_e_dm_ao_alpha_complex_nst = (0.d0,0.d0)
one_e_dm_ao_beta_complex_nst = (0.d0,0.d0)
do ist = 1,N_states
do k = 1, ao_num
do l = 1, ao_num
do i = 1, mo_num
do j = 1, mo_num
mo_alpha = one_e_dm_mo_alpha_complex(j,i,ist)
mo_beta = one_e_dm_mo_beta_complex(j,i,ist)
! if(dabs(dm_mo).le.1.d-10)cycle
one_e_dm_ao_alpha_complex_nst(l,k,ist) += dconjg(mo_coef_complex(k,i)) * mo_coef_complex(l,j) * mo_alpha
one_e_dm_ao_beta_complex_nst(l,k,ist) += dconjg(mo_coef_complex(k,i)) * mo_coef_complex(l,j) * mo_beta
enddo
enddo
enddo
enddo
enddo
END_PROVIDER
!============================================!
! !
! kpts !

View File

@ -22,6 +22,6 @@ subroutine routine_save_one_e_dm_cplx
END_DOC
call ezfio_set_aux_quantities_data_one_e_dm_alpha_mo_complex(one_e_dm_mo_alpha_complex)
call ezfio_set_aux_quantities_data_one_e_dm_beta_mo_complex(one_e_dm_mo_beta_complex)
call ezfio_set_aux_quantities_data_one_e_dm_alpha_ao_complex(one_e_dm_ao_alpha_complex)
call ezfio_set_aux_quantities_data_one_e_dm_beta_ao_complex(one_e_dm_ao_beta_complex)
call ezfio_set_aux_quantities_data_one_e_dm_alpha_ao_complex(one_e_dm_ao_alpha_complex_nst)
call ezfio_set_aux_quantities_data_one_e_dm_beta_ao_complex(one_e_dm_ao_beta_complex_nst)
end