From 2604ec753a49874c78c71d463abaca6dab8756c7 Mon Sep 17 00:00:00 2001 From: Leandro Martinez Date: Wed, 26 Sep 2018 16:42:42 -0300 Subject: [PATCH] fixed double printing of links in screen --- src/topolink.f90 | 8 ++++++-- src/writelog.f90 | 4 +--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/topolink.f90 b/src/topolink.f90 index 74294fc..601d8af 100644 --- a/src/topolink.f90 +++ b/src/topolink.f90 @@ -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 @@ -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)) diff --git a/src/writelog.f90 b/src/writelog.f90 index 75c847a..a899905 100644 --- a/src/writelog.f90 +++ b/src/writelog.f90 @@ -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))