Skip to content

Commit d3f212b

Browse files
Exclude to-self bond in 3B-bond correction list b3list (#1289)
* Exclude to-self bond in 3B-bond correction list b3list --------- Co-authored-by: Thomas Froitzheim <92028749+thfroitzheim@users.noreply.github.com>
1 parent d1f890c commit d3f212b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/gfnff/gfnff_ini.f90

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -759,11 +759,11 @@ integer function itabrow6(i)
759759
do i=1,mol%n
760760
do j=1,i-1 !
761761
do iTr=1,neigh%numctr
762-
!if(iTr.eq.1.and.j.eq.i) cycle
763762
if(neigh%bpair(j,i,iTr).eq.3) then ! 1,4 exclusion of back-pair makes it worse, 1,3 makes little effect
764763
do iTr2=1, neigh%numctr
765764
do m=1,neigh%nb(neigh%numnb,j,iTr2)
766765
k=neigh%nb(m,j,iTr2)
766+
if ((i == k .or. j == k) .and. iTr == 1 .and. iTr2 == 1) cycle
767767
topo%nbatm=topo%nbatm+1
768768
topo%b3list(1,topo%nbatm)=i !in central cell
769769
topo%b3list(2,topo%nbatm)=j
@@ -773,6 +773,7 @@ integer function itabrow6(i)
773773
enddo
774774
do m=1,neigh%nb(neigh%numnb,i,iTr2)
775775
k=neigh%nb(m,i,iTr2)
776+
if ((i == k .or. j == k) .and. iTr == 1 .and. iTr2 == 1) cycle
776777
topo%nbatm=topo%nbatm+1
777778
topo%b3list(1,topo%nbatm)=i
778779
topo%b3list(2,topo%nbatm)=j

0 commit comments

Comments
 (0)