Skip to content

Commit

Permalink
Fix setup of special torsion potential (#854)
Browse files Browse the repository at this point in the history
Resolves #849
  • Loading branch information
Thomas3R authored Aug 24, 2023
1 parent 590bc82 commit 9644c13
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 9644c13

Please sign in to comment.