1
0
mirror of https://github.com/TREX-CoE/qmckl.git synced 2025-04-30 04:15:00 +02:00

formatting

This commit is contained in:
Anthony Scemama 2025-04-18 14:38:40 +02:00
parent 39d3a59769
commit 84f748e613
2 changed files with 39 additions and 37 deletions

View File

@ -8229,7 +8229,7 @@ function qmckl_compute_ao_hessian_doc(context, &
e_coord(1) = coord(ipoint,1)
e_coord(2) = coord(ipoint,2)
e_coord(3) = coord(ipoint,3)
!ao_hessian(:,:,ipoint,:,:) = 0.d0
ao_hessian(:,:,ipoint,:) = 0.d0
do inucl=1,nucl_num
n_coord(1) = nucl_coord(inucl,1)
n_coord(2) = nucl_coord(inucl,2)
@ -8242,7 +8242,7 @@ function qmckl_compute_ao_hessian_doc(context, &
r2 = x*x + y*y + z*z
if (r2 > cutoff*nucleus_range(inucl)) then
!ao_hessian(:,:,ipoint,:,inucl) = 0.d0
!ao_hessian(:,:,ipoint,:) = 0.d0
cycle
end if
@ -8272,20 +8272,20 @@ function qmckl_compute_ao_hessian_doc(context, &
) * ao_factor(k)
end do
ao_hessian(k,4,ipoint,i) = (&
poly_hessian(i,4,il) * shell_vgl(ishell,1,ipoint) + &
poly_vgl(1,il) * shell_hessian(ishell,4,i,ipoint) + &
poly_vgl(5,il) * shell_vgl(ishell,i+1,ipoint) + &
poly_vgl(i+1,il) * shell_vgl(ishell,5,ipoint) + &
2.d0 * (&
poly_hessian(1,i,il) * shell_vgl(ishell,2,ipoint) + &
poly_vgl(2,il) * shell_hessian(ishell,1,i,ipoint) + &
poly_hessian(2,i,il) * shell_vgl(ishell,3,ipoint) + &
poly_vgl(3,il) * shell_hessian(ishell,2,i,ipoint) + &
poly_hessian(3,i,il) * shell_vgl(ishell,4,ipoint) + &
poly_vgl(4,il) * shell_hessian(ishell,3,i,ipoint) &
)) * ao_factor(k)
ao_hessian(k,4,ipoint,i) = (&
poly_hessian(i,4,il) * shell_vgl(ishell,1,ipoint) + &
poly_vgl(1,il) * shell_hessian(ishell,4,i,ipoint) + &
poly_vgl(5,il) * shell_vgl(ishell,i+1,ipoint) + &
poly_vgl(i+1,il) * shell_vgl(ishell,5,ipoint) + &
2.d0 * (&
poly_hessian(1,i,il) * shell_vgl(ishell,2,ipoint) + &
poly_vgl(2,il) * shell_hessian(ishell,1,i,ipoint) + &
poly_hessian(2,i,il) * shell_vgl(ishell,3,ipoint) + &
poly_vgl(3,il) * shell_hessian(ishell,2,i,ipoint) + &
poly_hessian(3,i,il) * shell_vgl(ishell,4,ipoint) + &
poly_vgl(4,il) * shell_hessian(ishell,3,i,ipoint) &
)) * ao_factor(k)
end do
k = k+1

View File

@ -6749,7 +6749,7 @@ integer function qmckl_compute_forces_mo_g_hpc(context, &
allocate(ao_index(ao_num))
do l=0,20
lstart(l) = l*(l+1)*(l+2)/6 +1
lstart(l) = l*(l+1)*(l+2)/6 +1
end do
k=1
@ -6764,29 +6764,31 @@ integer function qmckl_compute_forces_mo_g_hpc(context, &
end do
info = QMCKL_SUCCESS
forces_mo_g = 0.d0
do a=1,nucl_num
ishell_start = nucleus_index(a) + 1
ishell_end = nucleus_index(a) + nucleus_shell_num(a)
do n = 1, 3
do j=1,point_num
do m = 1, 3
do ishell = ishell_start, ishell_end
l = shell_ang_mom(ishell)
il = lstart(l+1)-lstart(l)
ao_ind = ao_index(ishell)
do k = ao_ind, ao_ind + il - 1
c1 = ao_hessian(k, m, j, n)
if (c1 == 0.d0) cycle
do i=1,mo_num
forces_mo_g(i, m, j, n, a) = forces_mo_g(i, m, j, n, a) - coefficient_t(i,k) * c1
ishell_start = nucleus_index(a) + 1
ishell_end = nucleus_index(a) + nucleus_shell_num(a)
do n = 1, 3
do j=1,point_num
forces_mo_g(:,:,j,n,a) = 0.d0
do m = 1, 3
do ishell = ishell_start, ishell_end
l = shell_ang_mom(ishell)
il = lstart(l+1)-lstart(l)
ao_ind = ao_index(ishell)
do k = ao_ind, ao_ind + il - 1
c1 = ao_hessian(k, m, j, n)
if (c1 /= 0.d0) then
do i=1,mo_num
forces_mo_g(i, m, j, n, a) = forces_mo_g(i, m, j, n, a) - &
coefficient_t(i,k) * c1
end do
end if
end do
end do
end do
end do
end do
end do
end do
end do
end do
end do
deallocate(ao_index)
@ -6857,7 +6859,7 @@ qmckl_exit_code qmckl_compute_forces_mo_g (
#ifdef HAVE_HPC
return qmckl_compute_forces_mo_g_hpc
#else
return qmckl_compute_forces_mo_g_hpc
return qmckl_compute_forces_mo_g_doc
#endif
(context, ao_num, mo_num, point_num, nucl_num, shell_num, nucleus_index,
nucleus_shell_num, shell_ang_mom, coefficient_t, ao_hessian, forces_mo_g );