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

added density matrix nstates on AO basis

This commit is contained in:
eginer 2023-11-17 14:56:25 +01:00
parent 2ff59e6869
commit 6e8b1e5d0c

View File

@ -445,7 +445,7 @@ END_PROVIDER
mo_beta = one_e_dm_mo_beta_average(j,i)
! if(dabs(dm_mo).le.1.d-10)cycle
one_e_dm_ao_alpha(l,k) += mo_coef(k,i) * mo_coef(l,j) * mo_alpha
one_e_dm_ao_beta(l,k) += mo_coef(k,i) * mo_coef(l,j) * mo_beta
one_e_dm_ao_beta(l,k) += mo_coef(k,i) * mo_coef(l,j) * mo_beta
enddo
enddo
enddo
@ -453,6 +453,36 @@ END_PROVIDER
END_PROVIDER
BEGIN_PROVIDER [ double precision, one_e_dm_ao_alpha_nstates, (ao_num,ao_num,N_states) ]
&BEGIN_PROVIDER [ double precision, one_e_dm_ao_beta_nstates, (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,istate
double precision :: mo_alpha,mo_beta
one_e_dm_ao_alpha_nstates = 0.d0
one_e_dm_ao_beta_nstates = 0.d0
do istate = 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(j,i,istate)
mo_beta = one_e_dm_mo_beta(j,i,istate)
! if(dabs(dm_mo).le.1.d-10)cycle
one_e_dm_ao_alpha_nstates(l,k,istate) += mo_coef(k,i) * mo_coef(l,j) * mo_alpha
one_e_dm_ao_beta_nstates(l,k,istate) += mo_coef(k,i) * mo_coef(l,j) * mo_beta
enddo
enddo
enddo
enddo
enddo
END_PROVIDER
BEGIN_PROVIDER [ double precision, one_e_dm_ao, (ao_num, ao_num)]
implicit none
BEGIN_DOC