Skip to content

Commit 84f748e

Browse files
committed
formatting
1 parent 39d3a59 commit 84f748e

File tree

2 files changed

+39
-37
lines changed

2 files changed

+39
-37
lines changed

org/qmckl_ao.org

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8229,7 +8229,7 @@ function qmckl_compute_ao_hessian_doc(context, &
82298229
e_coord(1) = coord(ipoint,1)
82308230
e_coord(2) = coord(ipoint,2)
82318231
e_coord(3) = coord(ipoint,3)
8232-
!ao_hessian(:,:,ipoint,:,:) = 0.d0
8232+
ao_hessian(:,:,ipoint,:) = 0.d0
82338233
do inucl=1,nucl_num
82348234
n_coord(1) = nucl_coord(inucl,1)
82358235
n_coord(2) = nucl_coord(inucl,2)
@@ -8242,7 +8242,7 @@ function qmckl_compute_ao_hessian_doc(context, &
82428242

82438243
r2 = x*x + y*y + z*z
82448244
if (r2 > cutoff*nucleus_range(inucl)) then
8245-
!ao_hessian(:,:,ipoint,:,inucl) = 0.d0
8245+
!ao_hessian(:,:,ipoint,:) = 0.d0
82468246
cycle
82478247
end if
82488248

@@ -8272,20 +8272,20 @@ function qmckl_compute_ao_hessian_doc(context, &
82728272
) * ao_factor(k)
82738273
end do
82748274

8275-
ao_hessian(k,4,ipoint,i) = (&
8276-
poly_hessian(i,4,il) * shell_vgl(ishell,1,ipoint) + &
8277-
poly_vgl(1,il) * shell_hessian(ishell,4,i,ipoint) + &
8278-
poly_vgl(5,il) * shell_vgl(ishell,i+1,ipoint) + &
8279-
poly_vgl(i+1,il) * shell_vgl(ishell,5,ipoint) + &
8280-
2.d0 * (&
8281-
poly_hessian(1,i,il) * shell_vgl(ishell,2,ipoint) + &
8282-
poly_vgl(2,il) * shell_hessian(ishell,1,i,ipoint) + &
8283-
poly_hessian(2,i,il) * shell_vgl(ishell,3,ipoint) + &
8284-
poly_vgl(3,il) * shell_hessian(ishell,2,i,ipoint) + &
8285-
poly_hessian(3,i,il) * shell_vgl(ishell,4,ipoint) + &
8286-
poly_vgl(4,il) * shell_hessian(ishell,3,i,ipoint) &
8287-
)) * ao_factor(k)
8288-
8275+
ao_hessian(k,4,ipoint,i) = (&
8276+
poly_hessian(i,4,il) * shell_vgl(ishell,1,ipoint) + &
8277+
poly_vgl(1,il) * shell_hessian(ishell,4,i,ipoint) + &
8278+
poly_vgl(5,il) * shell_vgl(ishell,i+1,ipoint) + &
8279+
poly_vgl(i+1,il) * shell_vgl(ishell,5,ipoint) + &
8280+
2.d0 * (&
8281+
poly_hessian(1,i,il) * shell_vgl(ishell,2,ipoint) + &
8282+
poly_vgl(2,il) * shell_hessian(ishell,1,i,ipoint) + &
8283+
poly_hessian(2,i,il) * shell_vgl(ishell,3,ipoint) + &
8284+
poly_vgl(3,il) * shell_hessian(ishell,2,i,ipoint) + &
8285+
poly_hessian(3,i,il) * shell_vgl(ishell,4,ipoint) + &
8286+
poly_vgl(4,il) * shell_hessian(ishell,3,i,ipoint) &
8287+
)) * ao_factor(k)
8288+
82898289
end do
82908290

82918291
k = k+1

org/qmckl_forces.org

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6749,7 +6749,7 @@ integer function qmckl_compute_forces_mo_g_hpc(context, &
67496749
allocate(ao_index(ao_num))
67506750

67516751
do l=0,20
6752-
lstart(l) = l*(l+1)*(l+2)/6 +1
6752+
lstart(l) = l*(l+1)*(l+2)/6 +1
67536753
end do
67546754

67556755
k=1
@@ -6764,29 +6764,31 @@ integer function qmckl_compute_forces_mo_g_hpc(context, &
67646764
end do
67656765
info = QMCKL_SUCCESS
67666766

6767-
forces_mo_g = 0.d0
67686767

67696768
do a=1,nucl_num
6770-
ishell_start = nucleus_index(a) + 1
6771-
ishell_end = nucleus_index(a) + nucleus_shell_num(a)
6772-
do n = 1, 3
6773-
do j=1,point_num
6774-
do m = 1, 3
6775-
do ishell = ishell_start, ishell_end
6776-
l = shell_ang_mom(ishell)
6777-
il = lstart(l+1)-lstart(l)
6778-
ao_ind = ao_index(ishell)
6779-
do k = ao_ind, ao_ind + il - 1
6780-
c1 = ao_hessian(k, m, j, n)
6781-
if (c1 == 0.d0) cycle
6782-
do i=1,mo_num
6783-
forces_mo_g(i, m, j, n, a) = forces_mo_g(i, m, j, n, a) - coefficient_t(i,k) * c1
6769+
ishell_start = nucleus_index(a) + 1
6770+
ishell_end = nucleus_index(a) + nucleus_shell_num(a)
6771+
do n = 1, 3
6772+
do j=1,point_num
6773+
forces_mo_g(:,:,j,n,a) = 0.d0
6774+
do m = 1, 3
6775+
do ishell = ishell_start, ishell_end
6776+
l = shell_ang_mom(ishell)
6777+
il = lstart(l+1)-lstart(l)
6778+
ao_ind = ao_index(ishell)
6779+
do k = ao_ind, ao_ind + il - 1
6780+
c1 = ao_hessian(k, m, j, n)
6781+
if (c1 /= 0.d0) then
6782+
do i=1,mo_num
6783+
forces_mo_g(i, m, j, n, a) = forces_mo_g(i, m, j, n, a) - &
6784+
coefficient_t(i,k) * c1
6785+
end do
6786+
end if
6787+
end do
67846788
end do
6785-
end do
6786-
end do
6789+
end do
67876790
end do
6788-
end do
6789-
end do
6791+
end do
67906792
end do
67916793

67926794
deallocate(ao_index)
@@ -6857,7 +6859,7 @@ qmckl_exit_code qmckl_compute_forces_mo_g (
68576859
#ifdef HAVE_HPC
68586860
return qmckl_compute_forces_mo_g_hpc
68596861
#else
6860-
return qmckl_compute_forces_mo_g_hpc
6862+
return qmckl_compute_forces_mo_g_doc
68616863
#endif
68626864
(context, ao_num, mo_num, point_num, nucl_num, shell_num, nucleus_index,
68636865
nucleus_shell_num, shell_ang_mom, coefficient_t, ao_hessian, forces_mo_g );

0 commit comments

Comments
 (0)