mirror of
https://github.com/LCPQ/quantum_package
synced 2024-12-22 20:35:19 +01:00
Guess based on the overlap matrix of AOs to remove linear dependencies
This commit is contained in:
parent
afbdda0dab
commit
6cad30269f
14
src/MOGuess/guess_overlap.irp.f
Normal file
14
src/MOGuess/guess_overlap.irp.f
Normal file
@ -0,0 +1,14 @@
|
||||
program guess_mimi
|
||||
BEGIN_DOC
|
||||
! Produce `H_core` MO orbital
|
||||
END_DOC
|
||||
implicit none
|
||||
character*(64) :: label
|
||||
mo_coef = ao_ortho_lowdin_coef
|
||||
TOUCH mo_coef
|
||||
label = "Guess"
|
||||
call mo_as_eigvectors_of_mo_matrix(-ao_overlap, &
|
||||
size(ao_overlap,1), &
|
||||
size(ao_overlap,2),label)
|
||||
call save_mos
|
||||
end
|
10
src/MOGuess/truncate_mos.irp.f
Normal file
10
src/MOGuess/truncate_mos.irp.f
Normal file
@ -0,0 +1,10 @@
|
||||
program prog_truncate_mo
|
||||
BEGIN_DOC
|
||||
! Truncate MO set
|
||||
END_DOC
|
||||
implicit none
|
||||
integer :: n
|
||||
write(*,*) 'Number of MOs to keep'
|
||||
read (*,*) n
|
||||
call save_mos_truncated(n)
|
||||
end
|
@ -21,6 +21,29 @@ subroutine save_mos
|
||||
|
||||
end
|
||||
|
||||
subroutine save_mos_truncated(n)
|
||||
implicit none
|
||||
double precision, allocatable :: buffer(:,:)
|
||||
integer :: i,j,n
|
||||
|
||||
call system('$QP_ROOT/scripts/save_current_mos.sh '//trim(ezfio_filename))
|
||||
|
||||
call ezfio_set_mo_basis_mo_tot_num(n)
|
||||
call ezfio_set_mo_basis_mo_label(mo_label)
|
||||
call ezfio_set_mo_basis_ao_md5(ao_md5)
|
||||
allocate ( buffer(ao_num,n) )
|
||||
buffer = 0.d0
|
||||
do j = 1, n
|
||||
do i = 1, ao_num
|
||||
buffer(i,j) = mo_coef(i,j)
|
||||
enddo
|
||||
enddo
|
||||
call ezfio_set_mo_basis_mo_coef(buffer)
|
||||
call ezfio_set_mo_basis_mo_occ(mo_occ)
|
||||
deallocate (buffer)
|
||||
|
||||
end
|
||||
|
||||
subroutine mo_as_eigvectors_of_mo_matrix(matrix,n,m,label)
|
||||
implicit none
|
||||
integer,intent(in) :: n,m
|
||||
|
Loading…
Reference in New Issue
Block a user