Skip to content

Commit

Permalink
fixed double printing of links in screen
Browse files Browse the repository at this point in the history
  • Loading branch information
lmiq committed Sep 26, 2018
1 parent db02932 commit 2604ec7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
8 changes: 6 additions & 2 deletions src/topolink.f90
Original file line number Diff line number Diff line change
Expand Up @@ -1240,7 +1240,9 @@ program topolink
write(str,"( a, a, 3(tr2,f8.3) )") ' Reference atom 2: ', &
print_atom(link(i)%atom2), &
link(i)%atom2%x, link(i)%atom2%y, link(i)%atom2%z
if (link(i)%observed ) write(str,*) ' This link was experimentally observed ' ; call writelog(str)
if (link(i)%observed ) then
write(str,*) ' This link was experimentally observed ' ; call writelog(str)
end if
write(str,intout2) ' First and last atoms of residue 1: ', first(1), last(1) ; call writelog(str)
write(str,intout2) ' First and last atoms of residue 2: ', first(2), last(2) ; call writelog(str)
end if
Expand Down Expand Up @@ -1292,7 +1294,9 @@ program topolink
link(i)%euclidean = dsqrt( (coor(atom2,1) - coor(atom1,1))**2 + &
(coor(atom2,2) - coor(atom1,2))**2 + &
(coor(atom2,3) - coor(atom1,3))**2 )
if ( print > 0 ) write(str,floatout) ' Euclidean distance: ', link(i)%euclidean ; call writelog(str)
if ( print > 0 ) then
write(str,floatout) ' Euclidean distance: ', link(i)%euclidean ; call writelog(str)
end if
if ( link(i)%euclidean > link(i)%dsearch ) then
if ( printnotfound ) then
link(i)%status = linkstatus(link(i))
Expand Down
4 changes: 1 addition & 3 deletions src/writelog.f90
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ subroutine writelog(string)

character(len=*) :: string

if ( screen_log ) then
write(*,*) trim(adjustl(string))
end if
write(*,*) trim(adjustl(string))

if ( output_log ) then
write(output_log_unit,*) trim(adjustl(string))
Expand Down

0 comments on commit 2604ec7

Please sign in to comment.