mirror of
https://github.com/QuantumPackage/qp2.git
synced 2024-11-07 05:53:37 +01:00
added general svd for new mo
This commit is contained in:
parent
7793832613
commit
502e787323
3
configure
vendored
3
configure
vendored
@ -3,6 +3,9 @@
|
|||||||
# Quantum Package configuration script
|
# Quantum Package configuration script
|
||||||
#
|
#
|
||||||
|
|
||||||
|
unset CC
|
||||||
|
unset CXX
|
||||||
|
|
||||||
TEMP=$(getopt -o c:i:h -l config:,install:,help -n $0 -- "$@") || exit 1
|
TEMP=$(getopt -o c:i:h -l config:,install:,help -n $0 -- "$@") || exit 1
|
||||||
eval set -- "$TEMP"
|
eval set -- "$TEMP"
|
||||||
|
|
||||||
|
@ -523,10 +523,24 @@ subroutine pt2_collector(zmq_socket_pull, E, relative_error, pt2, error, varianc
|
|||||||
exit
|
exit
|
||||||
else
|
else
|
||||||
call pull_pt2_results(zmq_socket_pull, index, eI_task, vI_task, nI_task, task_id, n_tasks, b2)
|
call pull_pt2_results(zmq_socket_pull, index, eI_task, vI_task, nI_task, task_id, n_tasks, b2)
|
||||||
|
if(n_tasks > pt2_n_tasks_max)then
|
||||||
|
print*,'PB !!!'
|
||||||
|
print*,'If you see this, send an email to Anthony scemama with the following content'
|
||||||
|
print*,irp_here
|
||||||
|
print*,'n_tasks,pt2_n_tasks_max = ',n_tasks,pt2_n_tasks_max
|
||||||
|
stop -1
|
||||||
|
endif
|
||||||
if (zmq_delete_tasks_async_send(zmq_to_qp_run_socket,task_id,n_tasks,sending) == -1) then
|
if (zmq_delete_tasks_async_send(zmq_to_qp_run_socket,task_id,n_tasks,sending) == -1) then
|
||||||
stop 'PT2: Unable to delete tasks (send)'
|
stop 'PT2: Unable to delete tasks (send)'
|
||||||
endif
|
endif
|
||||||
do i=1,n_tasks
|
do i=1,n_tasks
|
||||||
|
if(index(i).gt.size(eI,2).or.index(i).lt.1)then
|
||||||
|
print*,'PB !!!'
|
||||||
|
print*,'If you see this, send an email to Anthony scemama with the following content'
|
||||||
|
print*,irp_here
|
||||||
|
print*,'i,index(i),size(ei,2) = ',i,index(i),size(ei,2)
|
||||||
|
stop -1
|
||||||
|
endif
|
||||||
eI(1:N_states, index(i)) += eI_task(1:N_states,i)
|
eI(1:N_states, index(i)) += eI_task(1:N_states,i)
|
||||||
vI(1:N_states, index(i)) += vI_task(1:N_states,i)
|
vI(1:N_states, index(i)) += vI_task(1:N_states,i)
|
||||||
nI(1:N_states, index(i)) += nI_task(1:N_states,i)
|
nI(1:N_states, index(i)) += nI_task(1:N_states,i)
|
||||||
|
@ -257,6 +257,18 @@ subroutine set_natural_mos
|
|||||||
double precision, allocatable :: tmp(:,:)
|
double precision, allocatable :: tmp(:,:)
|
||||||
|
|
||||||
label = "Natural"
|
label = "Natural"
|
||||||
|
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)
|
||||||
|
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)
|
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
|
soft_touch mo_occ
|
||||||
|
|
||||||
|
@ -238,8 +238,13 @@ subroutine mo_as_svd_vectors_of_mo_matrix_eig(matrix,lda,m,n,eig,label)
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
subroutine general_mo_coef_new_as_svd_vectors_of_mo_matrix_eig(matrix,lda,m,n,mo_coef_before,eig,mo_coef_new)
|
subroutine mo_coef_new_as_svd_vectors_of_mo_matrix_eig(matrix,lda,m,n,mo_coef_before,eig,mo_coef_new)
|
||||||
implicit none
|
implicit none
|
||||||
|
BEGIN_DOC
|
||||||
|
! You enter with matrix in the MO basis defined with the mo_coef_before.
|
||||||
|
!
|
||||||
|
! You SVD the matrix and set the eigenvectors as mo_coef_new ordered by increasing singular values
|
||||||
|
END_DOC
|
||||||
integer,intent(in) :: lda,m,n
|
integer,intent(in) :: lda,m,n
|
||||||
double precision, intent(in) :: matrix(lda,n),mo_coef_before(ao_num,m)
|
double precision, intent(in) :: matrix(lda,n),mo_coef_before(ao_num,m)
|
||||||
double precision, intent(out) :: eig(m),mo_coef_new(ao_num,m)
|
double precision, intent(out) :: eig(m),mo_coef_new(ao_num,m)
|
||||||
@ -247,7 +252,7 @@ subroutine general_mo_coef_new_as_svd_vectors_of_mo_matrix_eig(matrix,lda,m,n,mo
|
|||||||
integer :: i,j
|
integer :: i,j
|
||||||
double precision :: accu
|
double precision :: accu
|
||||||
double precision, allocatable :: mo_coef_tmp(:,:), U(:,:),D(:), A(:,:), Vt(:,:), work(:)
|
double precision, allocatable :: mo_coef_tmp(:,:), U(:,:),D(:), A(:,:), Vt(:,:), work(:)
|
||||||
!DIR$ ATTRIBUTES ALIGN : $IRP_ALIGN :: mo_coef_new, U, Vt, A
|
!DIR$ ATTRIBUTES ALIGN : $IRP_ALIGN :: U, Vt, A
|
||||||
|
|
||||||
call write_time(6)
|
call write_time(6)
|
||||||
if (m /= mo_num) then
|
if (m /= mo_num) then
|
||||||
|
Loading…
Reference in New Issue
Block a user