mirror of
https://github.com/QuantumPackage/qp2.git
synced 2024-12-21 11:03:29 +01:00
Merge branch 'dev-stable' of https://github.com/QuantumPackage/qp2 into dev-stable
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
commit
dbd0f16307
@ -121,8 +121,11 @@
|
||||
double precision :: f
|
||||
f = 1.d0 / dble(elec_num - 1)
|
||||
|
||||
integer*8 :: n_points, k
|
||||
n_points = n_points_extra_final_grid * n_points_final_grid
|
||||
integer*8 :: n_points, n_points_max, k
|
||||
integer :: ipoint_block, ipoint_end
|
||||
|
||||
n_points_max = n_points_extra_final_grid * n_points_final_grid
|
||||
n_points = 100_8*n_points_extra_final_grid
|
||||
|
||||
double precision, allocatable :: rij(:,:,:)
|
||||
allocate( rij(3, 2, n_points) )
|
||||
@ -131,92 +134,96 @@
|
||||
integer(qmckl_exit_code) :: rc
|
||||
|
||||
double precision, allocatable :: gl(:,:,:)
|
||||
|
||||
allocate( gl(2,4,n_points) )
|
||||
|
||||
k=0
|
||||
do ipoint = 1, n_points_final_grid ! r1
|
||||
do jpoint = 1, n_points_extra_final_grid ! r2
|
||||
k=k+1
|
||||
rij(1:3, 1, k) = final_grid_points (1:3, ipoint)
|
||||
rij(1:3, 2, k) = final_grid_points_extra(1:3, jpoint)
|
||||
do ipoint_block = 1, n_points_final_grid, 100 ! r1
|
||||
ipoint_end = min(n_points_final_grid, ipoint_block+100)
|
||||
|
||||
k=0
|
||||
do ipoint = ipoint_block, ipoint_end
|
||||
do jpoint = 1, n_points_extra_final_grid ! r2
|
||||
k=k+1
|
||||
rij(1:3, 1, k) = final_grid_points (1:3, ipoint)
|
||||
rij(1:3, 2, k) = final_grid_points_extra(1:3, jpoint)
|
||||
end do
|
||||
enddo
|
||||
enddo
|
||||
|
||||
rc = qmckl_set_electron_coord(qmckl_ctx_jastrow, 'N', n_points, rij, n_points*6_8)
|
||||
if (rc /= QMCKL_SUCCESS) then
|
||||
print *, irp_here, 'qmckl error in set_electron_coord'
|
||||
rc = qmckl_check(qmckl_ctx_jastrow, rc)
|
||||
stop -1
|
||||
endif
|
||||
|
||||
rc = qmckl_set_electron_coord(qmckl_ctx_jastrow, 'N', n_points, rij, n_points*6_8)
|
||||
if (rc /= QMCKL_SUCCESS) then
|
||||
print *, irp_here, 'qmckl error in set_electron_coord'
|
||||
rc = qmckl_check(qmckl_ctx_jastrow, rc)
|
||||
stop -1
|
||||
endif
|
||||
! ---
|
||||
! e-e term
|
||||
|
||||
rc = qmckl_get_jastrow_champ_factor_ee_gl(qmckl_ctx_jastrow, gl, 8_8*n_points)
|
||||
if (rc /= QMCKL_SUCCESS) then
|
||||
print *, irp_here, ' qmckl error in fact_ee_gl'
|
||||
rc = qmckl_check(qmckl_ctx_jastrow, rc)
|
||||
stop -1
|
||||
endif
|
||||
|
||||
! ---
|
||||
! e-e term
|
||||
|
||||
rc = qmckl_get_jastrow_champ_factor_ee_gl(qmckl_ctx_jastrow, gl, 8_8*n_points)
|
||||
if (rc /= QMCKL_SUCCESS) then
|
||||
print *, irp_here, ' qmckl error in fact_ee_gl'
|
||||
rc = qmckl_check(qmckl_ctx_jastrow, rc)
|
||||
stop -1
|
||||
endif
|
||||
|
||||
k=0
|
||||
do ipoint = 1, n_points_final_grid ! r1
|
||||
do jpoint = 1, n_points_extra_final_grid ! r2
|
||||
k=k+1
|
||||
grad1_u12_num(jpoint,ipoint,1) = gl(1,1,k)
|
||||
grad1_u12_num(jpoint,ipoint,2) = gl(1,2,k)
|
||||
grad1_u12_num(jpoint,ipoint,3) = gl(1,3,k)
|
||||
k=0
|
||||
do ipoint = ipoint_block, ipoint_end
|
||||
do jpoint = 1, n_points_extra_final_grid ! r2
|
||||
k=k+1
|
||||
grad1_u12_num(jpoint,ipoint,1) = gl(1,1,k)
|
||||
grad1_u12_num(jpoint,ipoint,2) = gl(1,2,k)
|
||||
grad1_u12_num(jpoint,ipoint,3) = gl(1,3,k)
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
|
||||
! ---
|
||||
! e-e-n term
|
||||
! ---
|
||||
! e-e-n term
|
||||
|
||||
! rc = qmckl_get_jastrow_champ_factor_een_gl(qmckl_ctx_jastrow, gl, 8_8*n_points)
|
||||
! if (rc /= QMCKL_SUCCESS) then
|
||||
! print *, irp_here, 'qmckl error in fact_een_gl'
|
||||
! rc = qmckl_check(qmckl_ctx_jastrow, rc)
|
||||
! stop -1
|
||||
! endif
|
||||
! rc = qmckl_get_jastrow_champ_factor_een_gl(qmckl_ctx_jastrow, gl, 8_8*n_points)
|
||||
! if (rc /= QMCKL_SUCCESS) then
|
||||
! print *, irp_here, 'qmckl error in fact_een_gl'
|
||||
! rc = qmckl_check(qmckl_ctx_jastrow, rc)
|
||||
! stop -1
|
||||
! endif
|
||||
!
|
||||
! k=0
|
||||
! do ipoint = 1, n_points_final_grid ! r1
|
||||
! do jpoint = 1, n_points_extra_final_grid ! r2
|
||||
! k=k+1
|
||||
! grad1_u12_num(jpoint,ipoint,1) = grad1_u12_num(jpoint,ipoint,1) + gl(1,1,k)
|
||||
! grad1_u12_num(jpoint,ipoint,2) = grad1_u12_num(jpoint,ipoint,2) + gl(1,2,k)
|
||||
! grad1_u12_num(jpoint,ipoint,3) = grad1_u12_num(jpoint,ipoint,3) + gl(1,3,k)
|
||||
! enddo
|
||||
! enddo
|
||||
! k=0
|
||||
! do ipoint = 1, n_points_final_grid ! r1
|
||||
! do jpoint = 1, n_points_extra_final_grid ! r2
|
||||
! k=k+1
|
||||
! grad1_u12_num(jpoint,ipoint,1) = grad1_u12_num(jpoint,ipoint,1) + gl(1,1,k)
|
||||
! grad1_u12_num(jpoint,ipoint,2) = grad1_u12_num(jpoint,ipoint,2) + gl(1,2,k)
|
||||
! grad1_u12_num(jpoint,ipoint,3) = grad1_u12_num(jpoint,ipoint,3) + gl(1,3,k)
|
||||
! enddo
|
||||
! enddo
|
||||
|
||||
! ---
|
||||
! e-n term
|
||||
|
||||
rc = qmckl_get_jastrow_champ_factor_en_gl(qmckl_ctx_jastrow, gl, 8_8*n_points)
|
||||
if (rc /= QMCKL_SUCCESS) then
|
||||
print *, irp_here, 'qmckl error in fact_en_gl'
|
||||
rc = qmckl_check(qmckl_ctx_jastrow, rc)
|
||||
stop -1
|
||||
endif
|
||||
rc = qmckl_get_jastrow_champ_factor_en_gl(qmckl_ctx_jastrow, gl, 8_8*n_points)
|
||||
if (rc /= QMCKL_SUCCESS) then
|
||||
print *, irp_here, 'qmckl error in fact_en_gl'
|
||||
rc = qmckl_check(qmckl_ctx_jastrow, rc)
|
||||
stop -1
|
||||
endif
|
||||
|
||||
k=0
|
||||
do ipoint = 1, n_points_final_grid ! r1
|
||||
do jpoint = 1, n_points_extra_final_grid ! r2
|
||||
k = k+1
|
||||
grad1_u12_num(jpoint,ipoint,1) = grad1_u12_num(jpoint,ipoint,1) + f * gl(1,1,k)
|
||||
grad1_u12_num(jpoint,ipoint,2) = grad1_u12_num(jpoint,ipoint,2) + f * gl(1,2,k)
|
||||
grad1_u12_num(jpoint,ipoint,3) = grad1_u12_num(jpoint,ipoint,3) + f * gl(1,3,k)
|
||||
k=0
|
||||
do ipoint = ipoint_block, ipoint_end ! r1
|
||||
do jpoint = 1, n_points_extra_final_grid ! r2
|
||||
k = k+1
|
||||
grad1_u12_num(jpoint,ipoint,1) = grad1_u12_num(jpoint,ipoint,1) + f * gl(1,1,k)
|
||||
grad1_u12_num(jpoint,ipoint,2) = grad1_u12_num(jpoint,ipoint,2) + f * gl(1,2,k)
|
||||
grad1_u12_num(jpoint,ipoint,3) = grad1_u12_num(jpoint,ipoint,3) + f * gl(1,3,k)
|
||||
|
||||
dx = grad1_u12_num(jpoint,ipoint,1)
|
||||
dy = grad1_u12_num(jpoint,ipoint,2)
|
||||
dz = grad1_u12_num(jpoint,ipoint,3)
|
||||
grad1_u12_squared_num(jpoint,ipoint) = dx*dx + dy*dy + dz*dz
|
||||
enddo
|
||||
enddo
|
||||
|
||||
do jpoint = 1, n_points_extra_final_grid ! r2
|
||||
dx = grad1_u12_num(jpoint,ipoint,1)
|
||||
dy = grad1_u12_num(jpoint,ipoint,2)
|
||||
dz = grad1_u12_num(jpoint,ipoint,3)
|
||||
grad1_u12_squared_num(jpoint,ipoint) = dx*dx + dy*dy + dz*dz
|
||||
enddo
|
||||
enddo
|
||||
enddo !ipoint_block
|
||||
|
||||
|
||||
|
||||
deallocate(gl, rij)
|
||||
|
||||
|
@ -6,11 +6,10 @@ BEGIN_PROVIDER [ integer*8, qmckl_ctx_jastrow ]
|
||||
! Context for the QMCKL library
|
||||
END_DOC
|
||||
integer(qmckl_exit_code) :: rc
|
||||
logical(c_bool) :: c_true = .True.
|
||||
|
||||
qmckl_ctx_jastrow = qmckl_context_create()
|
||||
|
||||
rc = qmckl_set_jastrow_champ_spin_independent(qmckl_ctx_jastrow, c_true)
|
||||
rc = qmckl_set_jastrow_champ_spin_independent(qmckl_ctx_jastrow, 1)
|
||||
rc = qmckl_check(qmckl_ctx_jastrow, rc)
|
||||
if (rc /= QMCKL_SUCCESS) stop -1
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user