mirror of
https://github.com/QuantumPackage/qp2.git
synced 2024-08-25 05:31:48 +02:00
AOs deb
This commit is contained in:
parent
8534b5c104
commit
ba73d91fd3
@ -1,11 +1,13 @@
|
||||
|
||||
! ---
|
||||
|
||||
BEGIN_PROVIDER [ double precision, env_expo , (nucl_num) ]
|
||||
&BEGIN_PROVIDER [ double precision, env_coef, (nucl_num) ]
|
||||
BEGIN_PROVIDER [double precision, env_expo, (nucl_num)]
|
||||
&BEGIN_PROVIDER [double precision, env_coef, (nucl_num)]
|
||||
|
||||
BEGIN_DOC
|
||||
! parameters of the 1-body Jastrow
|
||||
!
|
||||
! parameters of the env of the 2e-Jastrow
|
||||
!
|
||||
END_DOC
|
||||
|
||||
implicit none
|
||||
|
56
plugins/local/non_h_ints_mu/deb_aos.irp.f
Normal file
56
plugins/local/non_h_ints_mu/deb_aos.irp.f
Normal file
@ -0,0 +1,56 @@
|
||||
|
||||
! ---
|
||||
|
||||
program deb_Aos
|
||||
|
||||
implicit none
|
||||
|
||||
my_grid_becke = .True.
|
||||
PROVIDE tc_grid1_a tc_grid1_r
|
||||
my_n_pt_r_grid = tc_grid1_r
|
||||
my_n_pt_a_grid = tc_grid1_a
|
||||
touch my_grid_becke my_n_pt_r_grid my_n_pt_a_grid
|
||||
|
||||
if(tc_integ_type .eq. "numeric") then
|
||||
my_extra_grid_becke = .True.
|
||||
PROVIDE tc_grid2_a tc_grid2_r
|
||||
my_n_pt_r_extra_grid = tc_grid2_r
|
||||
my_n_pt_a_extra_grid = tc_grid2_a
|
||||
touch my_extra_grid_becke my_n_pt_r_extra_grid my_n_pt_a_extra_grid
|
||||
endif
|
||||
|
||||
call print_aos()
|
||||
|
||||
end
|
||||
|
||||
! ---
|
||||
|
||||
subroutine print_aos()
|
||||
|
||||
implicit none
|
||||
integer :: i, ipoint
|
||||
double precision :: r(3)
|
||||
double precision :: ao_val, ao_der(3), ao_lap
|
||||
|
||||
PROVIDE final_grid_points aos_in_r_array aos_grad_in_r_array aos_lapl_in_r_array
|
||||
|
||||
do ipoint = 1, n_points_final_grid
|
||||
r(:) = final_grid_points(:,ipoint)
|
||||
print*, r
|
||||
enddo
|
||||
|
||||
do ipoint = 1, n_points_final_grid
|
||||
r(:) = final_grid_points(:,ipoint)
|
||||
do i = 1, ao_num
|
||||
ao_val = aos_in_r_array (i,ipoint)
|
||||
ao_der(:) = aos_grad_in_r_array(i,ipoint,:)
|
||||
ao_lap = aos_lapl_in_r_array(1,i,ipoint) + aos_lapl_in_r_array(2,i,ipoint) + aos_lapl_in_r_array(3,i,ipoint)
|
||||
write(*, '(5(f15.7, 3X))') ao_val, ao_der, ao_lap
|
||||
enddo
|
||||
enddo
|
||||
|
||||
return
|
||||
end
|
||||
|
||||
! ---
|
||||
|
@ -71,6 +71,8 @@ END_PROVIDER
|
||||
|
||||
implicit none
|
||||
integer :: ipoint, i, j, p
|
||||
integer :: ierr
|
||||
logical :: exists
|
||||
double precision :: x, y, z, dx, dy, dz, d2
|
||||
double precision :: a, c, g, tmp_x, tmp_y, tmp_z
|
||||
double precision :: time0, time1
|
||||
@ -116,15 +118,15 @@ END_PROVIDER
|
||||
a = j1e_expo(p,j)
|
||||
g = c * a * dexp(-a*d2)
|
||||
|
||||
tmp_x = tmp_x - g * dx
|
||||
tmp_y = tmp_y - g * dy
|
||||
tmp_z = tmp_z - g * dz
|
||||
tmp_x = tmp_x + g * dx
|
||||
tmp_y = tmp_y + g * dy
|
||||
tmp_z = tmp_z + g * dz
|
||||
enddo
|
||||
enddo
|
||||
|
||||
j1e_gradx(ipoint) = 2.d0 * tmp_x
|
||||
j1e_grady(ipoint) = 2.d0 * tmp_y
|
||||
j1e_gradz(ipoint) = 2.d0 * tmp_z
|
||||
j1e_gradx(ipoint) = -2.d0 * tmp_x
|
||||
j1e_grady(ipoint) = -2.d0 * tmp_y
|
||||
j1e_gradz(ipoint) = -2.d0 * tmp_z
|
||||
enddo
|
||||
|
||||
elseif(j1e_type .eq. "Charge_Harmonizer") then
|
||||
@ -173,9 +175,39 @@ END_PROVIDER
|
||||
|
||||
allocate(coef_fit(ao_num))
|
||||
|
||||
if(mpi_master) then
|
||||
call ezfio_has_jastrow_j1e_coef_ao(exists)
|
||||
endif
|
||||
IRP_IF MPI_DEBUG
|
||||
print *, irp_here, mpi_rank
|
||||
call MPI_BARRIER(MPI_COMM_WORLD, ierr)
|
||||
IRP_ENDIF
|
||||
IRP_IF MPI
|
||||
include 'mpif.h'
|
||||
call MPI_BCAST(coef_fit, ao_num, MPI_DOUBLE_PRECISION, 0, MPI_COMM_WORLD, ierr)
|
||||
if (ierr /= MPI_SUCCESS) then
|
||||
stop 'Unable to read j1e_coef_ao with MPI'
|
||||
endif
|
||||
IRP_ENDIF
|
||||
if(exists) then
|
||||
if(mpi_master) then
|
||||
write(6,'(A)') '.. >>>>> [ IO READ: j1e_coef_ao ] <<<<< ..'
|
||||
call ezfio_get_jastrow_j1e_coef_ao(coef_fit)
|
||||
IRP_IF MPI
|
||||
call MPI_BCAST(coef_fit, ao_num, MPI_DOUBLE_PRECISION, 0, MPI_COMM_WORLD, ierr)
|
||||
if (ierr /= MPI_SUCCESS) then
|
||||
stop 'Unable to read j1e_coef_ao with MPI'
|
||||
endif
|
||||
IRP_ENDIF
|
||||
endif
|
||||
else
|
||||
|
||||
call get_j1e_coef_fit_ao(ao_num, coef_fit)
|
||||
call ezfio_set_jastrow_j1e_coef_ao(coef_fit)
|
||||
|
||||
endif
|
||||
|
||||
|
||||
!$OMP PARALLEL &
|
||||
!$OMP DEFAULT (NONE) &
|
||||
!$OMP PRIVATE (i, ipoint, c) &
|
||||
|
@ -9,16 +9,21 @@ subroutine get_j1e_coef_fit_ao(dim_fit, coef_fit)
|
||||
|
||||
integer :: i, ipoint
|
||||
double precision :: g
|
||||
double precision :: t0, t1
|
||||
double precision, allocatable :: A(:,:), b(:), A_inv(:,:)
|
||||
double precision, allocatable :: Pa(:,:), Pb(:,:), Pt(:,:)
|
||||
double precision, allocatable :: u1e_tmp(:)
|
||||
|
||||
|
||||
PROVIDE j1e_type
|
||||
PROVIDE int2_u2e_ao
|
||||
PROVIDE elec_alpha_num elec_beta_num elec_num
|
||||
PROVIDE mo_coef
|
||||
PROVIDE ao_overlap
|
||||
|
||||
call wall_time(t0)
|
||||
print*, ' PROVIDING the representation of 1e-Jastrow in AOs ... '
|
||||
|
||||
! --- --- ---
|
||||
! get u1e(r)
|
||||
|
||||
@ -94,6 +99,9 @@ subroutine get_j1e_coef_fit_ao(dim_fit, coef_fit)
|
||||
|
||||
deallocate(A_inv, b)
|
||||
|
||||
call wall_time(t1)
|
||||
print*, ' END after (min) ', (t1-t0)/60.d0
|
||||
|
||||
return
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user