9
1
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-12-26 21:33:30 +01:00

indentation

This commit is contained in:
Anthony Scemama 2019-06-27 21:41:17 +02:00
parent 9bb66d5b3a
commit 3e38912dcb
4 changed files with 516 additions and 513 deletions

View File

@ -8,11 +8,11 @@ program print_two_rdm
double precision :: accu,twodm
accu = 0.d0
do i=1,mo_num
do j=1,mo_num
do k=1,mo_num
do l=1,mo_num
twodm = coussin_peter_two_rdm_mo(i,j,k,l,1)
do i=1,n_act_orb
do j=1,n_act_orb
do k=1,n_act_orb
do l=1,n_act_orb
twodm = coussin_peter_two_rdm_mo(list_act(i),list_act(j),list_act(k),list_act(l),1)
if(dabs(twodm - P0tuvx(i,j,k,l)).gt.thr)then
print*,''
print*,'sum'

View File

@ -2,5 +2,7 @@
two_body_rdm
============
Contains the two rdms (aa,bb,ab) stored as plain arrays
Contains the two rdms $\alpha\alpha$, $\beta\beta$ and $\alpha\beta$ stored as
maps, with pysicists notation, consistent with the two-electron integrals in the
MO basis.

View File

@ -1,5 +1,4 @@
subroutine all_two_rdm_dm_nstates_openmp(big_array_aa,big_array_bb,big_array_ab,dim1,dim2,dim3,dim4,u_0,N_st,sze)
subroutine all_two_rdm_dm_nstates_openmp(big_array_aa,big_array_bb,big_array_ab,dim1,dim2,dim3,dim4,u_0,N_st,sze)
use bitmasks
implicit none
BEGIN_DOC
@ -36,10 +35,10 @@
call dset_order(u_0(1,k),psi_bilinear_matrix_order_reverse,N_det)
enddo
end
end
subroutine all_two_rdm_dm_nstates_openmp_work(big_array_aa,big_array_bb,big_array_ab,dim1,dim2,dim3,dim4,u_t,N_st,sze,istart,iend,ishift,istep)
subroutine all_two_rdm_dm_nstates_openmp_work(big_array_aa,big_array_bb,big_array_ab,dim1,dim2,dim3,dim4,u_t,N_st,sze,istart,iend,ishift,istep)
use bitmasks
implicit none
BEGIN_DOC
@ -69,9 +68,9 @@
case default
call all_two_rdm_dm_nstates_openmp_work_N_int(big_array_aa,big_array_bb,big_array_ab,dim1,dim2,dim3,dim4,u_t,N_st,sze,istart,iend,ishift,istep)
end select
end
end
BEGIN_TEMPLATE
BEGIN_TEMPLATE
subroutine all_two_rdm_dm_nstates_openmp_work_$N_int(big_array_aa,big_array_bb,big_array_ab,dim1,dim2,dim3,dim4,u_t,N_st,sze,istart,iend,ishift,istep)
use bitmasks
@ -121,8 +120,8 @@ subroutine all_two_rdm_dm_nstates_openmp_work_$N_int(big_array_aa,big_array_bb,b
!!$OMP PARALLEL DEFAULT(NONE) NUM_THREADS(nthreads_davidson) &
! !$OMP SHARED(psi_bilinear_matrix_rows, N_det, &
! !$OMP psi_bilinear_matrix_columns, &
! !$OMP psi_det_alpha_unique, psi_det_beta_unique, &
! !$OMP n_det_alpha_unique, n_det_beta_unique, N_int, &
! !$OMP psi_det_alpha_unique, psi_det_beta_unique,&
! !$OMP n_det_alpha_unique, n_det_beta_unique, N_int,&
! !$OMP psi_bilinear_matrix_transp_rows, &
! !$OMP psi_bilinear_matrix_transp_columns, &
! !$OMP psi_bilinear_matrix_transp_order, N_st, &
@ -131,7 +130,7 @@ subroutine all_two_rdm_dm_nstates_openmp_work_$N_int(big_array_aa,big_array_bb,b
! !$OMP psi_bilinear_matrix_transp_rows_loc, &
! !$OMP istart, iend, istep, irp_here, v_t, s_t, &
! !$OMP ishift, idx0, u_t, maxab) &
! !$OMP PRIVATE(krow, kcol, tmp_det, spindet, k_a, k_b, i, &
! !$OMP PRIVATE(krow, kcol, tmp_det, spindet, k_a, k_b, i,&
! !$OMP lcol, lrow, l_a, l_b, &
! !$OMP buffer, doubles, n_doubles, &
! !$OMP tmp_det2, idx, l, kcol_prev, &
@ -222,9 +221,9 @@ subroutine all_two_rdm_dm_nstates_openmp_work_$N_int(big_array_aa,big_array_bb,b
enddo
enddo
! !$OMP END DO
! !$OMP END DO
! !$OMP DO SCHEDULE(dynamic,64)
! !$OMP DO SCHEDULE(dynamic,64)
do k_a=istart+ishift,iend,istep
@ -431,13 +430,13 @@ subroutine all_two_rdm_dm_nstates_openmp_work_$N_int(big_array_aa,big_array_bb,b
end
SUBST [ N_int ]
SUBST [ N_int ]
1;;
2;;
3;;
4;;
N_int;;
1;;
2;;
3;;
4;;
N_int;;
END_TEMPLATE
END_TEMPLATE

View File

@ -1,23 +1,25 @@
BEGIN_PROVIDER [double precision, coussin_peter_two_rdm_mo, (mo_num,mo_num,mo_num,mo_num,N_states)]
BEGIN_PROVIDER [double precision, coussin_peter_two_rdm_mo, (mo_num,mo_num,mo_num,mo_num,N_states)]
implicit none
BEGIN_DOC
! coussin_peter_two_rdm_mo(i,j,k,l) = the two rdm that peter wants for his CASSCF
END_DOC
integer :: i,j,k,l
integer :: i,j,k,l, istate
do istate = 1,N_states
do l = 1, mo_num
do k = 1, mo_num
do j = 1, mo_num
do i = 1, mo_num
coussin_peter_two_rdm_mo(i,j,k,l,:) = 0.5d0 * (two_rdm_alpha_beta_mo(i,j,k,l,:) + two_rdm_alpha_beta_mo(i,j,k,l,:)) &
+ two_rdm_alpha_alpha_mo(i,j,k,l,:) &
+ two_rdm_beta_beta_mo(i,j,k,l,:)
coussin_peter_two_rdm_mo (i,j,k,l,istate) = &
two_rdm_alpha_beta_mo (i,j,k,l,istate) + &
two_rdm_alpha_alpha_mo(i,j,k,l,istate) + &
two_rdm_beta_beta_mo (i,j,k,l,istate)
enddo
enddo
enddo
enddo
enddo
END_PROVIDER
END_PROVIDER
BEGIN_PROVIDER [double precision, two_rdm_alpha_beta_mo, (mo_num,mo_num,mo_num,mo_num,N_states)]
@ -45,7 +47,7 @@
call wall_time(cpu_1)
print*,'two_rdm_alpha_beta provided in',dabs(cpu_1-cpu_0)
END_PROVIDER
END_PROVIDER
BEGIN_PROVIDER [double precision, two_rdm_alpha_beta_mo_physicist, (mo_num,mo_num,mo_num,mo_num,N_states)]
@ -80,5 +82,5 @@
call wall_time(cpu_1)
print*,'two_rdm_alpha_beta_mo_physicist provided in',dabs(cpu_1-cpu_0)
END_PROVIDER
END_PROVIDER