Skip to content

Commit

Permalink
Avoid division of zero by zero
Browse files Browse the repository at this point in the history
Signed-off-by: Igor S. Gerasimov <[email protected]>
  • Loading branch information
foxtran committed Mar 4, 2025
1 parent 7f6ac57 commit 0d01a9f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/scf_module.F90
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,11 @@ subroutine scf(env, mol, wfn, basis, pcem, xtbData, solvation, &
! SCC terms
!eh1 = autoev*(shellShift(ishell) + shellShift(jshell))
!H1 = -S(j,i)*eh1*0.5_wp
H(j,i) = H0(k)*evtoau/S(j,i)
if (H0(k) .eq. 0.0_wp) then
H(j,i) = 0.0_wp
else
H(j,i) = H0(k)*evtoau/S(j,i)
end if
H(i,j) = H(j,i)
enddo
call build_dSDQH0_noreset(xtbData%nShell, xtbData%hamiltonian, selfEnergy, &
Expand Down

0 comments on commit 0d01a9f

Please sign in to comment.