Skip to content

Commit

Permalink
Fix setup of special torsion potential (grimme-lab#854)
Browse files Browse the repository at this point in the history
Resolves grimme-lab#849 

Signed-off-by: Johannes Gorges <58849467+gorges97@users.noreply.github.com>
  • Loading branch information
Thomas3R authored and gorges97 committed Mar 27, 2024
1 parent f9e0a20 commit 265adec
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/gfnff/gfnff_ini.f90
Original file line number Diff line number Diff line change
Expand Up @@ -1910,7 +1910,13 @@ subroutine specialTorsList(nst, mol, topo, sTorsList)
integer, intent(inout) :: sTorsList(6, nst)
integer :: i,j,k,ii,jj,kk,ll,idx
logical :: iiok, llok
! initialize variables
idx=0
ii=-1
jj=-1
kk=-1
ll=-1

do i=1, mol%n
! carbon with two neighbors bonded to other carbon* with two neighbors
if (mol%at(i).eq.6.and.topo%nb(20,i).eq.2) then
Expand All @@ -1931,6 +1937,9 @@ subroutine specialTorsList(nst, mol, topo, sTorsList)
kk=topo%nb(k,nbi)
endif
enddo
if (jj.eq.-1.or.kk.eq.-1) then
exit ! next atom i
endif
! check C1 through C4 are sp2 carbon
if (topo%hyb(jj).eq.2.and.topo%hyb(kk).eq.2 &
& .and.mol%at(jj).eq.6.and.mol%at(kk).eq.6) then
Expand Down

0 comments on commit 265adec

Please sign in to comment.