Skip to content

Commit

Permalink
Clean up comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas3R committed Dec 12, 2023
1 parent 86b1a79 commit 2f62775
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
1 change: 0 additions & 1 deletion src/gfnff/gfnff_ini.f90
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,6 @@ integer function itabrow6(i)
do k = 1, mol%n
do i = 1, mol%n
if (rabd(i, k) > gen%tdist_thr) cycle
!if (rabd(k, i) > gen%tdist_thr) cycle !@thomas
do j = 1, mol%n
if (rabd(k, j) > gen%tdist_thr) cycle !tdist_thr = 12.0
if (rabd(i, j) > (rabd(i, k) + rabd(k, j))) then
Expand Down
24 changes: 12 additions & 12 deletions src/gfnff/gfnff_ini2.f90
Original file line number Diff line number Diff line change
Expand Up @@ -1946,18 +1946,18 @@ subroutine nbondmat_pbc(n,numnb,numctr,nb,iTrNeg,neigh,pair)
integer :: i,inew,j,inb,ixnb,xnb,iTr,iTrnew,sumiTr,k,iTr2,l
integer :: nbr(numnb,n,numctr) ! reduced neighbor list no unpaired bonds
logical :: hasnb ! true if atom i and k have a paired bond (both have each other as nb)
integer :: tmpp(3,10*n),nt !@thomas TODO this whole tmpp thing and overwriting stuff
!@thomas is super suspicious, it should probably be removed
!@thomas the orignial GFN-FF is not consistent in the bpair e.g.
!@thomas following a connection along bpair does not add up to the final number
!@thomas saved in bpair
integer :: tmpp(3,10*n),nt
! using temporary list tmpp to match setup of nbondmat for mindless03
! in that case the sum of single bonds in bpair connecting atoms A and B
! does not necessarily add up to bpair(A,B)
! if setup should be consistent (excluding half bonds) delete tmpp_usage

! only paired bonds should be considered for setting up bpair
! e.g. metals have one sided bonds where the bond partner does not
! have the metal as a neighbor
! Therefore a list set up with only paired bonds
tmpp = 0
nt=0
tmpp = 0 ! tmpp_usage
nt=0 ! tmpp_usage
nbr = nb
do i=1, n
do iTr=1,neigh%numctr
Expand All @@ -1982,10 +1982,10 @@ subroutine nbondmat_pbc(n,numnb,numctr,nb,iTrNeg,neigh,pair)
! reduce neighbors by one
nbr(numnb,i,iTr) = nbr(numnb,i,iTr) - 1
! save the neighbor
nt = nt + 1
tmpp(1,nt) = k
tmpp(2,nt) = i
tmpp(3,nt) = iTr
nt = nt + 1 ! tmpp_usage
tmpp(1,nt) = k ! tmpp_usage
tmpp(2,nt) = i ! tmpp_usage
tmpp(3,nt) = iTr ! tmpp_usage
endif
enddo
enddo
Expand Down Expand Up @@ -2058,7 +2058,7 @@ subroutine nbondmat_pbc(n,numnb,numctr,nb,iTrNeg,neigh,pair)
enddo
enddo

! finaly overwrite the deleted bonds to be bonds again using the saved indices
! tmpp_usage: finaly overwrite the deleted bonds to be bonds again using the saved indices
do l=1, 10*n
if (tmpp(1,l).eq.0) exit
k=tmpp(1,l)
Expand Down

0 comments on commit 2f62775

Please sign in to comment.