From 7a1f2244075df9670e5a33920256cae9b8d5f9d6 Mon Sep 17 00:00:00 2001 From: Lukas Wittmann Date: Fri, 10 Jan 2025 09:00:51 +0100 Subject: [PATCH] Modified order of ceh numgrad written to file --- src/tblite/calculator.F90 | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/tblite/calculator.F90 b/src/tblite/calculator.F90 index 79ff82580..270e2ed8f 100644 --- a/src/tblite/calculator.F90 +++ b/src/tblite/calculator.F90 @@ -492,13 +492,16 @@ subroutine num_grad_chrg(env, mol, tblite) ! write the numerical gradient to the ceh.charges.numgrad file call open_file(ich, 'ceh.charges.numgrad', 'w') - do i = 1, 3 ! cartesian axes-wise - write(ich, '(3f12.6)') numgrad(i,:,:) + do i = 1, mol%n + do j = 1, mol%n + do k = 1, 3 + write(ich, '(3f12.6)') numgrad(k,j,i) + enddo + enddo enddo call close_file(ich) write(env%unit, '(1x, a)') "CEH gradients written to ceh.charges.numgrad" - end subroutine num_grad_chrg