mirror of
https://github.com/QuantumPackage/qp2.git
synced 2024-12-21 11:03:29 +01:00
added no_ov_natorb
This commit is contained in:
parent
40bf8bd6dd
commit
4342169da8
1
etc/openmp.rc
Normal file
1
etc/openmp.rc
Normal file
@ -0,0 +1 @@
|
||||
export OMP_NESTED=True
|
@ -262,17 +262,48 @@ subroutine set_natural_mos
|
||||
iorb = list_virt(i)
|
||||
do j = 1, n_core_inact_act_orb
|
||||
jorb = list_core_inact_act(j)
|
||||
if(one_e_dm_mo(iorb,jorb).ne. 0.d0)then
|
||||
print*,'AHAHAH'
|
||||
print*,iorb,jorb,one_e_dm_mo(iorb,jorb)
|
||||
stop
|
||||
endif
|
||||
enddo
|
||||
enddo
|
||||
call mo_as_svd_vectors_of_mo_matrix_eig(one_e_dm_mo,size(one_e_dm_mo,1),mo_num,mo_num,mo_occ,label)
|
||||
soft_touch mo_occ
|
||||
|
||||
end
|
||||
|
||||
subroutine set_natorb_no_ov_rot
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Set natural orbitals, obtained by diagonalization of the one-body density matrix
|
||||
! in the |MO| basis
|
||||
END_DOC
|
||||
character*(64) :: label
|
||||
double precision, allocatable :: tmp(:,:)
|
||||
allocate(tmp(mo_num, mo_num))
|
||||
label = "Natural"
|
||||
tmp = one_e_dm_mo
|
||||
integer :: i,j,iorb,jorb
|
||||
do i = 1, n_virt_orb
|
||||
iorb = list_virt(i)
|
||||
do j = 1, n_core_inact_act_orb
|
||||
jorb = list_core_inact_act(j)
|
||||
tmp(iorb, jorb) = 0.d0
|
||||
tmp(jorb, iorb) = 0.d0
|
||||
enddo
|
||||
enddo
|
||||
call mo_as_svd_vectors_of_mo_matrix_eig(tmp,size(tmp,1),mo_num,mo_num,mo_occ,label)
|
||||
soft_touch mo_occ
|
||||
end
|
||||
|
||||
subroutine save_natural_mos_no_ov_rot
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Save natural orbitals, obtained by diagonalization of the one-body density matrix in
|
||||
! the |MO| basis
|
||||
END_DOC
|
||||
call set_natorb_no_ov_rot
|
||||
call nullify_small_elements(ao_num,mo_num,mo_coef,size(mo_coef,1),1.d-10)
|
||||
call orthonormalize_mos
|
||||
call save_mos
|
||||
end
|
||||
|
||||
subroutine save_natural_mos
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
|
25
src/tools/save_natorb_no_ov_rot.irp.f
Normal file
25
src/tools/save_natorb_no_ov_rot.irp.f
Normal file
@ -0,0 +1,25 @@
|
||||
program save_natorb
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! Save natural |MOs| into the |EZFIO|.
|
||||
!
|
||||
! This program reads the wave function stored in the |EZFIO| directory,
|
||||
! extracts the corresponding natural orbitals and setd them as the new
|
||||
! |MOs|.
|
||||
!
|
||||
! If this is a multi-state calculation, the density matrix that produces
|
||||
! the natural orbitals is obtained from an average of the density
|
||||
! matrices of each state with the corresponding
|
||||
! :option:`determinants state_average_weight`
|
||||
END_DOC
|
||||
read_wf = .True.
|
||||
touch read_wf
|
||||
call save_natural_mos_no_ov_rot
|
||||
call save_ref_determinant
|
||||
call ezfio_set_mo_two_e_ints_io_mo_two_e_integrals('None')
|
||||
call ezfio_set_mo_one_e_ints_io_mo_one_e_integrals('None')
|
||||
call ezfio_set_mo_one_e_ints_io_mo_integrals_kinetic('None')
|
||||
call ezfio_set_mo_one_e_ints_io_mo_integrals_n_e('None')
|
||||
call ezfio_set_mo_one_e_ints_io_mo_integrals_pseudo('None')
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user