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

added provider for complex mos; working on saving complex mos

This commit is contained in:
Kevin Gasperich 2020-01-27 13:36:13 -06:00
parent a67497fba8
commit 5eb1c17614
2 changed files with 50 additions and 0 deletions

View File

@ -146,6 +146,29 @@ BEGIN_PROVIDER [ double precision, mo_coef_imag, (ao_num,mo_num) ]
endif
END_PROVIDER
BEGIN_PROVIDER [ complex*16, mo_coef_complex, (ao_num,mo_num) ]
implicit none
BEGIN_DOC
! Molecular orbital coefficients on |AO| basis set
!
! mo_coef_complex(i,j) = coefficient of the i-th |AO| on the jth |MO|
!
! mo_label : Label characterizing the |MOs| (local, canonical, natural, etc)
END_DOC
integer :: i, j
double precision, allocatable :: buffer(:,:)
logical :: exists
PROVIDE ezfio_filename
provide mo_coef mo_coef_imag
do i=1,mo_num
do j=1,ao_num
mo_coef_complex(j,i) = dcmplx(mo_coef(j,i),mo_coef_imag(j,i))
enddo
enddo
END_PROVIDER
BEGIN_PROVIDER [ double precision, mo_coef_in_ao_ortho_basis, (ao_num, mo_num) ]
implicit none
BEGIN_DOC

View File

@ -17,6 +17,15 @@ subroutine save_mos
call ezfio_set_mo_basis_mo_coef(buffer)
call ezfio_set_mo_basis_mo_occ(mo_occ)
call ezfio_set_mo_basis_mo_class(mo_class)
if (is_periodic) then
buffer = 0.d0
do j = 1, mo_num
do i = 1, ao_num
buffer(i,j) = mo_coef_imag(i,j)
enddo
enddo
call ezfio_set_mo_basis_mo_coef_imag(buffer)
endif
deallocate (buffer)
end
@ -39,6 +48,15 @@ subroutine save_mos_no_occ
enddo
enddo
call ezfio_set_mo_basis_mo_coef(buffer)
if (is_periodic) then
buffer = 0.d0
do j = 1, mo_num
do i = 1, ao_num
buffer(i,j) = mo_coef_imag(i,j)
enddo
enddo
call ezfio_set_mo_basis_mo_coef_imag(buffer)
endif
deallocate (buffer)
end
@ -63,6 +81,15 @@ subroutine save_mos_truncated(n)
call ezfio_set_mo_basis_mo_coef(buffer)
call ezfio_set_mo_basis_mo_occ(mo_occ)
call ezfio_set_mo_basis_mo_class(mo_class)
if (is_periodic) then
buffer = 0.d0
do j = 1, mo_num
do i = 1, ao_num
buffer(i,j) = mo_coef_imag(i,j)
enddo
enddo
call ezfio_set_mo_basis_mo_coef_imag(buffer)
endif
deallocate (buffer)
end