Skip to content

Commit

Permalink
Update model hessian for GFN-FF
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas3R committed Dec 22, 2023
1 parent d339b94 commit dace48a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions src/model_hessian.f90
Original file line number Diff line number Diff line change
Expand Up @@ -2652,13 +2652,15 @@ subroutine ddvopt(Cart,nAtoms,Hess,iANr,s6)
Return
End

subroutine gff_ddvopt(Cart,nAtoms,Hess,at,s6,param,topo)
subroutine gff_ddvopt(Cart,nAtoms,Hess,at,s6,param,topo,neigh)
use xtb_gfnff_data, only : TGFFData
use xtb_gfnff_topology, only : TGFFTopology
use xtb_gfnff_neighbor, only : TNeigh
use xtb_type_timer
Implicit Real*8 (a-h, o-z)
type(TGFFData), intent(in) :: param
type(TGFFTopology), intent(in) :: topo
type(TNeigh), intent(in) :: neigh

Integer at(nAtoms)
Real*8 Cart(3,nAtoms)
Expand Down Expand Up @@ -2757,9 +2759,9 @@ subroutine gff_ddvopt(Cart,nAtoms,Hess,at,s6,param,topo)
!
! Hessian for tension
!
do ibond=1,topo%nbond
kAtom=topo%blist(1,ibond)
lAtom=topo%blist(2,ibond)
do ibond=1,neigh%nbond
kAtom=neigh%blist(1,ibond)
lAtom=neigh%blist(2,ibond)
kr=iTabRow(iANr(kAtom))
lr=iTabRow(iANr(lAtom))
xkl=Cart(1,kAtom)-Cart(1,lAtom)
Expand Down
2 changes: 1 addition & 1 deletion src/optimizer.f90
Original file line number Diff line number Diff line change
Expand Up @@ -1052,7 +1052,7 @@ subroutine modhes(env, calc, modh, natoms, xyz, chg, Hess, pr)
return
case(p_modh_old, p_modh_gff)
if (pr) write(env%unit,'(a)') "Using GFN-FF Lindh-Hessian"
call gff_ddvopt(xyz, natoms, Hess, chg, modh%s6, calc%param, calc%topo)
call gff_ddvopt(xyz, natoms, Hess, chg, modh%s6, calc%param, calc%topo, calc%neigh)
case(p_modh_lindh_d2)
if (pr) write(env%unit,'(a)') "Using Lindh-Hessian"
call mh_lindh_d2(xyz, natoms, Hess, chg, modh)
Expand Down

0 comments on commit dace48a

Please sign in to comment.