mirror of
https://github.com/QuantumPackage/qp2.git
synced 2024-08-24 21:21:47 +02:00
added test in fci_tc_bi_ortho
changed names in ezfio functions in ortho_three_e_ints changed names in ezfio functions in ortho_three_e_ints
This commit is contained in:
parent
26bdbf7193
commit
dd4ea54c6c
26
src/fci_tc_bi/13.fci_tc_bi_ortho.bats
Normal file
26
src/fci_tc_bi/13.fci_tc_bi_ortho.bats
Normal file
@ -0,0 +1,26 @@
|
||||
#!/usr/bin/env bats
|
||||
|
||||
source $QP_ROOT/tests/bats/common.bats.sh
|
||||
source $QP_ROOT/quantum_package.rc
|
||||
|
||||
|
||||
function run_O() {
|
||||
qp set_file O_tc_scf
|
||||
FILE=O_tc_scf/tc_bi_ortho/psi_l_coef_bi_ortho.gz
|
||||
if test -f "$FILE"; then
|
||||
rm O_tc_scf/tc_bi_ortho/psi*
|
||||
fi
|
||||
qp set determinants n_det_max 20000
|
||||
file=${EZFIO_FILE}.fci_tc_bi_ortho.out
|
||||
qp run fci_tc_bi_ortho | tee $file
|
||||
eref=-74.971188861115309
|
||||
energy="$(grep 'E(before) +rPT2 =' $file | tail -1 | cut -d '=' -f 2)"
|
||||
eq $energy $eref 1e-4
|
||||
}
|
||||
|
||||
|
||||
@test "O" {
|
||||
run_O
|
||||
}
|
||||
|
||||
|
@ -1,29 +1,29 @@
|
||||
BEGIN_PROVIDER [ double precision, three_body_ints, (mo_num, mo_num, mo_num, mo_num, mo_num, mo_num)]
|
||||
BEGIN_PROVIDER [ double precision, ortho_three_e_ints, (mo_num, mo_num, mo_num, mo_num, mo_num, mo_num)]
|
||||
implicit none
|
||||
BEGIN_DOC
|
||||
! matrix element of the -L three-body operator
|
||||
!
|
||||
! notice the -1 sign: in this way three_body_ints can be directly used to compute Slater rules :)
|
||||
! notice the -1 sign: in this way ortho_three_e_ints can be directly used to compute Slater rules :)
|
||||
END_DOC
|
||||
integer :: i,j,k,l,m,n
|
||||
double precision :: integral, wall1, wall0
|
||||
character*(128) :: name_file
|
||||
three_body_ints = 0.d0
|
||||
print*,'Providing the three_body_ints ...'
|
||||
ortho_three_e_ints = 0.d0
|
||||
print*,'Providing the ortho_three_e_ints ...'
|
||||
call wall_time(wall0)
|
||||
name_file = 'six_index_tensor'
|
||||
if(read_three_body_ints)then
|
||||
call read_fcidump_3_tc(three_body_ints)
|
||||
if(read_ortho_three_e_ints)then
|
||||
call read_fcidump_3_tc(ortho_three_e_ints)
|
||||
else
|
||||
if(read_three_body_ints)then
|
||||
print*,'Reading three_body_ints from disk ...'
|
||||
call read_array_6_index_tensor(mo_num,three_body_ints,name_file)
|
||||
if(read_ortho_three_e_ints)then
|
||||
print*,'Reading ortho_three_e_ints from disk ...'
|
||||
call read_array_6_index_tensor(mo_num,ortho_three_e_ints,name_file)
|
||||
else
|
||||
provide x_W_ij_erf_rk
|
||||
!$OMP PARALLEL &
|
||||
!$OMP DEFAULT (NONE) &
|
||||
!$OMP PRIVATE (i,j,k,l,m,n,integral) &
|
||||
!$OMP SHARED (mo_num,three_body_ints)
|
||||
!$OMP SHARED (mo_num,ortho_three_e_ints)
|
||||
!$OMP DO SCHEDULE (dynamic)
|
||||
do n = 1, mo_num
|
||||
do l = 1, mo_num
|
||||
@ -35,31 +35,31 @@ BEGIN_PROVIDER [ double precision, three_body_ints, (mo_num, mo_num, mo_num, mo_
|
||||
integral = 0.d0
|
||||
call give_integrals_3_body(i,j,m,k,l,n,integral)
|
||||
|
||||
three_body_ints(i,j,m,k,l,n) = -1.d0 * integral
|
||||
ortho_three_e_ints(i,j,m,k,l,n) = -1.d0 * integral
|
||||
|
||||
! permutation with k,i
|
||||
three_body_ints(k,j,m,i,l,n) = -1.d0 * integral ! i,k
|
||||
ortho_three_e_ints(k,j,m,i,l,n) = -1.d0 * integral ! i,k
|
||||
! two permutations with k,i
|
||||
three_body_ints(k,l,m,i,j,n) = -1.d0 * integral
|
||||
three_body_ints(k,j,n,i,l,m) = -1.d0 * integral
|
||||
ortho_three_e_ints(k,l,m,i,j,n) = -1.d0 * integral
|
||||
ortho_three_e_ints(k,j,n,i,l,m) = -1.d0 * integral
|
||||
! three permutations with k,i
|
||||
three_body_ints(k,l,n,i,j,m) = -1.d0 * integral
|
||||
ortho_three_e_ints(k,l,n,i,j,m) = -1.d0 * integral
|
||||
|
||||
! permutation with l,j
|
||||
three_body_ints(i,l,m,k,j,n) = -1.d0 * integral ! j,l
|
||||
ortho_three_e_ints(i,l,m,k,j,n) = -1.d0 * integral ! j,l
|
||||
! two permutations with l,j
|
||||
three_body_ints(k,l,m,i,j,n) = -1.d0 * integral
|
||||
three_body_ints(i,l,n,k,j,m) = -1.d0 * integral
|
||||
ortho_three_e_ints(k,l,m,i,j,n) = -1.d0 * integral
|
||||
ortho_three_e_ints(i,l,n,k,j,m) = -1.d0 * integral
|
||||
! two permutations with l,j
|
||||
!!!! three_body_ints(k,l,n,i,j,m) = -1.d0 * integral
|
||||
!!!! ortho_three_e_ints(k,l,n,i,j,m) = -1.d0 * integral
|
||||
|
||||
! permutation with m,n
|
||||
three_body_ints(i,j,n,k,l,m) = -1.d0 * integral ! m,n
|
||||
ortho_three_e_ints(i,j,n,k,l,m) = -1.d0 * integral ! m,n
|
||||
! two permutations with m,n
|
||||
three_body_ints(k,j,n,i,l,m) = -1.d0 * integral ! m,n
|
||||
three_body_ints(i,l,n,k,j,m) = -1.d0 * integral ! m,n
|
||||
ortho_three_e_ints(k,j,n,i,l,m) = -1.d0 * integral ! m,n
|
||||
ortho_three_e_ints(i,l,n,k,j,m) = -1.d0 * integral ! m,n
|
||||
! three permutations with k,i
|
||||
!!!! three_body_ints(k,l,n,i,j,m) = -1.d0 * integral ! m,n
|
||||
!!!! ortho_three_e_ints(k,l,n,i,j,m) = -1.d0 * integral ! m,n
|
||||
|
||||
!! endif
|
||||
enddo
|
||||
@ -73,11 +73,11 @@ BEGIN_PROVIDER [ double precision, three_body_ints, (mo_num, mo_num, mo_num, mo_
|
||||
endif
|
||||
endif
|
||||
call wall_time(wall1)
|
||||
print*,'wall time for three_body_ints',wall1 - wall0
|
||||
if(write_three_body_ints)then
|
||||
print*,'Writing three_body_ints on disk ...'
|
||||
call write_array_6_index_tensor(mo_num,three_body_ints,name_file)
|
||||
call ezfio_set_three_body_ints_io_three_body_ints("Read")
|
||||
print*,'wall time for ortho_three_e_ints',wall1 - wall0
|
||||
if(write_ortho_three_e_ints)then
|
||||
print*,'Writing ortho_three_e_ints on disk ...'
|
||||
call write_array_6_index_tensor(mo_num,ortho_three_e_ints,name_file)
|
||||
call ezfio_set_ortho_three_e_ints_io_ortho_three_e_ints("Read")
|
||||
endif
|
||||
|
||||
END_PROVIDER
|
||||
|
@ -14,8 +14,8 @@ BEGIN_PROVIDER [ double precision, three_body_3_index, (mo_num, mo_num, mo_num)]
|
||||
print*,'Providing the three_body_3_index ...'
|
||||
name_file = 'three_body_3_index'
|
||||
call wall_time(wall0)
|
||||
if(read_three_body_ints)then
|
||||
print*,'Reading three_body_ints from disk ...'
|
||||
if(read_ortho_three_e_ints)then
|
||||
print*,'Reading ortho_three_e_ints from disk ...'
|
||||
call read_array_3_index_tensor(mo_num,three_body_3_index,name_file)
|
||||
else
|
||||
provide x_W_ij_erf_rk
|
||||
@ -42,10 +42,10 @@ BEGIN_PROVIDER [ double precision, three_body_3_index, (mo_num, mo_num, mo_num)]
|
||||
endif
|
||||
call wall_time(wall1)
|
||||
print*,'wall time for three_body_3_index',wall1 - wall0
|
||||
if(write_three_body_ints)then
|
||||
if(write_ortho_three_e_ints)then
|
||||
print*,'Writing three_body_3_index on disk ...'
|
||||
call write_array_3_index_tensor(mo_num,three_body_3_index,name_file)
|
||||
call ezfio_set_three_body_ints_io_three_body_ints("Read")
|
||||
call ezfio_set_ortho_three_e_ints_io_ortho_three_e_ints("Read")
|
||||
endif
|
||||
|
||||
|
||||
@ -66,8 +66,8 @@ BEGIN_PROVIDER [ double precision, three_body_3_index_exch_12, (mo_num, mo_num,
|
||||
name_file = 'three_body_3_index_exch_12'
|
||||
print*,'Providing the three_body_3_index_exch_12 ...'
|
||||
call wall_time(wall0)
|
||||
if(read_three_body_ints)then
|
||||
print*,'Reading three_body_ints from disk ...'
|
||||
if(read_ortho_three_e_ints)then
|
||||
print*,'Reading ortho_three_e_ints from disk ...'
|
||||
call read_array_3_index_tensor(mo_num,three_body_3_index_exch_12,name_file)
|
||||
else
|
||||
provide x_W_ij_erf_rk
|
||||
@ -95,10 +95,10 @@ BEGIN_PROVIDER [ double precision, three_body_3_index_exch_12, (mo_num, mo_num,
|
||||
endif
|
||||
call wall_time(wall1)
|
||||
print*,'wall time for three_body_3_index_exch_12',wall1 - wall0
|
||||
if(write_three_body_ints)then
|
||||
if(write_ortho_three_e_ints)then
|
||||
print*,'Writing three_body_3_index_exch_12 on disk ...'
|
||||
call write_array_3_index_tensor(mo_num,three_body_3_index_exch_12,name_file)
|
||||
call ezfio_set_three_body_ints_io_three_body_ints("Read")
|
||||
call ezfio_set_ortho_three_e_ints_io_ortho_three_e_ints("Read")
|
||||
endif
|
||||
END_PROVIDER
|
||||
|
||||
@ -117,8 +117,8 @@ BEGIN_PROVIDER [ double precision, three_body_3_index_exch_23, (mo_num, mo_num,
|
||||
print*,'Providing the three_body_3_index_exch_23 ...'
|
||||
call wall_time(wall0)
|
||||
name_file = 'three_body_3_index_exch_23'
|
||||
if(read_three_body_ints)then
|
||||
print*,'Reading three_body_ints from disk ...'
|
||||
if(read_ortho_three_e_ints)then
|
||||
print*,'Reading ortho_three_e_ints from disk ...'
|
||||
call read_array_3_index_tensor(mo_num,three_body_3_index_exch_23,name_file)
|
||||
else
|
||||
provide x_W_ij_erf_rk
|
||||
@ -145,10 +145,10 @@ BEGIN_PROVIDER [ double precision, three_body_3_index_exch_23, (mo_num, mo_num,
|
||||
call wall_time(wall1)
|
||||
endif
|
||||
print*,'wall time for three_body_3_index_exch_23',wall1 - wall0
|
||||
if(write_three_body_ints)then
|
||||
if(write_ortho_three_e_ints)then
|
||||
print*,'Writing three_body_3_index_exch_23 on disk ...'
|
||||
call write_array_3_index_tensor(mo_num,three_body_3_index_exch_23,name_file)
|
||||
call ezfio_set_three_body_ints_io_three_body_ints("Read")
|
||||
call ezfio_set_ortho_three_e_ints_io_ortho_three_e_ints("Read")
|
||||
endif
|
||||
|
||||
END_PROVIDER
|
||||
@ -168,8 +168,8 @@ BEGIN_PROVIDER [ double precision, three_body_3_index_exch_13, (mo_num, mo_num,
|
||||
print*,'Providing the three_body_3_index_exch_13 ...'
|
||||
call wall_time(wall0)
|
||||
name_file = 'three_body_3_index_exch_13'
|
||||
if(read_three_body_ints)then
|
||||
print*,'Reading three_body_ints from disk ...'
|
||||
if(read_ortho_three_e_ints)then
|
||||
print*,'Reading ortho_three_e_ints from disk ...'
|
||||
call read_array_3_index_tensor(mo_num,three_body_3_index_exch_13,name_file)
|
||||
else
|
||||
provide x_W_ij_erf_rk
|
||||
@ -197,10 +197,10 @@ BEGIN_PROVIDER [ double precision, three_body_3_index_exch_13, (mo_num, mo_num,
|
||||
|
||||
call wall_time(wall1)
|
||||
print*,'wall time for three_body_3_index_exch_13',wall1 - wall0
|
||||
if(write_three_body_ints)then
|
||||
if(write_ortho_three_e_ints)then
|
||||
print*,'Writing three_body_3_index_exch_13 on disk ...'
|
||||
call write_array_3_index_tensor(mo_num,three_body_3_index_exch_13,name_file)
|
||||
call ezfio_set_three_body_ints_io_three_body_ints("Read")
|
||||
call ezfio_set_ortho_three_e_ints_io_ortho_three_e_ints("Read")
|
||||
endif
|
||||
END_PROVIDER
|
||||
|
||||
@ -220,8 +220,8 @@ BEGIN_PROVIDER [ double precision, three_body_3_index_exch_231, (mo_num, mo_num,
|
||||
print*,'Providing the three_body_3_index_231 ...'
|
||||
call wall_time(wall0)
|
||||
name_file = 'three_body_3_index_exch_231'
|
||||
if(read_three_body_ints)then
|
||||
print*,'Reading three_body_ints from disk ...'
|
||||
if(read_ortho_three_e_ints)then
|
||||
print*,'Reading ortho_three_e_ints from disk ...'
|
||||
call read_array_3_index_tensor(mo_num,three_body_3_index_exch_231,name_file)
|
||||
else
|
||||
provide x_W_ij_erf_rk
|
||||
@ -249,10 +249,10 @@ BEGIN_PROVIDER [ double precision, three_body_3_index_exch_231, (mo_num, mo_num,
|
||||
call wall_time(wall1)
|
||||
print*,'wall time for three_body_3_index_exch_231 ',wall1 - wall0
|
||||
|
||||
if(write_three_body_ints)then
|
||||
if(write_ortho_three_e_ints)then
|
||||
print*,'Writing three_body_3_index_exch_231 on disk ...'
|
||||
call write_array_3_index_tensor(mo_num,three_body_3_index_exch_231,name_file)
|
||||
call ezfio_set_three_body_ints_io_three_body_ints("Read")
|
||||
call ezfio_set_ortho_three_e_ints_io_ortho_three_e_ints("Read")
|
||||
endif
|
||||
|
||||
END_PROVIDER
|
||||
@ -272,8 +272,8 @@ BEGIN_PROVIDER [ double precision, three_body_3_index_exch_312, (mo_num, mo_num,
|
||||
print*,'Providing the three_body_3_index_312 ...'
|
||||
call wall_time(wall0)
|
||||
name_file = 'three_body_3_index_exch_312'
|
||||
if(read_three_body_ints)then
|
||||
print*,'Reading three_body_ints from disk ...'
|
||||
if(read_ortho_three_e_ints)then
|
||||
print*,'Reading ortho_three_e_ints from disk ...'
|
||||
call read_array_3_index_tensor(mo_num,three_body_3_index_exch_312,name_file)
|
||||
else
|
||||
provide x_W_ij_erf_rk
|
||||
@ -300,10 +300,10 @@ BEGIN_PROVIDER [ double precision, three_body_3_index_exch_312, (mo_num, mo_num,
|
||||
endif
|
||||
call wall_time(wall1)
|
||||
print*,'wall time for three_body_3_index_312',wall1 - wall0
|
||||
if(write_three_body_ints)then
|
||||
if(write_ortho_three_e_ints)then
|
||||
print*,'Writing three_body_3_index_exch_312 on disk ...'
|
||||
call write_array_3_index_tensor(mo_num,three_body_3_index_exch_312,name_file)
|
||||
call ezfio_set_three_body_ints_io_three_body_ints("Read")
|
||||
call ezfio_set_ortho_three_e_ints_io_ortho_three_e_ints("Read")
|
||||
endif
|
||||
|
||||
END_PROVIDER
|
||||
|
@ -16,7 +16,7 @@ BEGIN_PROVIDER [ double precision, three_body_4_index, (mo_num, mo_num, mo_num,
|
||||
call wall_time(wall0)
|
||||
|
||||
name_file = 'three_body_4_index'
|
||||
if(read_three_body_ints)then
|
||||
if(read_ortho_three_e_ints)then
|
||||
print*,'Reading three_body_4_index from disk ...'
|
||||
call read_array_4_index_tensor(mo_num,three_body_4_index,name_file)
|
||||
else
|
||||
@ -44,10 +44,10 @@ BEGIN_PROVIDER [ double precision, three_body_4_index, (mo_num, mo_num, mo_num,
|
||||
endif
|
||||
call wall_time(wall1)
|
||||
print*,'wall time for three_body_4_index',wall1 - wall0
|
||||
if(write_three_body_ints)then
|
||||
if(write_ortho_three_e_ints)then
|
||||
print*,'Writing three_body_4_index on disk ...'
|
||||
call write_array_4_index_tensor(mo_num,three_body_4_index,name_file)
|
||||
call ezfio_set_three_body_ints_io_three_body_ints("Read")
|
||||
call ezfio_set_ortho_three_e_ints_io_ortho_three_e_ints("Read")
|
||||
endif
|
||||
|
||||
END_PROVIDER
|
||||
@ -69,7 +69,7 @@ BEGIN_PROVIDER [ double precision, three_body_4_index_exch_12, (mo_num, mo_num,
|
||||
call wall_time(wall0)
|
||||
|
||||
name_file = 'three_body_4_index_exch_12'
|
||||
if(read_three_body_ints)then
|
||||
if(read_ortho_three_e_ints)then
|
||||
print*,'Reading three_body_4_index_exch_12 from disk ...'
|
||||
call read_array_4_index_tensor(mo_num,three_body_4_index_exch_12,name_file)
|
||||
else
|
||||
@ -98,10 +98,10 @@ BEGIN_PROVIDER [ double precision, three_body_4_index_exch_12, (mo_num, mo_num,
|
||||
call wall_time(wall1)
|
||||
print*,'wall time for three_body_4_index_exch_12',wall1 - wall0
|
||||
|
||||
if(write_three_body_ints)then
|
||||
if(write_ortho_three_e_ints)then
|
||||
print*,'Writing three_body_4_index_exch_12 on disk ...'
|
||||
call write_array_4_index_tensor(mo_num,three_body_4_index_exch_12,name_file)
|
||||
call ezfio_set_three_body_ints_io_three_body_ints("Read")
|
||||
call ezfio_set_ortho_three_e_ints_io_ortho_three_e_ints("Read")
|
||||
endif
|
||||
|
||||
END_PROVIDER
|
||||
@ -123,7 +123,7 @@ BEGIN_PROVIDER [ double precision, three_body_4_index_exch_12_part, (mo_num, mo_
|
||||
call wall_time(wall0)
|
||||
|
||||
name_file = 'three_body_4_index_exch_12_part'
|
||||
if(read_three_body_ints)then
|
||||
if(read_ortho_three_e_ints)then
|
||||
print*,'Reading three_body_4_index_exch_12_part from disk ...'
|
||||
call read_array_4_index_tensor(mo_num,three_body_4_index_exch_12_part,name_file)
|
||||
else
|
||||
@ -150,10 +150,10 @@ BEGIN_PROVIDER [ double precision, three_body_4_index_exch_12_part, (mo_num, mo_
|
||||
call wall_time(wall1)
|
||||
endif
|
||||
print*,'wall time for three_body_4_index_exch_12_part',wall1 - wall0
|
||||
if(write_three_body_ints)then
|
||||
if(write_ortho_three_e_ints)then
|
||||
print*,'Writing three_body_4_index_exch_12_part on disk ...'
|
||||
call write_array_4_index_tensor(mo_num,three_body_4_index_exch_12_part,name_file)
|
||||
call ezfio_set_three_body_ints_io_three_body_ints("Read")
|
||||
call ezfio_set_ortho_three_e_ints_io_ortho_three_e_ints("Read")
|
||||
endif
|
||||
|
||||
END_PROVIDER
|
||||
@ -175,7 +175,7 @@ BEGIN_PROVIDER [ double precision, three_body_4_index_exch_12_part_bis, (mo_num,
|
||||
call wall_time(wall0)
|
||||
|
||||
name_file = 'three_body_4_index_exch_12_part_bis'
|
||||
if(read_three_body_ints)then
|
||||
if(read_ortho_three_e_ints)then
|
||||
print*,'Reading three_body_4_index_exch_12_part_bisfrom disk ...'
|
||||
call read_array_4_index_tensor(mo_num,three_body_4_index_exch_12_part_bis,name_file)
|
||||
else
|
||||
@ -204,10 +204,10 @@ BEGIN_PROVIDER [ double precision, three_body_4_index_exch_12_part_bis, (mo_num,
|
||||
endif
|
||||
call wall_time(wall1)
|
||||
print*,'wall time for three_body_4_index_exch_12_part_bis',wall1 - wall0
|
||||
if(write_three_body_ints)then
|
||||
if(write_ortho_three_e_ints)then
|
||||
print*,'Writing three_body_4_index_exch_12_part_bis on disk ...'
|
||||
call write_array_4_index_tensor(mo_num,three_body_4_index_exch_12_part_bis,name_file)
|
||||
call ezfio_set_three_body_ints_io_three_body_ints("Read")
|
||||
call ezfio_set_ortho_three_e_ints_io_ortho_three_e_ints("Read")
|
||||
endif
|
||||
|
||||
END_PROVIDER
|
||||
@ -229,7 +229,7 @@ BEGIN_PROVIDER [ double precision, three_body_4_index_exch_231, (mo_num, mo_num,
|
||||
print*,'Providing the three_body_4_index_exch_231 ...'
|
||||
call wall_time(wall0)
|
||||
name_file = 'three_body_4_index_exch_231'
|
||||
if(read_three_body_ints)then
|
||||
if(read_ortho_three_e_ints)then
|
||||
print*,'Reading three_body_4_index_exch_231 from disk ...'
|
||||
call read_array_4_index_tensor(mo_num,three_body_4_index_exch_231,name_file)
|
||||
else
|
||||
@ -257,10 +257,10 @@ BEGIN_PROVIDER [ double precision, three_body_4_index_exch_231, (mo_num, mo_num,
|
||||
endif
|
||||
call wall_time(wall1)
|
||||
print*,'wall time for three_body_4_index_exch_231',wall1 - wall0
|
||||
if(write_three_body_ints)then
|
||||
if(write_ortho_three_e_ints)then
|
||||
print*,'Writing three_body_4_index_exch_231 on disk ...'
|
||||
call write_array_4_index_tensor(mo_num,three_body_4_index_exch_231,name_file)
|
||||
call ezfio_set_three_body_ints_io_three_body_ints("Read")
|
||||
call ezfio_set_ortho_three_e_ints_io_ortho_three_e_ints("Read")
|
||||
endif
|
||||
|
||||
END_PROVIDER
|
||||
@ -281,7 +281,7 @@ BEGIN_PROVIDER [ double precision, three_body_4_index_exch_312, (mo_num, mo_num,
|
||||
print*,'Providing the three_body_4_index_exch_312 ...'
|
||||
call wall_time(wall0)
|
||||
name_file = 'three_body_4_index_exch_312'
|
||||
if(read_three_body_ints)then
|
||||
if(read_ortho_three_e_ints)then
|
||||
print*,'Reading three_body_4_index_exch_312 from disk ...'
|
||||
call read_array_4_index_tensor(mo_num,three_body_4_index_exch_312,name_file)
|
||||
else
|
||||
@ -309,10 +309,10 @@ BEGIN_PROVIDER [ double precision, three_body_4_index_exch_312, (mo_num, mo_num,
|
||||
endif
|
||||
call wall_time(wall1)
|
||||
print*,'wall time for three_body_4_index_exch_312',wall1 - wall0
|
||||
if(write_three_body_ints)then
|
||||
if(write_ortho_three_e_ints)then
|
||||
print*,'Writing three_body_4_index_exch_312 on disk ...'
|
||||
call write_array_4_index_tensor(mo_num,three_body_4_index_exch_312,name_file)
|
||||
call ezfio_set_three_body_ints_io_three_body_ints("Read")
|
||||
call ezfio_set_ortho_three_e_ints_io_ortho_three_e_ints("Read")
|
||||
endif
|
||||
|
||||
END_PROVIDER
|
||||
|
@ -15,7 +15,7 @@ BEGIN_PROVIDER [ double precision, three_body_5_index, (mo_num, mo_num, mo_num,
|
||||
print*,'Providing the three_body_5_index ...'
|
||||
name_file = 'three_body_5_index'
|
||||
call wall_time(wall0)
|
||||
if(read_three_body_ints)then
|
||||
if(read_ortho_three_e_ints)then
|
||||
print*,'Reading three_body_5_index from disk ...'
|
||||
call read_array_5_index_tensor(mo_num,three_body_5_index,name_file)
|
||||
else
|
||||
@ -49,10 +49,10 @@ BEGIN_PROVIDER [ double precision, three_body_5_index, (mo_num, mo_num, mo_num,
|
||||
endif
|
||||
call wall_time(wall1)
|
||||
print*,'wall time for three_body_5_index',wall1 - wall0
|
||||
if(write_three_body_ints)then
|
||||
if(write_ortho_three_e_ints)then
|
||||
print*,'Writing three_body_5_index on disk ...'
|
||||
call write_array_5_index_tensor(mo_num,three_body_5_index,name_file)
|
||||
call ezfio_set_three_body_ints_io_three_body_ints("Read")
|
||||
call ezfio_set_ortho_three_e_ints_io_ortho_three_e_ints("Read")
|
||||
endif
|
||||
! do n = 1, mo_num
|
||||
! do l = 1, mo_num
|
||||
@ -87,7 +87,7 @@ BEGIN_PROVIDER [ double precision, three_body_5_index_exch_13, (mo_num, mo_num,
|
||||
name_file = 'three_body_5_index_exch_13'
|
||||
print*,'Providing the three_body_5_index_exch_13 ...'
|
||||
call wall_time(wall0)
|
||||
if(read_three_body_ints)then
|
||||
if(read_ortho_three_e_ints)then
|
||||
print*,'Reading three_body_5_index_exch_13 from disk ...'
|
||||
call read_array_5_index_tensor(mo_num,three_body_5_index_exch_13,name_file)
|
||||
else
|
||||
@ -120,10 +120,10 @@ BEGIN_PROVIDER [ double precision, three_body_5_index_exch_13, (mo_num, mo_num,
|
||||
endif
|
||||
call wall_time(wall1)
|
||||
print*,'wall time for three_body_5_index_exch_13',wall1 - wall0
|
||||
if(write_three_body_ints)then
|
||||
if(write_ortho_three_e_ints)then
|
||||
print*,'Writing three_body_5_index_exch_13 on disk ...'
|
||||
call write_array_5_index_tensor(mo_num,three_body_5_index_exch_13,name_file)
|
||||
call ezfio_set_three_body_ints_io_three_body_ints("Read")
|
||||
call ezfio_set_ortho_three_e_ints_io_ortho_three_e_ints("Read")
|
||||
endif
|
||||
! do n = 1, mo_num
|
||||
! do l = 1, mo_num
|
||||
@ -157,7 +157,7 @@ BEGIN_PROVIDER [ double precision, three_body_5_index_exch_32, (mo_num, mo_num,
|
||||
print*,'Providing the three_body_5_index_exch_32 ...'
|
||||
call wall_time(wall0)
|
||||
|
||||
if(read_three_body_ints)then
|
||||
if(read_ortho_three_e_ints)then
|
||||
print*,'Reading three_body_5_index_exch_32 from disk ...'
|
||||
call read_array_5_index_tensor(mo_num,three_body_5_index_exch_32,name_file)
|
||||
else
|
||||
@ -191,10 +191,10 @@ BEGIN_PROVIDER [ double precision, three_body_5_index_exch_32, (mo_num, mo_num,
|
||||
endif
|
||||
call wall_time(wall1)
|
||||
print*,'wall time for three_body_5_index_exch_32',wall1 - wall0
|
||||
if(write_three_body_ints)then
|
||||
if(write_ortho_three_e_ints)then
|
||||
print*,'Writing three_body_5_index_exch_32 on disk ...'
|
||||
call write_array_5_index_tensor(mo_num,three_body_5_index_exch_32,name_file)
|
||||
call ezfio_set_three_body_ints_io_three_body_ints("Read")
|
||||
call ezfio_set_ortho_three_e_ints_io_ortho_three_e_ints("Read")
|
||||
endif
|
||||
! do n = 1, mo_num
|
||||
! do l = 1, mo_num
|
||||
@ -228,7 +228,7 @@ BEGIN_PROVIDER [ double precision, three_body_5_index_exch_12, (mo_num, mo_num,
|
||||
print*,'Providing the three_body_5_index_exch_12 ...'
|
||||
call wall_time(wall0)
|
||||
|
||||
if(read_three_body_ints)then
|
||||
if(read_ortho_three_e_ints)then
|
||||
print*,'Reading three_body_5_index_exch_12 from disk ...'
|
||||
call read_array_5_index_tensor(mo_num,three_body_5_index_exch_12,name_file)
|
||||
else
|
||||
@ -273,10 +273,10 @@ BEGIN_PROVIDER [ double precision, three_body_5_index_exch_12, (mo_num, mo_num,
|
||||
! enddo
|
||||
! enddo
|
||||
! enddo
|
||||
if(write_three_body_ints)then
|
||||
if(write_ortho_three_e_ints)then
|
||||
print*,'Writing three_body_5_index_exch_12 on disk ...'
|
||||
call write_array_5_index_tensor(mo_num,three_body_5_index_exch_12,name_file)
|
||||
call ezfio_set_three_body_ints_io_three_body_ints("Read")
|
||||
call ezfio_set_ortho_three_e_ints_io_ortho_three_e_ints("Read")
|
||||
endif
|
||||
|
||||
END_PROVIDER
|
||||
@ -300,7 +300,7 @@ BEGIN_PROVIDER [ double precision, three_body_5_index_312, (mo_num, mo_num, mo_n
|
||||
print*,'Providing the three_body_5_index_312 ...'
|
||||
call wall_time(wall0)
|
||||
|
||||
if(read_three_body_ints)then
|
||||
if(read_ortho_three_e_ints)then
|
||||
print*,'Reading three_body_5_index_312 from disk ...'
|
||||
call read_array_5_index_tensor(mo_num,three_body_5_index_312,name_file)
|
||||
else
|
||||
@ -345,10 +345,10 @@ BEGIN_PROVIDER [ double precision, three_body_5_index_312, (mo_num, mo_num, mo_n
|
||||
! enddo
|
||||
! enddo
|
||||
! enddo
|
||||
if(write_three_body_ints)then
|
||||
if(write_ortho_three_e_ints)then
|
||||
print*,'Writing three_body_5_index_312 on disk ...'
|
||||
call write_array_5_index_tensor(mo_num,three_body_5_index_312,name_file)
|
||||
call ezfio_set_three_body_ints_io_three_body_ints("Read")
|
||||
call ezfio_set_ortho_three_e_ints_io_ortho_three_e_ints("Read")
|
||||
endif
|
||||
|
||||
END_PROVIDER
|
||||
@ -370,7 +370,7 @@ BEGIN_PROVIDER [ double precision, three_body_5_index_132, (mo_num, mo_num, mo_n
|
||||
print*,'Providing the three_body_5_index_132 ...'
|
||||
call wall_time(wall0)
|
||||
|
||||
if(read_three_body_ints)then
|
||||
if(read_ortho_three_e_ints)then
|
||||
print*,'Reading three_body_5_index_132 from disk ...'
|
||||
call read_array_5_index_tensor(mo_num,three_body_5_index_132,name_file)
|
||||
else
|
||||
@ -415,10 +415,10 @@ BEGIN_PROVIDER [ double precision, three_body_5_index_132, (mo_num, mo_num, mo_n
|
||||
! enddo
|
||||
! enddo
|
||||
! enddo
|
||||
if(write_three_body_ints)then
|
||||
if(write_ortho_three_e_ints)then
|
||||
print*,'Writing three_body_5_index_132 on disk ...'
|
||||
call write_array_5_index_tensor(mo_num,three_body_5_index_132,name_file)
|
||||
call ezfio_set_three_body_ints_io_three_body_ints("Read")
|
||||
call ezfio_set_ortho_three_e_ints_io_ortho_three_e_ints("Read")
|
||||
endif
|
||||
|
||||
END_PROVIDER
|
||||
|
@ -7,9 +7,9 @@ source $QP_ROOT/quantum_package.rc
|
||||
function run_Ne() {
|
||||
qp set_file Ne_tc_scf
|
||||
qp run cisd
|
||||
qp run tc_bi_ortho | tee Ne.ezfio.cisd_tc_bi_ortho.out
|
||||
qp run tc_bi_ortho | tee Ne_tc_scf.cisd_tc_bi_ortho.out
|
||||
eref=-128.77020441279302
|
||||
energy="$(grep "eigval_right_tc_bi_orth =" Ne.ezfio.cisd_tc_bi_ortho.out)"
|
||||
energy="$(grep "eigval_right_tc_bi_orth =" Ne_tc_scf.cisd_tc_bi_ortho.out)"
|
||||
eq $energy $eref 1e-6
|
||||
}
|
||||
|
||||
@ -18,3 +18,32 @@ function run_Ne() {
|
||||
run_Ne
|
||||
}
|
||||
|
||||
|
||||
function run_C() {
|
||||
qp set_file C_tc_scf
|
||||
qp run cisd
|
||||
qp run tc_bi_ortho | tee C_tc_scf.cisd_tc_bi_ortho.out
|
||||
eref=-37.757536149952514
|
||||
energy="$(grep "eigval_right_tc_bi_orth =" C_tc_scf.cisd_tc_bi_ortho.out)"
|
||||
eq $energy $eref 1e-6
|
||||
}
|
||||
|
||||
|
||||
@test "C" {
|
||||
run_C
|
||||
}
|
||||
|
||||
function run_O() {
|
||||
qp set_file C_tc_scf
|
||||
qp run cisd
|
||||
qp run tc_bi_ortho | tee O_tc_scf.cisd_tc_bi_ortho.out
|
||||
eref=-74.908518517716161
|
||||
energy="$(grep "eigval_right_tc_bi_orth =" O_tc_scf.cisd_tc_bi_ortho.out)"
|
||||
eq $energy $eref 1e-6
|
||||
}
|
||||
|
||||
|
||||
@test "O" {
|
||||
run_O
|
||||
}
|
||||
|
||||
|
@ -9,11 +9,13 @@ function run_Ne() {
|
||||
echo Ne > Ne.xyz
|
||||
qp create_ezfio -b cc-pcvdz Ne.xyz -o Ne_tc_scf
|
||||
qp run scf
|
||||
|
||||
qp set ao_two_e_erf_ints mu_erf 0.87
|
||||
qp set tc_keywords j1b_type 3
|
||||
qp set tc_keywords j1b_pen [1.5]
|
||||
qp set tc_keywords bi_ortho True
|
||||
qp set tc_keywords test_cycle_tc True
|
||||
qp set ao_two_e_erf_ints mu_erf 0.87
|
||||
qp set tc_keywords j1b_pen [1.5]
|
||||
qp set tc_keywords j1b_type 3
|
||||
|
||||
qp run tc_scf | tee ${EZFIO_FILE}.tc_scf.out
|
||||
eref=-128.552134
|
||||
energy="$(qp get tc_scf bitc_energy)"
|
||||
@ -25,3 +27,75 @@ function run_Ne() {
|
||||
run_Ne
|
||||
}
|
||||
|
||||
function run_C() {
|
||||
rm -rf C_tc_scf
|
||||
echo C > C.xyz
|
||||
qp create_ezfio -b cc-pcvdz C.xyz -o C_tc_scf -m 3
|
||||
qp run scf
|
||||
|
||||
qp set ao_two_e_erf_ints mu_erf 0.87
|
||||
qp set tc_keywords j1b_type 3
|
||||
qp set tc_keywords j1b_pen [1.5]
|
||||
qp set tc_keywords bi_ortho True
|
||||
qp set tc_keywords test_cycle_tc True
|
||||
|
||||
qp run tc_scf | tee ${EZFIO_FILE}.tc_scf.out
|
||||
eref=-37.691254356408791
|
||||
energy="$(qp get tc_scf bitc_energy)"
|
||||
eq $energy $eref 1e-6
|
||||
}
|
||||
|
||||
|
||||
@test "C" {
|
||||
run_C
|
||||
}
|
||||
|
||||
|
||||
function run_O() {
|
||||
rm -rf O_tc_scf
|
||||
echo O > O.xyz
|
||||
qp create_ezfio -b cc-pcvdz O.xyz -o O_tc_scf -m 3
|
||||
qp run scf
|
||||
|
||||
qp set ao_two_e_erf_ints mu_erf 0.87
|
||||
qp set tc_keywords j1b_type 3
|
||||
qp set tc_keywords j1b_pen [1.5]
|
||||
qp set tc_keywords bi_ortho True
|
||||
qp set tc_keywords test_cycle_tc True
|
||||
|
||||
qp run tc_scf | tee ${EZFIO_FILE}.tc_scf.out
|
||||
eref=-74.814687229354590
|
||||
energy="$(qp get tc_scf bitc_energy)"
|
||||
eq $energy $eref 1e-6
|
||||
}
|
||||
|
||||
|
||||
@test "O" {
|
||||
run_O
|
||||
}
|
||||
|
||||
|
||||
|
||||
function run_ch2() {
|
||||
rm -rf ch2_tc_scf
|
||||
cp ${QP_ROOT}/tests/input/ch2.xyz .
|
||||
qp create_ezfio -b "C:cc-pcvdz|H:cc-pvdz" ch2.xyz -o ch2_tc_scf
|
||||
qp run scf
|
||||
|
||||
qp set ao_two_e_erf_ints mu_erf 0.87
|
||||
qp set tc_keywords j1b_type 3
|
||||
qp set tc_keywords j1b_pen '[1.5,10000,10000]'
|
||||
qp set tc_keywords bi_ortho True
|
||||
qp set tc_keywords test_cycle_tc True
|
||||
|
||||
qp run tc_scf | tee ${EZFIO_FILE}.tc_scf.out
|
||||
eref=-38.903247818077737
|
||||
energy="$(qp get tc_scf bitc_energy)"
|
||||
eq $energy $eref 1e-6
|
||||
}
|
||||
|
||||
|
||||
@test "ch2" {
|
||||
run_ch2
|
||||
}
|
||||
|
||||
|
5
tests/input/ch2.xyz
Normal file
5
tests/input/ch2.xyz
Normal file
@ -0,0 +1,5 @@
|
||||
3
|
||||
|
||||
C 6.000000 0.000000 0.000000 0.173480
|
||||
H 1.000000 0.000000 -0.861500 -0.520430
|
||||
H 1.000000 0.000000 0.861500 -0.520430
|
Loading…
Reference in New Issue
Block a user