Changeset 38d77eb


Ignore:
Timestamp:
11/19/09 11:29:48 (14 years ago)
Author:
baerbaer <baerbaer@…>
Branches:
master
Children:
7137e5d
Parents:
32289cd
Message:

Redirected standard out to logString.

SMMP produced a lot of log messages. This became an issue when run in massively
parallel environments. I replaced all writes to standard out to a write to logString.
The next step is to pass this string to a function that writes the messages to a log
file according to their importance and the chosen log level.

git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/smmp/trunk@34 26dc1dd8-5c4e-0410-9ffe-d298b4865968

Files:
49 edited

Legend:

Unmodified
Added
Removed
  • INCL.H

    r32289cd r38d77eb  
    22     
    33      character*255 version
     4      character*255 logString
    45
    56      integer MAX_REPLICA, MAX_PROC, mxml, mxrs, mxat, mxbd, mxath
  • INCP.H

    r32289cd r38d77eb  
    4444!      ir=0
    4545!      do i=1,nchp
    46 !        write(*,*) ' ===== chain |',chnp(i),'|'
     46!        write (logString, *) ' ===== chain |',chnp(i),'|'
    4747!        do j=1,nchrsp(i)
    4848!          ir=ir+1
    49 !          write(*,*) ' ----- ',rsidp(ir),' ',rsnmp(ir),' ',nrsatp(ir)
     49!          write (logString, *) ' ----- ',rsidp(ir),' ',rsnmp(ir),' ',nrsatp(ir)
    5050!          k1=irsatp(ir)
    5151!          k2=k1+nrsatp(ir)-1
    5252!          do k=k1,k2
    53 !            write(*,*) ' ',noatp(k),' ',atnmp(k),' ',(xyzp(l,k),l=1,3)
     53!            write (logString, *) ' ',noatp(k),' ',atnmp(k),' ',(xyzp(l,k),l=1,3)
    5454!          enddo
    5555!        enddo
  • addend.f

    r32289cd r38d77eb  
    4242     &.or.grn(:3).eq.'nme'.or.grc(:3).eq.'nme') then
    4343
    44         write(*,'(2a)') ' addend> N-Acetyl (ace) or N-Methylamide (nme)'
    45      &   ,' should be put in SEQUENCE file, not added as end groups'
     44        write (logString, '(2a)')
     45     &   ' addend> N-Acetyl (ace) or N-Methylamide (nme)',
     46     &   ' should be put in SEQUENCE file, not added as end groups'
    4647
    4748        stop
     
    5960              sbrs='nh2+'
    6061            else
    61               write (*,'(2a)') ' addend> ',
     62              write (logString, '(2a)') ' addend> ',
    6263     &         ' No N-terminal Hyp possible with ECEPP/3 dataset'
    6364              stop
     
    8788        else
    8889
    89           write(*,'(2a)') ' addend> Can add only ',
     90          write (logString, '(2a)') ' addend> Can add only ',
    9091     &     'nh2 or nh3+ to N-terminus'
    9192          stop
     
    9899      else ! ace
    99100
    100         write(*,'(2a)') ' addend> Acetyl group',
     101        write (logString, '(2a)') ' addend> Acetyl group',
    101102     &     ' at N-terminus not modified'
    102103      endif
     
    128129        else
    129130
    130           write(*,'(2a)') ' addend> Can add only ',
     131          write (logString, '(2a)') ' addend> Can add only ',
    131132     &     'cooh or coo- to C-terminus'
    132133          stop
     
    139140      else  ! N'-methylamide
    140141
    141         write(*,'(2a)') ' addend> N-Methylamide',
     142        write (logString, '(2a)') ' addend> N-Methylamide',
    142143     &     ' at C-terminus not modified'
    143144
     
    149150        cg = cg + cgat(i)
    150151      enddo
    151       if (abs(cg).gt.1.d-5) write(*,'(a,i2,a,f7.3,/)')
    152      &        ' addend> Net charge of molecule #'
     152      if (abs(cg).gt.1.d-5) then
     153         write (logString, '(a,i2,a,f7.3)')
     154     &      ' addend> Net charge of molecule #'
    153155     &        ,nml,': ',cg
     156      endif
    154157
    155158      return
     
    204207        endif
    205208      enddo
    206       write (*,'(4a,i4,a,i4)') ' rplgrp> cannot find atom >',rpat,
    207      &'< to be replaced in residue ',seq(nrs),nrs,' of molecule ',nml
     209      write (logString, '(4a,i4,a,i4)') ' rplgrp> cannot find atom >',
     210     &   rpat,
     211     &   '< to be replaced in residue ',seq(nrs),nrs,' of molecule ',nml
    208212      stop
    209213
     
    234238            if (iowat(ibd(i)).ne.nfirp) then
    235239              if (ibdrg.ne.0) then
    236                 write (*,'(2a,i3)')
     240                write (logString, '(2a,i3)')
    237241     &             ' rplgrp> Can handle only simple ring at 1st',
    238242     &             ' atom of molecule #',nml
     
    261265          goto 11
    262266        else
    263           write (*,'(4a,i4,a,i4)')
     267          write (logString, '(4a,i4,a,i4)')
    264268     &      ' rplgrp> Cannot replace BACKBONE atom ',rpat,
    265269     &      ' of residue ',seq(nrs),nrs,' in molecule #',nml
     
    275279! _______________________________ get data for substituent atoms
    276280    3 if (iopfil(lunlib,reslib,'old','formatted').le.izero) then
    277         write (*,'(a,/,a,i3,2a)')
     281        write (logString, '(a,/,a,i3,2a)')
    278282     &    ' rplgrp> ERROR opening library of residues:',
    279283     &    ' LUN=',lunlib,' FILE=',reslib(1:iendst(reslib))
     
    289293        endif
    290294      enddo
    291       write (*,'(4a)') ' rplgrp> Cannot find atom >',rpat,
     295      write (logString, '(4a)') ' rplgrp> Cannot find atom >',rpat,
    292296     &'< in substituent residue ',sbrs
    293297      stop
     
    372376        else  ! more atoms
    373377          if ((ilaat+nsh).gt.mxat) then
    374             write (*,'(a,i5)') ' rplgrp> number of atoms > ',mxat
     378            write (logString, '(a,i5)') ' rplgrp> number of atoms > ',
     379     &         mxat
    375380            stop
    376381          endif
     
    466471          nb=nb+1
    467472          if (nb.gt.mxbd) then
    468             write (*,'(6a,/,2a,3(i4,a))')
     473            write (logString, '(6a,/,2a,3(i4,a))')
    469474     &      ' rplgrp> Cannot add atoms following ',rpat,
    470475     &      ' from group ',sbrs,' to atom ',rpat,
     
    593598        else
    594599          if ((ilavr+jsh).gt.mxvr) then
    595             write (*,'(a,i5)') ' rplgrp> number of variables > ',mxvr
     600            write (logString, '(a,i5)')
     601     &         ' rplgrp> number of variables > ',mxvr
    596602            stop
    597603          endif
     
    628634      return
    629635! __________________________________________ Errors
    630    10 write (*,'(3a,/,2a,i4,a,i4,/,2a)')
     636   10 write (logString, '(3a,/,2a,i4,a,i4,/,2a)')
    631637     &   ' rplgrp> Cannot replace atom(s) following ',rpat,
    632638     &   ' from INSIDE a ring','    in residue: ',seq(nrs),nrs,
    633639     &   ' in molecule #',nml,' or in substitute: ',sbrs
    634640      stop
    635    11 write (*,'(4a,i4,a,i4,/,a)')
     641   11 write (logString, '(4a,i4,a,i4,/,a)')
    636642     &   ' rplgrp> Cannot replace atom(s) following ',rpat,
    637643     &   ' of residue ',seq(nrs),nrs,' in molecule #',nml,
     
    686692          endif
    687693        else
    688           write (*,*) ' redchg> dont know which end goup is present'
     694          write(logString,*)
     695     &                  ' redchg> dont know which end goup is present'
    689696          stop
    690697        endif
     
    698705
    699706        if (iopfil(lunchg,chgfil,'old','formatted').le.izero) then
    700           write (*,'(a,/,a,i3,2a)')
     707          write (logString, '(a,/,a,i3,2a)')
    701708     &      ' redchg> ERROR opening library of charges:',
    702709     &      ' LUN=',lunchg,' FILE=',chgfil(1:iendst(chgfil))
     
    722729                endif
    723730              enddo
    724               write (*,'(6a)') ' redchg> Cannot find atom: ',atnm,
     731              write (logString, '(6a)') ' redchg> Cannot find atom: ',
     732     &                        atnm,
    725733     &                        ' for entry: ',cgty,' in library: ',
    726734     &                        chgfil(1:iendst(chgfil))
     
    729737            return
    730738          else
    731             write (*,'(4a)')
     739            write (logString, '(4a)')
    732740     &       ' redchg> must increase MXATH to read data for entry: ',
    733741     &        cgty,' in library: ',chgfil(1:iendst(chgfil))
     
    737745        endif
    738746        goto 1
    739     3   write (*,'(4a)')
     747    3   write (logString, '(4a)')
    740748     &   ' redchg> Cannot find entry: ',cgty,' in library: ',
    741749     &      chgfil(1:iendst(chgfil))
     
    746754
    747755        if (iopfil(lunlib,reslib,'old','formatted').le.izero) then
    748           write (*,'(a,/,a,i3,2a)')
     756          write (logString, '(a,/,a,i3,2a)')
    749757     &      ' redchg> ERROR opening library of residues:',
    750758     &      ' LUN=',lunlib,' FILE=',reslib(1:iendst(reslib))
     
    769777                endif
    770778              enddo
    771               write (*,'(6a)') ' redchg> Cannot find atom: ',atnm,
     779              write (logString, '(6a)') ' redchg> Cannot find atom: ',
     780     &                        atnm,
    772781     &                        ' for entry: ',cgty,' in library: ',
    773782     &                        reslib(1:iendst(reslib))
     
    776785            return
    777786          else
    778             write (*,'(4a)')
     787            write (logString, '(4a)')
    779788     &       ' redchg> must increase MXATH to read data for entry: ',
    780789     &        cgty,' in library: ',reslib(1:iendst(reslib))
     
    784793        endif
    785794        goto 4
    786     6   write (*,'(4a)')
     795    6   write (logString, '(4a)')
    787796     &   ' redchg> Cannot find entry: ',cgty,' in library: ',
    788797     &      reslib(1:iendst(reslib))
     
    792801      endif
    793802
    794    10 write (*,'(4a)')
     803   10 write (logString, '(4a)')
    795804     &    ' redchg> Do not have charges for N/C-terminal residue ',
    796805     &    res,' modified with group :',sbrs
  • anneal.f

    r32289cd r38d77eb  
    8484
    8585      eol=energy()
    86       write (*,'(a,e12.5,/)')  'energy of start configuration: ',eol
     86      write (logString, '(a,e12.5,/)') 
     87     &   'energy of start configuration: ',eol
    8788
    8889! Write start configuration in pdb-format into file
     
    9495         call metropolis(eol,acz,can_weight)
    9596      end do
    96       write(*,*) 'Energy after  equilibration:',eol
     97      write (logString, *)
     98     &   'Energy after  equilibration:', eol
    9799
    98100!======================Simulation by simulated annealing
     
    131133
    132134      acz = acz/dble(nsw*nvr)
    133       write(*,*) 'acceptance rate:',acz
    134       write(*,*)
     135      write (logString, *) 'acceptance rate:',acz
     136      write (logString, *)
    135137! ------------ Output Dihedreals of final configuration
    136       write(*,*) 'last energy',eol
     138      write (logString, *) 'last energy',eol
    137139      call outvar(0,' ')
    138140!     Output final conformation as pdb-file
    139141      call outpdb(0,"final.pdb")
    140       write(*,*)
     142      write (logString, *)
    141143
    142144! ------------ Output Dihedreals of conformation with lowest energy
    143       write(*,*) 'lowest energy ever found:',nemin,ymin
     145      write (logString, *) 'lowest energy ever found:',nemin,ymin
    144146      close(14)
    145147! =====================
  • bgs.f

    r32289cd r38d77eb  
    327327!          enw=energy()
    328328!          if (abs(enw-eol1).gt.0.000001) then
    329 !             write(*,*) 'rejected bgs move: energy change :',eol1,enw
     329!             write (logString, *) 'rejected bgs move: energy change :',eol1,enw
    330330!          endif
    331 !         write(*,*) 'rejected bgs move: ',eol1,enw,wfw,wbw,rd
     331!         write (logString, *) 'rejected bgs move: ',eol1,enw,wfw,wbw,rd
    332332         bgs=0
    333333      endif
  • bldmol.f

    r32289cd r38d77eb  
    134134
    135135          if (ix.ne.0) then
    136             write (*,'(2a,i3)')
     136            write (logString, '(2a,i3)')
    137137     &         ' fnd3ba> Can handle only simple ring at 1st',
    138138     &         ' atom of molecule #',nml
     
    166166      endif
    167167
    168       write (*,'(4a,i4,a,i4)')
     168      write (logString, '(4a,i4,a,i4)')
    169169     &   ' fnd3ba> Cannot find backbone atom following ',nmat(i2),
    170170     &   ' of residue ',seq(irs),irs,' in molecule #',nml
  • canon.f

    r32289cd r38d77eb  
    6969      eol = energy()
    7070      e_min = eol
    71       write (*,'(a,e12.5,/)')  'energy of start configuration:',eol
     71      write (logString, '(a,e12.5,/)')  'energy of start configuration:',eol
    7272
    7373! Write start configuration in pdb-format into file
     
    7979         call metropolis(eol,acz,can_weight)
    8080      end do
    81       write(*,*) 'Energy after equilibration:',eol
     81      write (logString, *) 'Energy after equilibration:',eol
    8282
    8383!======================Simulation in canonical ensemble
     
    8686        call metropolis(eol,acz,can_weight)
    8787        if (eol.lt.e_min) then
    88            write (*,*) "New minimum energy:", eol, "t=", nsw
    89            write (*,*) eyel,eyhb,eyvr,eysl
     88           write (logString, *) "New minimum energy:", eol, "t=", nsw
     89           write (logString, *) eyel,eyhb,eyvr,eysl
    9090           e_min = eol
    9191           call outpdb(0, "minen.pdb")
     
    116116
    117117      acz = acz/dble(nsw*nvr)
    118       write(*,*) 'acceptance rate:',acz
    119       write(*,*)
     118      write (logString, *) 'acceptance rate:',acz
     119      write (logString, *)
    120120! ------------ Output Dihedreals of final configuration
    121       write(*,*) 'last energy',eol
     121      write (logString, *) 'last energy',eol
    122122      call outvar(0,'lastconf.var')
    123123!     Output final conformation as pdb-file
  • cnteny.f

    r32289cd r38d77eb  
    3737
    3838      if (ntlvr.eq.0) then
    39         write (*,'(a,i4)')
     39        write (logString, '(a,i4)')
    4040     &           ' cnteny> No variables defined in molecule #',nml
    4141        return
     
    184184          nbc=nbc+1
    185185          ir=nursat(i)
    186           write(*,'(1x,i4,1x,a4,1x,a4,a2,e11.4)') ir,seq(ir),nmat(i),
    187      &                                           ': ',ey
     186          write (logString, '(1x,i4,1x,a4,1x,a4,a2,e11.4)') ir,seq(ir),
     187     &       nmat(i), ': ',ey
    188188        endif
    189189      enddo
  • contacts.f

    r32289cd r38d77eb  
    161161           do nr_j=nr_i+3,irsml2(nmol) ! Over res. j
    162162
    163 !             write(*,'(2i3)'),nr_i,nr_j
     163!             write (logString, '(2i3)'),nr_i,nr_j
    164164
    165165              ic=0
     
    173173              if(sqrt(rij2).lt.rcut) ic=1
    174174
    175 !             write(*,'(2i3)'),nr_i,nr_j
     175!             write (logString, '(2i3)'),nr_i,nr_j
    176176
    177177              ijcont(nr_i,nr_j)=ic
  • dihedr.f

    r32289cd r38d77eb  
    5757        return
    5858      else
    59         write (*,'(a,4i5)')' dihedr> Error in coordinates of atoms #: '
     59        write (logString, '(a,4i5)')
     60     &     ' dihedr> Error in coordinates of atoms #: '
    6061     &                     ,i1,i2,i3,i4
    6162
    62         write (*,*) 'stored coordinates are xvals :',
     63        write (logString, *) 'stored coordinates are xvals :',
    6364     &       xat(i1),xat(i2),xat(i3),xat(i4)
    64         write (*,*) 'yvals:', yat(i1),yat(i2),yat(i3),yat(i4)
    65         write (*,*) 'zvals:', zat(i1),zat(i2),zat(i3),zat(i4)
     65        write (logString, *) 'yvals:', yat(i1),yat(i2),yat(i3),yat(i4)
     66        write (logString, *) 'zvals:', zat(i1),zat(i2),zat(i3),zat(i4)
    6667        call outvar(0,'crash.var')       
    6768        stop
     
    110111
    111112      else
    112         write (*,'(a,3i5)')' valang> Error in coordinates of atoms #: '
     113        write (logString, '(a,3i5)')
     114     &   ' valang> Error in coordinates of atoms #: '
    113115     &                     ,i1,i2,i3
    114         write (*,*) 'stored coordinates are xvals :',
     116        write (logString, *) 'stored coordinates are xvals :',
    115117     &       xat(i1),xat(i2),xat(i3)
    116         write (*,*) 'yvals:', yat(i1),yat(i2),yat(i3)
    117         write (*,*) 'zvals:', zat(i1),zat(i2),zat(i3)
     118        write (logString, *) 'yvals:', yat(i1),yat(i2),yat(i3)
     119        write (logString, *) 'zvals:', zat(i1),zat(i2),zat(i3)
    118120        call outvar(0,'crash.var')
    119121        stop
  • enyflx.f

    r32289cd r38d77eb  
    3333      ntlvr=nvrml(nml)
    3434      if (ntlvr.eq.0) then
    35         write (*,'(a,i4)')
     35        write (logString, '(a,i4)')
    3636     &           ' enyflx> No variables defined in molecule #',nml
    3737        return
  • enyshe.f

    r32289cd r38d77eb  
    4141
    4242      if (ntlvr.eq.0) then
    43         write (*,'(a,i4)')
     43        write (logString, '(a,i4)')
    4444     &           ' enyshe> No variables defined in molecule #',nml
    4545        return
  • enyshe_p.f

    r32289cd r38d77eb  
    4646
    4747      if (ntlvr.eq.0) then
    48          write (*,'(a,i4)')
     48         write (logString, '(a,i4)')
    4949     &        ' enyshe> No variables defined in molecule #',nml
    5050         return
  • enysol.f

    r32289cd r38d77eb  
    3030!     functions
    3131      integer nursat
     32
    3233
    3334      integer numbox, inbox, indsort, look, i, ii, ia, ib, ibox, icount
     
    157158        numbox(j)=nboxj
    158159        if (nboxj.gt.mxbox) then
    159          write(*,'(a)') 'enysol> bad mxboxe-2'
    160          write(*,*) 'diagnostics ...'
    161          write(*,*) 'atom ',j
    162          write(*,*) 'position ',xat(j),yat(j),zat(j)
    163          write(*,*) 'box indices ',mx,my,mz
    164          write(*,*) 'resulting boxindex and limit ',nboxj,mxbox
     160         write (logString, '(a)') 'enysol> bad mxboxe-2'
     161         write (logString, *) 'diagnostics ...'
     162         write (logString, *) 'atom ',j
     163         write (logString, *) 'position ',xat(j),yat(j),zat(j)
     164         write (logString, *) 'box indices ',mx,my,mz
     165         write (logString, *) 'resulting boxindex and limit ',
     166     &      nboxj,mxbox
    165167
    166168         stop
     
    350352
    351353      read(lin(1:5),'(i5)') npnt
    352 !       write(*,'(a,i5)') 'the number of points---->',npnt
     354!       write (logString, '(a,i5)') 'the number of points---->',npnt
    353355
    354356!    Read the surface points
  • enysol_p.f

    r32289cd r38d77eb  
    159159        numbox(j)=nboxj
    160160        if (nboxj.gt.mxbox) then
    161          write(*,'(a)') 'enysol> bad mxboxe-2'
    162          write(*,*) 'diagnostics ...'
    163          write(*,*) 'atom ',j
    164          write(*,*) 'position ',xat(j),yat(j),zat(j)
    165          write(*,*) 'box indices ',mx,my,mz
    166          write(*,*) 'resulting boxindex and limit ',nboxj,mxbox
     161         write (logString, '(a)') 'enysol> bad mxboxe-2'
     162         write (logString, *) 'diagnostics ...'
     163         write (logString, *) 'atom ',j
     164         write (logString, *) 'position ',xat(j),yat(j),zat(j)
     165         write (logString, *) 'box indices ',mx,my,mz
     166         write (logString, *) 'resulting boxindex and limit ',nboxj,
     167     &      mxbox
    167168
    168169         stop
     
    195196      if (myrank.eq.(no - 1)) iboxmax = ncbox
    196197      if (myrank.eq.-1) then
    197          write (*,*) 'enysol> Summary:', enysolct, ncbox, boxpp,
    198      &               ndx, ndy, ndz
     198         write (logString, *) 'enysol> Summary:', enysolct, ncbox,
     199     &               boxpp, ndx, ndy, ndz
    199200      endif
    200201      do ibox = iboxmin + 1, iboxmax + 1
     
    333334      call MPI_ALLREDUCE(eysl, eyslsum, 1, MPI_DOUBLE_PRECISION,
    334335     &      MPI_SUM,my_mpi_comm, ierror)
    335 !       write(*,*) 'enysol>', myrank, eysl, eyslsum
     336!       write (logString, *) 'enysol>', myrank, eysl, eyslsum
    336337      tsurfres = surfres
    337338      call MPI_ALLREDUCE(tsurfres, surfres, mxrs, MPI_DOUBLE_PRECISION,
     
    341342      endwtime = MPI_Wtime()
    342343      if (myrank.le.-1) then
    343          write (*,*) 'enysol>',myrank,enysolct,
     344         write (logString, *) 'enysol>',myrank,enysolct,
    344345     &               iboxmin + 1, iboxmax + 1,
    345346     &               endwtime - startwtime, "s"
     
    376377
    377378      read(lin(1:5),'(i5)') npnt
    378 !        write(*,'(a,i5)') 'the number of points---->',npnt
     379!        write (logString, '(a,i5)') 'the number of points---->',npnt
    379380
    380381!    Read the surface points
  • esolan.f

    r32289cd r38d77eb  
    130130     &   +(zold(j)-zold(i))**2! Distance between atom i and j
    131131       if(ddp.lt.1e-10) then
    132          write(*,*)'ERROR in data: centres of two atoms coincide!'
    133          write(*,*)i,j,xold(i),yold(i),zold(i),rvdw(i),
     132         write (logString, *)
     133     &      'ERROR in data: centres of two atoms coincide!'
     134         write (logString, *)i,j,xold(i),yold(i),zold(i),rvdw(i),
    134135     &                   xold(j),yold(j),zold(j),rvdw(j)
    135136         stop 'Centres of atoms coincide!'
  • getmol.f

    r32289cd r38d77eb  
    4949
    5050      if (iopfil(lunlib,reslib,'old','formatted').le.izero) then
    51         write (*,'(a,/,a,i3,2a)')
     51        write (logString, '(a,/,a,i3,2a)')
    5252     &    ' getmol> ERROR opening library of residues:',
    5353     &    ' LUN=',lunlib,' FILE=',reslib(1:iendst(reslib))
     
    7474
    7575        if (res(:3).eq.'nme'.and.nrs.ne.ilars) then
    76           write (*,'(3a)') ' getmol> residue >',res,
     76          write (logString, '(3a)') ' getmol> residue >',res,
    7777     &                     '< allowed at C-terminus only !'
    7878          close(lunlib)
    7979          stop
    8080        elseif (res(:3).eq.'ace'.and.nrs.ne.ifirs) then
    81           write (*,'(3a)') ' getmol> residue >',res,
     81          write (logString, '(3a)') ' getmol> residue >',res,
    8282     &                     '< allowed at N-terminus only !'
    8383          close(lunlib)
     
    8888
    8989        if ((nat+ntlat).gt.mxat) then
    90           write (*,'(a,i5)') ' getmol> number of atoms > ',mxat
     90          write (logString, '(a,i5)') ' getmol> number of atoms > ',mxat
    9191          close(lunlib)
    9292          stop
    9393        endif
    9494        if ((nvr+ntlvr).gt.mxvr) then
    95           write (*,'(a,i5)') ' getmol> number of variables > ',mxvr
     95          write (logString, '(a,i5)') ' getmol> number of variables > '
     96     &       ,mxvr
    9697          close(lunlib)
    9798          stop
     
    139140              nbd=nbdat(nh)
    140141              if (nbd.eq.mxbd) then
    141                 write(*,'(a,i2,a,i4,2a,i4,a)')
     142                write (logString, '(a,i2,a,i4,2a,i4,a)')
    142143     &           ' getmol> need ',(mxbd+2),
    143144     &           'th bond to connect residues ',
     
    154155
    155156                  if (t.eq.0.0) then
    156                     write (*,'(3a,/,2a)')
     157                    write (logString, '(3a,/,2a)')
    157158     &               ' getmol> DIHEDRAL for atom ',nmat(nj),
    158159     &               ' should be PHASE angle with respect to atom ',
     
    312313
    313314        if (nat.gt.mxath) then
    314           write (*,'(a,i5)') ' redres> number of atoms > ',mxath
     315          write (logString, '(a,i5)') ' redres> number of atoms > ',mxath
    315316          close(lunlib)
    316317          stop
     
    340341          if (iexcp.eq.0.and.i.le.jow) then
    341342            if (i.eq.jow) then
    342               write (*,'(5a)') ' redres> atom ',nmath(i),' of ',
     343              write(logString,'(5a)') ' redres> atom ',nmath(i),' of ',
    343344     &                          resl,' cannot preceed itself '
    344345            else
    345               write (*,'(5a,i4)') ' redres> atom ',nmath(i),' of ',
     346              write (logString, '(5a,i4)')
     347     &                    ' redres> atom ',nmath(i),' of ',
    346348     &                    resl,' should be placed AFTER atom #',jow
    347349            endif
     
    394396
    395397              if (nvrr.gt.mxvrh) then
    396                 write (*,'(a,i5)') ' redres> number of variables > ',
     398                write (logString, '(a,i5)')
     399     &           ' redres> number of variables > ',
    397400     &                             mxvrh
    398401                close(lunlib)
     
    423426
    424427! ____________________________________________________________ ERRORS
    425     2 write (*,'(4a)') ' redres> residue >',resl,'< NOT FOUND in ',
     428    2 write (logString, '(4a)') ' redres> residue >',resl,
     429     &      '< NOT FOUND in ',
    426430     &reslib(1:iendst(reslib))
    427431      close(lunlib)
    428432      stop
    429433
    430     3 write (*,'(a,i4,2a)') ' redres> ERROR reading line No. ',nln,
    431      &' in ',reslib(1:iendst(reslib))
     434    3 write (logString, '(a,i4,2a)') ' redres> ERROR reading line No. ',
     435     &   nln,
     436     &   ' in ',reslib(1:iendst(reslib))
    432437      close(lunlib)
    433438      stop
    434439
    435     4 write (*,'(4a)') ' redres> Incorrect order of bonds for atom ',
     440    4 write (logString, '(4a)')
     441     &   ' redres> Incorrect order of bonds for atom ',
    436442     &                      nmath(i),' of ',resl
    437443
    438     5 write (*,'(8x,2a)') '... must correct ',
     444    5 write (logString, '(8x,2a)') '... must correct ',
    439445     &                      reslib(1:iendst(reslib))
    440446      close(lunlib)
    441447      stop
    442448
    443     6 write (*,'(a,i2,4a)') ' redres> unknown type :',ity,
     449    6 write (logString, '(a,i2,4a)') ' redres> unknown type :',ity,
    444450     &                   ': for atom ',nmath(i),' in residue ',resl
    445451      close(lunlib)
    446452      stop
    447453
    448     7 write (*,'(a,i2,4a)') ' redres> unknown class :',ic,
     454    7 write (logString, '(a,i2,4a)') ' redres> unknown class :',ic,
    449455     &                   ': for variable ',nm(j),' in residue ',resl
    450456      close(lunlib)
  • gradient.f

    r32289cd r38d77eb  
    5757        else
    5858
    59           write(*,*)  'gradient> Set itysol < 0'
     59          write (logString, *)  'gradient> Set itysol < 0'
    6060          stop
    6161        endif
  • hbond.f

    r32289cd r38d77eb  
    5959        ntlvr=nvrml(nml)
    6060        if (ntlvr.eq.0) then
    61           write (*,'(a,i4)')
     61          write (logString, '(a,i4)')
    6262     &           ' hbond> No variables defined in molecule #',nml
    6363          return
     
    108108                    ixtyhb(ntyhb)=ixhb
    109109                  else
    110                     write(*,*) ' hbond> increase parameter MXTYHB'
     110                    write (logString, *)
     111     &                    ' hbond> increase parameter MXTYHB'
    111112                    stop
    112113                  endif
     
    139140                  ixtyhb(ntyhb)=ixhb
    140141                else
    141                   write(*,*) ' hbond> increase parameter MXTYHB'
     142                  write (logString, *)
     143     &               ' hbond> increase parameter MXTYHB'
    142144                  stop
    143145                endif
     
    158160!     enddo
    159161
    160       if (ipr.gt.0) write(*,'(1x,a,/)') ' hbond>  Hydrogen Bonds:'
     162      if (ipr.gt.0) write (logString, '(1x,a,/)')
     163     &   ' hbond>  Hydrogen Bonds:'
    161164
    162165      if (ntyhb.gt.0) then
     
    287290      adab=valang(id,ia,ib)*crd
    288291
    289       write(*,*) '  '
    290       write(*,*) ' Dah: ',dah,' Dad: ',dad
    291       write(*,*) ' Adha: ',adha,' Ahab: ',adha,' Adab: ',adab
    292       write(*,*) '  '
     292      write (logString, *) '  '
     293      write (logString, *) ' Dah: ',dah,' Dad: ',dad
     294      write (logString, *) ' Adha: ',adha,' Ahab: ',adha,' Adab: ',adab
     295      write (logString, *) '  '
    293296
    294297      return
  • init_energy.f

    r32289cd r38d77eb  
    6666
    6767!----Initialize solvation part if necessary
    68       write (*,*) 'init_energy: itysol = ',itysol
    69       write(*,*) 'init_energy: esol_scaling = ',isolscl
     68      write (logString, *) 'init_energy: itysol = ',itysol
     69      write (logString, *) 'init_energy: esol_scaling = ',isolscl
    7070
    7171      its = iabs(itysol)
     
    8282
    8383        if (itysol.ne.0) then
    84           write(*,'(a)') ' init_energy>  undefined solvent type !'
     84          write (logString, '(a)')
     85     &      ' init_energy>  undefined solvent type !'
    8586          stop
    8687        endif
     
    9697      return
    9798
    98  10   write (*, '(a)') 'Cannot open the file with surface points'
     99 10   write (logString,  '(a)')
     100     &   'Cannot open the file with surface points'
    99101      stop
    100102
  • main.f

    r32289cd r38d77eb  
    8181
    8282      ntlml = 0
    83       write (*,*) 'Solvent: ', itysol
     83      write (logString, *) 'Solvent: ', itysol
    8484!     Initialize random number generator.
    8585      call sgrnd(31433)
     
    118118       lrand = .true.
    119119       E = energy()
    120        write(*,*) E, eyel,eyvw,eyhb,eyvr
     120       write (logString, *) E, eyel,eyvw,eyhb,eyvr
    121121       call outpdb(1, "polyA.pdb")
    122122!      Canonical Monte Carlo
    123 !        call canon(nequi, nsweep, nmes, temp, lrand)
     123       call canon(nequi, nsweep, nmes, temp, lrand)
    124124
    125125!      For simulated annealing uncomment the lines below
  • main_bgl_p.f

    r32289cd r38d77eb  
    5757      call mpi_init(ierr)
    5858!       call pmi_cart_comm_create(comm_cart,ierr)
    59       write(*,*) "Initialized MPI. Now setting up communicators."
     59      write (logString, *) "Initialized MPI. Now setting up communicators."
    6060      call flush(6)
    6161      ndims = 4
     
    8181      call MPI_Cart_GET(comm_cart, ndims, dims, periods, coords, ierr)
    8282
    83       write(*,*) ndims, dims, periods, coords
     83      write (logString, *) ndims, dims, periods, coords
    8484      call flush(6)
    8585!       call VTSetup()
     
    192192     &      + (coords(3)/ldims(3))*nblock(1)*nblock(2)
    193193
    194       write(*,*) myrank, color, ldims, nblock
     194      write (logString, *) myrank, color, ldims, nblock
    195195
    196196      call mpi_comm_split(comm_cart,color,myrank,local_comm,ierr)
     
    216216!          call mpi_group_range_incl(group_world, 1, proc_range, group(i)
    217217!      &                              ,error)
    218 !          write (*,*) "Assigning rank ", j, proc_range,
     218!          write (logString, *) "Assigning rank ", j, proc_range,
    219219!      &               "to group", group(i)
    220220!          call flush(6)
     
    227227!              my_mpi_comm = comm(i)
    228228!              rep_id = i - 1
    229 !              write (*,*) rep_id, "has comm", my_mpi_comm
     229!              write (logString, *) rep_id, "has comm", my_mpi_comm
    230230!              call flush(6)
    231231!          endif
     
    233233!
    234234! c     Setup the communicator used for parallel tempering
    235 !       write (*,*) "PTGroup=", ranks(:num_replica)
     235!       write (logString, *) "PTGroup=", ranks(:num_replica)
    236236!       call flush(6)
    237237!       call mpi_group_incl(group_world, num_replica, ranks, group_partem,
     
    241241!
    242242!       if (partem_comm.ne.MPI_COMM_NULL) then
    243 !          write (*,*) partem_comm,myrank, "is master for ", rep_id, "."
     243!          write (logString, *) partem_comm,myrank, "is master for ", rep_id, "."
    244244!       endif
    245245
     
    247247      call mpi_comm_size(my_mpi_comm,no,ierr)
    248248      rep_id = color
    249       write (*,*) "My new rank is ", myrank, "of", no
     249      write (logString, *) "My new rank is ", myrank, "of", no
    250250      call flush(6)
    251251      if (myrank.eq.0) then
    252252         color = 1
    253          write (*,*) 'My rank and color:', myrank, color
     253         write (logString, *) 'My rank and color:', myrank, color
    254254         call flush(6)
    255255      else
     
    258258      call mpi_comm_split(comm_cart,color,0,partem_comm,ierr)
    259259
    260 !       write(*,*) "Finalizing MPI."
     260!       write (logString, *) "Finalizing MPI."
    261261!       call flush(6)
    262262!       CALL mpi_finalize(ierr)
     
    295295
    296296!     ========================================  start of parallel tempering run
    297       write (*,*) "There are ", no,
     297      write (logString, *) "There are ", no,
    298298     &            " processors available for ",rep_id
    299299      call flush(6)
     
    309309
    310310      if(my_pt_rank.eq.0) then
    311          write(*,*) "time for simulation using ", num_proc,
     311         write (logString, *) "time for simulation using ", num_proc,
    312312     &        " processors =",  endwtime - startwtime, " seconds"
    313313         call flush(6)
  • main_p.f

    r32289cd r38d77eb  
    151151         call mpi_group_range_incl(group_world, 1, proc_range, group(i)
    152152     &                              ,error)
    153          write (*,*) "Assigning rank ", j, proc_range,
     153         write (logString, *) "Assigning rank ", j, proc_range,
    154154     &               "to group", group(i)
    155155         call flush(6)
     
    162162             my_mpi_comm = comm(i)
    163163             rep_id = i - 1
    164              write (*,*) rep_id, "has comm", my_mpi_comm
     164             write (logString, *) rep_id, "has comm", my_mpi_comm
    165165             call flush(6)
    166166         endif
     
    168168
    169169!     Setup the communicator used for parallel tempering
    170       write (*,*) "PTGroup=", ranks(:num_replica)
     170      write (logString, *) "PTGroup=", ranks(:num_replica)
    171171      call flush(6)
    172172      call mpi_group_incl(group_world, num_replica, ranks, group_partem,
     
    176176
    177177      if (partem_comm.ne.MPI_COMM_NULL) then
    178          write (*,*) partem_comm,myrank, "is master for ", rep_id, "."
     178         write (logString, *) partem_comm,myrank, "is master for ",
     179     &      rep_id, "."
    179180      endif
    180181
     
    182183      call mpi_comm_size(my_mpi_comm,no,ierr)
    183184
    184       write (*,*) "My new rank is ", myrank, "of", no
     185      write (logString, *) "My new rank is ", myrank, "of", no
    185186      call flush(6)
    186187! = Done setting up communicators =====================================
     
    220221
    221222!     ========================================  start of parallel tempering run
    222       write (*,*) "There are ", no,
     223      write (logString, *) "There are ", no,
    223224     &            " processors available for ",rep_id
    224225      call flush(6)
     
    234235
    235236      if(my_pt_rank.eq.0) then
    236          write(*,*) "time for simulation using ", num_proc,
     237         write (logString, *) "time for simulation using ", num_proc,
    237238     &        " processors =",  endwtime - startwtime, " seconds"
    238239         call flush(6)
  • metropolis.f

    r32289cd r38d77eb  
    172172      enw = energy()
    173173      if(abs(eol-enw).gt.0.000001)  then
    174          write(*,*) 'metropolis: eol,enw,difference:', eol, enw, eol-enw
     174         write (logString, *) 'metropolis: eol,enw,difference:', eol,
     175     &      enw, eol-enw
    175176         if (eol.lt.100000) then
    176177            stop 'metropolis: eol and enw difference unacceptable'
  • mincjg.f

    r32289cd r38d77eb  
    5757     &          d(mxn),xa(mxn),ga(mxn),dt(mxn),yt(mxn),gt(mxn)
    5858
    59 
     59      character(255) logString
     60     
    6061      ier = 0
    6162      iter = 0
     
    9394
    9495      if ( gdit .ge. 0.d0 ) then
    95         write(*,*) ' mincjg>  search direction is uphill'
     96        write (logString, *) ' mincjg>  search direction is uphill'
    9697        ier = 3
    9798        goto 6
     
    162163
    163164          ier=2
    164           write(*,*) ' mincjg>  too small step in search direction'
     165          write (logString, *)
     166     &       ' mincjg>  too small step in search direction'
    165167        endif
    166168
     
    230232      if ( iter .ge. (iterfm + MXFCON) ) then
    231233        ier = 4
    232         write(*,*) ' mincjg>  line search failed to reduce function'
     234        write (logString, *)
     235     &    ' mincjg>  line search failed to reduce function'
    233236        return
    234237      endif
     
    304307      call move(nfun,n,f,x,g)
    305308
    306       write(*,*) ' mincjg> ier = ',ier
     309      write (logString, *) ' mincjg> ier = ',ier
    307310
    308311      return
  • minim.f

    r32289cd r38d77eb  
    5858
    5959      if (msv.gt.msvmx) then
    60         write (*,'(a,i5)') ' minreg> parameter MSV > ',msvmx
     60        write (logString, '(a,i5)') ' minreg> parameter MSV > ',msvmx
    6161        stop
    6262      endif
     
    6666      call gradient()
    6767
    68       write(*,'(/,a,/)') ' Energy BEFORE minimization:'
     68      write (logString, '(/,a,/)') ' Energy BEFORE minimization:'
    6969
    7070      if (ireg.eq.0) then
    7171
    72         write (*,'(a,e12.5,/,3(a,e11.4),/,2(a,e11.4),/)') ' Total: ',
    73      &    eysm,
     72        write (logString, '(a,e12.5,/,3(a,e11.4),/,2(a,e11.4),/)')
     73     &    ' Total: ', eysm,
    7474     &    '   Coulomb: ',eyel,' Lennard-Jones: ',eyvw,' HB: ',eyhb,
    7575     &    '   Variables: ',eyvr,'  Solvatation: ',eysl
     
    7878
    7979
    80         write (*,'(a,e12.5,/,3(a,e11.4),/,3(a,e11.4),/)') ' Total: ',
    81      &    wtey*eysm + wtrg*eyrg,
     80        write (logString, '(a,e12.5,/,3(a,e11.4),/,3(a,e11.4),/)')
     81     &    ' Total: ', wtey*eysm + wtrg*eyrg,
    8282     &    '   Coulomb: ',eyel,' Lennard-Jones: ',eyvw,' HB: ',eyhb,
    8383     &    '   Variables: ',eyvr,'  Solvatation: ',eysl,
     
    148148!          gdrg2 = max(acc,gdrg2)
    149149!          wtrg = wtrg * sqrt(gdey2/gdrg2)
    150 !          write(*,*)  ' -->    Wt_energy = ',wtey,'  Wt_regul. = ',wtrg
    151 !          write(*,*)  '  '
     150!          write (logString, *)  ' -->    Wt_energy = ',wtey,'  Wt_regul. = ',wtrg
     151!          write (logString, *)  '  '
    152152!        endif
    153153
     
    184184
    185185      if (nop.lt.mxop) then
    186         write (*,'(a)') ' ---- CONVERGENCE ----'
     186        write (logString, '(a)') ' ---- CONVERGENCE ----'
    187187      else
    188         write (*,'(a)')  '---- STEP LIMIT ----'
    189       endif
    190 
    191 
    192       write (*,'(/,2a,/)') ' Final energies ',
     188        write (logString, '(a)')  '---- STEP LIMIT ----'
     189      endif
     190
     191
     192      write (logString, '(/,2a,/)') ' Final energies ',
    193193     & '__________________________________________________'
    194194
     
    197197      if (ireg.eq.0) then
    198198
    199         write (*,'(a,e12.5,/,3(a,e11.4),/,2(a,e11.4))') ' Total: ',eysm,
    200      &  '   Coulomb: ',eyel,' Lennard-Jones: ',eyvw,' HB: ',eyhb,
    201      &  '   Variables: ',eyvr,'  Solvatation: ',eysl
     199        write (logString, '(a,e12.5,/,3(a,e11.4),/,2(a,e11.4))')
     200     &  ' Total: ',eysm,'   Coulomb: ',eyel,' Lennard-Jones: ',eyvw,
     201     &  ' HB: ',eyhb, '   Variables: ',eyvr,'  Solvatation: ',eysl
    202202
    203203      else
    204204
    205         write (*,'(a,e12.5,/,3(a,e11.4),/,3(a,e11.4))') ' Total: ',
    206      &      wtey*eysm + wtrg*eyrg,
     205        write (logString, '(a,e12.5,/,3(a,e11.4),/,3(a,e11.4))')
     206     &  ' Total: ', wtey*eysm + wtrg*eyrg,
    207207     &  '   Coulomb: ',eyel,' Lennard-Jones: ',eyvw,' HB: ',eyhb,
    208208     &  '   Variables: ',eyvr,'  Solvatation: ',eysl,
     
    211211      endif
    212212
    213       write (*,'(/,a,/)') ' Variables _________________'
     213      write (logString, '(/,a,/)') ' Variables _________________'
    214214
    215215      nv = 0
     
    221221          if (abs(vr).gt.pi) vr=vr-sign(pi2,vr)
    222222
    223           write (*,'(1x,a,1x,i4,f8.1,a,f5.1,a)') nmvr(i),nursvr(i),
    224      &        vr*crd,'    (',abs(difang(vr,vlvro(i)))*crd,')'
     223          write (logString, '(1x,a,1x,i4,f8.1,a,f5.1,a)') nmvr(i),
     224     &        nursvr(i), vr*crd,'    (',abs(difang(vr,vlvro(i)))*crd,')'
    225225
    226226          vlvr(i) = vr
     
    231231      if (ireg.ne.0) then
    232232
    233         write (*,'(/,a,/)') ' Global Variables ___________'
     233        write (logString,'(/,a,/)') ' Global Variables ___________'
    234234
    235235        do i=1,ntlml
    236           write(*,*) ' Molecule #',i,' old          new'
     236          write (logString, *) ' Molecule #',i,' old          new'
    237237          do j=1,3
    238             write(*,*) gbpro(j,i),' ',gbpr(j,i)
     238            write (logString, *) gbpro(j,i),' ',gbpr(j,i)
    239239          enddo
    240240          do j=4,6
    241             write(*,*) gbpro(j,i)*crd,' ',gbpr(j,i)*crd
     241            write (logString, *) gbpro(j,i)*crd,' ',gbpr(j,i)*crd
    242242          enddo
    243243        enddo
     
    245245      endif
    246246
    247       write (*,'(/,2a)') ' Gradient ',
     247      write (logString,'(/,2a)') ' Gradient ',
    248248     & '______________________________________________________________'
    249249
    250       write (*,'(8(1x,f8.3))') (gdvr(i),i=1,nv)
     250      write (logString,'(8(1x,f8.3))') (gdvr(i),i=1,nv)
    251251
    252252      if (ireg.ne.0) then
    253253
    254         write (*,*) ' -------------- global variables ------------'
    255         write (*,'(6(1x,f8.3))') (gdvr(i+nv),i=1,ngbvr)
     254        write (logString, *)
     255     &             ' -------------- global variables ------------'
     256        write (logString, '(6(1x,f8.3))') (gdvr(i+nv),i=1,ngbvr)
    256257
    257258      endif
     
    336337        esm=eysm
    337338
    338         write (*,'(a,i5,a,2(e13.6,a))') ' Step ',nop,': energy ',esm
    339      &                                 ,'  (',gdsmey,' )'
     339        write (logString, '(a,i5,a,2(e13.6,a))') ' Step ',nop,
     340     &                    ': energy ', esm, '  (',gdsmey,' )'
    340341
    341342      else
     
    355356        esm=wtey*eysm+wtrg*eyrg
    356357
    357         write (*,'(a,i5,a,3(e13.6,a))') ' Step ',nop,': energy ',esm
    358      &                                 ,'  (',gdsmey,',',gdsmrg,' )'
     358        write (logString, '(a,i5,a,3(e13.6,a))') ' Step ',nop,
     359     &             ': energy ',esm,'  (',gdsmey,',',gdsmrg,' )'
    359360
    360361      endif
  • minqsn.f

    r32289cd r38d77eb  
    6666      integer ir
    6767
    68 
     68      character(255) logString
     69     
    6970      parameter ( eps1=0.1d0,
    7071     &            eps2=0.7d0,
     
    142143
    143144    3 if (nfun.ge.maxfun) then
    144 !c        write (*,*) ' minfor> exceeded max. number of function calls'
     145!c        write (logString, *) ' minfor> exceeded max. number of function calls'
    145146        return
    146147      endif
     
    224225            goto 2
    225226          else               ! rank of new matrix is deficient
    226             write (*,*) ' minfor> rank of hessian < number of variables'
     227            write (logString, *)
     228     &       ' minfor> rank of hessian < number of variables'
    227229            return
    228230          endif
  • mklist.f

    r32289cd r38d77eb  
    4545      ntlms=nmsml(nml)
    4646      if (ntlms.eq.0) then
    47         write (*,'(a,i4)')
     47        write (logString, '(a,i4)')
    4848     &           ' mklist> No mov. sets defined in molecule #',nml
    4949        nvwml(nml)=0
     
    107107                n2i=n2i+1
    108108                if (n2i.gt.mx2) then
    109                   write (*,'(a,i3,2a)')  ' mklist> Molecule # ',nml,
     109                  write(logString, '(a,i3,2a)')  ' mklist> Molecule # ',
     110     &                nml,
    110111     &                ': too many atoms bound to ',nmat(iob)
    111112                  stop
     
    125126                    n2i=n2i+1
    126127                    if (n2i.gt.mx2) then
    127                       write (*,'(a,i3,a)')  ' mklist> Molecule # '
     128                      write (logString, '(a,i3,a)') 
     129     &                         ' mklist> Molecule # '
    128130     &                         ,nml,': too many atoms in list L2I'
    129131                      stop
     
    141143                n2i=n2i+1
    142144                if (n2i.gt.mx2) then
    143                   write (*,'(a,i3,2a)')  ' mklist> Molecule # '
     145                  write (logString, '(a,i3,2a)')  ' mklist> Molecule # '
    144146     &             ,nml,': too many atoms bound to ',nmat(iob)
    145147                  stop
     
    165167              n1i=n1i+1
    166168              if (n1i.gt.mxbd) then
    167                 write (*,'(a,i3,2a)')  ' mklist> Molecule # ',nml,
     169                write (logString, '(a,i3,2a)')  ' mklist> Molecule # ',
     170     &              nml,
    168171     &             ': too many atoms bound to ',nmat(ib)
    169172                stop
     
    177180                  n2i=n2i+1
    178181                  if (n2i.gt.mx2) then
    179                     write (*,'(a,i3,2a)')  ' mklist> Molecule # ',nml,
    180      &              ': too many atoms bound to branches of ',nmat(ib)
     182                    write (logString, '(a,i3,2a)') 
     183     &                 ' mklist> Molecule # ',nml,
     184     &                 ': too many atoms bound to branches of ',nmat(ib)
    181185                    stop
    182186                  endif
     
    194198                n2i=n2i+1
    195199                if (n2i.gt.mx2) then
    196                   write (*,'(a,i3,a)')  ' mklist> Molecule # ',nml,
    197      &            ': too many atoms n list L2I '
     200                  write (logString, '(a,i3,a)')  ' mklist> Molecule # ',
     201     &               nml,
     202     &               ': too many atoms n list L2I '
    198203                  stop
    199204                endif
     
    207212! ________________________________________ Current 2ND list -> VdW-interact.
    208213              if ((nvw+n2nd).gt.mxvw) then
    209                 write (*,'(a,i4,a,i5)') ' mklist> Molecule # ',nml,
     214                write (logString, '(a,i4,a,i5)') ' mklist> Molecule # ',
     215     &            nml,
    210216     &            ': Number of vdw-domains > ',mxvw
    211217                stop
     
    273279! ____________________________________________ Summary
    274280!      do i=ifiat,ilaat
    275 !        write (*,'(3a,i5,a)') ' ######## atom ',nmat(i),'(',i,')'
     281!        write (logString, '(3a,i5,a)') ' ######## atom ',nmat(i),'(',i,')'
    276282!        iv1=ivwat1(i)
    277283!        iv2=ivwat2(i)
    278284!        if (iv1.le.iv2) then
    279 !          write(*,'(a)') ' ---> vdW :'
     285!          write (logString, '(a)') ' ---> vdW :'
    280286!          do j=iv1,iv2
    281 !            write (*,'(i5,a,i5)') lvwat1(j),'-',lvwat2(j)
     287!            write (logString, '(i5,a,i5)') lvwat1(j),'-',lvwat2(j)
    282288!          enddo
    283289!        endif
     
    285291!        i42=i14at2(i)
    286292!        if (i41.le.i42) then
    287 !          write(*,'(a)') ' ---> 1-4 :'
    288 !          write(*,'(10i5)') (l14at(j),j=i41,i42)
     293!          write (logString, '(a)') ' ---> 1-4 :'
     294!          write (logString, '(10i5)') (l14at(j),j=i41,i42)
    289295!        endif
    290296!      enddo
     
    292298      return
    293299
    294     1 write (*,'(a,i4,a,i5)') ' mklist> Molecule # ',nml,
     300    1 write (logString, '(a,i4,a,i5)') ' mklist> Molecule # ',nml,
    295301     &                     ': Number of 1-4 interactions > ',mx14
    296302      stop
     
    312318      implicit none
    313319      integer mx, j, n, j1, l1, j2, l2, i1, i2, ja, k
    314 
     320      character(255) logString
    315321      dimension l1(mx),l2(mx)
    316322
     
    334340              n=n+1
    335341              if (n.gt.mx) then
    336                 write (*,'(a)') ' quench> too many sets'
     342                write (logString, '(a)') ' quench> too many sets'
    337343                stop
    338344              endif
  • mulcan_par.f

    r32289cd r38d77eb  
    8383!
    8484      eol = energy()
    85       write (*,'(a,e12.5,/)')  'Energy of start configuration: ',eol
    86       write(*,*)
     85      write (logString, '(a,e12.5,/)')  'Energy of start configuration: ',eol
     86      write (logString, *)
    8787
    8888      call outpdb(1, 'start.pdb')
     
    100100       muold = int(min(xmax,max(xmin,eol/ebin+sign(0.5d0,eol))))
    101101       ihist(muold) = ihist(muold) + 1
    102        write (*,*) nsw, eol, acz
     102       write (logString, *) nsw, eol, acz
    103103!
    104104! ITERATE MULTICANONICAL WEIGHTS EVERY NUP SWEEPS
     
    143143! FINAL OUTPUT:
    144144      acz = acz/dble(nsw*nvr)
    145       write(*,*) 'last energy',eol
    146       write(*,*) 'aczeptance rate:',acz
     145      write (logString, *) 'last energy',eol
     146      write (logString, *) 'aczeptance rate:',acz
    147147!
    148148! OUTPUT OF FINAL HISTOGRAM
    149149!
    150       write(*,*) 'Histogram:'
     150      write (logString, *) 'Histogram:'
    151151      do i=kmin,kmax
    152152       if(xhist(i).gt.0.0d0) then
    153         write(*,*) i,xhist(i)
     153        write (logString, *) i,xhist(i)
    154154       end if
    155155      end do
  • mulcan_par_mod.f90

    r32289cd r38d77eb  
    103103
    104104      eol = energy()
    105       write (*,'(a,e12.5,/)')  'Energy of start configuration: ',eol
    106       write(*,*)
     105      write (logString, '(a,e12.5,/)')  'Energy of start configuration: ',eol
     106      write (logString, *)
    107107
    108108      call outpdb(1, 'start.pdb')
     
    158158! Final output
    159159      acz = acz/dble(nsw*nvr)
    160       write(*,*) 'last energy',eol
    161       write(*,*) 'acceptance rate:',acz
    162 
    163       write(*,*) 'Histogram:'
     160      write (logString, *) 'last energy',eol
     161      write (logString, *) 'acceptance rate:',acz
     162
     163      write (logString, *) 'Histogram:'
    164164      do i=kmin,kmax
    165165       if(xhist(i).gt.0.0d0) then
    166         write(*,*) i,xhist(i)
     166        write (logString, *) i,xhist(i)
    167167       end if
    168168      end do
     
    266266       end do
    267267      end do
    268       write(*,*) 'Number of contacts in reference conformation:',nci
     268      write (logString, *) 'Number of contacts in reference conformation:',nci
    269269
    270270! Read in fields with multicanonical parameter
     
    282282        vlvr(iv) = x
    283283       end do
    284        write(*,*) 'Last iteration, energy:',nswm,eol_old
     284       write (logString, *) 'Last iteration, energy:',nswm,eol_old
    285285      else
    286286! _________________________________ random start
     
    294294
    295295      eol = energy()
    296       write (*,'(e12.5,/)')  eol
     296      write (logString, '(e12.5,/)')  eol
    297297      call contacts(nhy,nhx,dham)
    298       write(*,*) 'Number of contacts in start configuration:',nhy
    299       write(*,*) 'Number of native contacts in start configuration:',   &
     298      write (logString, *) 'Number of contacts in start configuration:',nhy
     299      write (logString, *) 'Number of native contacts in start configuration:',   &
    300300     &            nhx
    301301      do i=1,nresi
    302        write(*,'(62I1)') (ijcont(i,j), j=1,nresi)
    303       end do
    304       write(*,*)
     302       write (logString, '(62I1)') (ijcont(i,j), j=1,nresi)
     303      end do
     304      write (logString, *)
    305305
    306306
     
    355355
    356356      acz = acz/dble(nsw*nvr)
    357       write(*,*) 'last energy',eol
    358       write(*,*) 'acceptance rate:',acz
     357      write (logString, *) 'last energy',eol
     358      write (logString, *) 'acceptance rate:',acz
    359359
    360360! WRITE DOWN (UN-REWEIGHTED) HISTOGRAM OF MULTICANONICAL SIMULATION
    361361      do i=kmin,kmax
    362362       if(xhist(i).gt.0.0d0) then
    363         write(*,*) i,xhist(i)
     363        write (logString, *) i,xhist(i)
    364364       end if
    365365      end do
  • mulcan_sim.f

    r32289cd r38d77eb  
    7272       end do
    7373      end do
    74       write(*,*) 'Number of contacts in reference conformation:',nci
     74      write (logString, *) 'Number of contacts in reference conformation:',nci
    7575
    7676! READ IN FIELDS WITH MULTICANONICAL PARAMETER
     
    8888        vlvr(iv) = x
    8989       end do
    90        write(*,*) 'Last iteration, energy:',nswm,eol_old
     90       write (logString, *) 'Last iteration, energy:',nswm,eol_old
    9191      else
    9292! _________________________________ random start
     
    100100!
    101101      eol = energy()
    102       write (*,'(e12.5,/)')  eol
     102      write (logString, '(e12.5,/)')  eol
    103103      call contacts(nhy,nhx,dham)
    104       write(*,*) 'Number of contacts in start configuration:',nhy
    105       write(*,*) 'Number of native contacts in start configuration:',
     104      write (logString, *) 'Number of contacts in start configuration:',nhy
     105      write (logString, *) 'Number of native contacts in start configuration:',
    106106     &            nhx
    107107      do i=1,nresi
    108        write(*,'(62I1)') (ijcont(i,j), j=1,nresi)
    109       end do
    110       write(*,*)
     108       write (logString, '(62I1)') (ijcont(i,j), j=1,nresi)
     109      end do
     110      write (logString, *)
    111111!
    112112
     
    165165! FINAL OUTPUT:
    166166      acz = acz/dble(nsw*nvr)
    167       write(*,*) 'last energy',eol
    168       write(*,*) 'aczeptance rate:',acz
     167      write (logString, *) 'last energy',eol
     168      write (logString, *) 'aczeptance rate:',acz
    169169
    170170! WRITE DOWN (UN-REWEIGHTED) HISTOGRAM OF MULTICANONICAL SIMULATION
    171171      do i=kmin,kmax
    172172       if(xhist(i).gt.0.0d0) then
    173         write(*,*) i,xhist(i)
     173        write (logString, *) i,xhist(i)
    174174       end if
    175175      end do
  • nursvr.f

    r32289cd r38d77eb  
    3333      enddo
    3434
    35       write (*,'(a,i5)') ' nursvr > Cannot find variable # ',ivr
     35      write (logString, '(a,i5)') ' nursvr > Cannot find variable # '
     36     &   ,ivr
    3637      stop
    3738
     
    7071      enddo
    7172
    72       write (*,'(a,i5)') ' nursat > Cannot find atom # ',iat
     73      write (logString, '(a,i5)') ' nursat > Cannot find atom # ',iat
    7374      stop
    7475
  • opeflx.f

    r32289cd r38d77eb  
    6060      ntlvr=nvrml(nml)
    6161      if (ntlvr.eq.0) then
    62         write (*,'(a,i4)')
     62        write (logString, '(a,i4)')
    6363     &           ' opeflx> No variables defined in molecule #',nml
    6464        return
     
    504504      gda=gdeyvr(iv)         ! analytical der.
    505505
    506       write (*,'(1x,2a,2(e12.6,a))') nmvr(iv),': ',gda,' (',
     506      write (logString, '(1x,2a,2(e12.6,a))') nmvr(iv),': ',gda,' (',
    507507     &       abs(gda-gdn),')'
    508508
  • opereg.f

    r32289cd r38d77eb  
    5454      ntlvr=nvrml(nml)
    5555      if (ntlvr.eq.0) then
    56         write (*,'(a,i4)')
     56        write (logString, '(a,i4)')
    5757     &           ' opereg> No variables defined in molecule #',nml
    5858        return
     
    330330        gdn = ( enyreg(nml) - eyrg ) / del
    331331
    332         write (*,*) ' Gb. var #',(ii+i),': ',gdeygb(ii+i),gdn,
     332        write (logString, *) ' Gb. var #',(ii+i),': ',gdeygb(ii+i),gdn,
    333333     &                                   abs(gdn-gdeygb(ii+i))
    334334! ----------------------------- restore
     
    382382      gda=gdeyrg(iv)         ! analytical der.
    383383
    384       write (*,'(1x,2a,2(e12.6,a))') nmvr(iv),': ',gda,' (',
     384      write (logString, '(1x,2a,2(e12.6,a))') nmvr(iv),': ',gda,' (',
    385385     &       abs(gda-gdn),')'
    386386
  • opeshe.f

    r32289cd r38d77eb  
    5151      ntlvr=nvrml(nml)
    5252      if (ntlvr.eq.0) then
    53         write (*,'(a,i4)')
     53        write (logString, '(a,i4)')
    5454     &           ' opeshe> No variables defined in molecule #',nml
    5555        return
     
    377377      gda=gdeyvr(iv)         ! analytical der.
    378378
    379       write (*,'(1x,2a,2(e12.6,a))') nmvr(iv),': ',gda,' (',
     379      write (logString, '(1x,2a,2(e12.6,a))') nmvr(iv),': ',gda,' (',
    380380     &       abs(gda-gdn),')'
    381381
  • opesol.f

    r32289cd r38d77eb  
    5151      ntlvr=nvrml(nml)
    5252      if (ntlvr.eq.0) then
    53         write (*,'(a,i4)')
     53        write (logString, '(a,i4)')
    5454     &           ' opesol> No variables defined in molecule #',nml
    5555        return
     
    283283      gdn=(eynw-eysl)/del    ! numerical derivative
    284284
    285       write (*,'(1x,2a,2(e12.6,a))') nmvr(iv),': ',gda,' (',
     285      write (logString, '(1x,2a,2(e12.6,a))') nmvr(iv),': ',gda,' (',
    286286     &       abs(gda-gdn),')'
    287287
  • outpdb.f

    r32289cd r38d77eb  
    4343
    4444      if (nml.lt.0.or.nml.gt.ntlml) then
    45         write(*,*) ' outpdb>  No such molecule #',nml,' !'
     45        write (logString, *) ' outpdb>  No such molecule #',nml,' !'
    4646        return
    4747      elseif (nml.gt.0) then
  • outvar.f

    r32289cd r38d77eb  
    3030
    3131      if (nml.lt.0.or.nml.gt.ntlml) then
    32         write(*,*) ' outvar>  No such molecule #',nml,' !'
     32        write (logString, *) ' outvar>  No such molecule #',nml,' !'
    3333        return
    3434      endif
     
    5757
    5858      if (nml.lt.0.or.nml.gt.ntlml) then
    59         write(*,*) ' outvbs>  No such molecule #',nml,' !'
     59        write (logString, *) ' outvbs>  No such molecule #',nml,' !'
    6060        return
    6161      elseif (nml.gt.0) then
  • partem_p.f

    r32289cd r38d77eb  
    9595      trackID = 1
    9696      odd = 1
    97       write (*,*) 'Starting parallel tempering.'
    98       write (*,*) 'parameters, ',switch,newsta,nmes,nswp,nmes,
     97      write (logString, *) 'Starting parallel tempering.'
     98      write (logString, *) 'parameters, ',switch,newsta,nmes,nswp,nmes,
    9999     &            rep_id, num_rep, partem_comm, myrank
    100100      call flush(6)
     
    167167            do i=1,num_rep
    168168               read(13,*) j,inode(i),intem(i),yol(i),e_minp(i),h_maxp(i)
    169                write (*,*) "par_R.in:",i,j
     169               write (logString, *) "par_R.in:",i,j
    170170            end do
    171171            jold=(iold/nmes)*num_rep
     
    178178     &              ,idum1, idum2, idum3, e_min
    179179     &              ,dummy, dummy
    180                write (*,*) i
     180               write (logString, *) i
    181181               call flush(6)
    182182            end do
     
    197197      e_min = e_minp(rep_id+1)
    198198      h_max = h_maxp(rep_id+1)
    199       write (*,*) "E_min=",e_min," for ", rep_id + 1
     199      write (logString, *) "E_min=",e_min," for ", rep_id + 1
    200200      eol=energy()
    201201      if(.not.newsta.and.abs(yol(rep_id + 1) - eol).gt.0.1) then
    202          write(*,*) rep_id, ' Warning: yol(rep_id).ne.eol:'
    203          write(*,*) rep_id, yol(rep_id + 1), eol
     202         write (logString, *) rep_id, ' Warning: yol(rep_id).ne.eol:'
     203         write (logString, *) rep_id, yol(rep_id + 1), eol
    204204      endif
    205205!     Start of simulation
    206       write (*,*) '[',rep_id, myrank, beta, partem_comm,
     206      write (logString, *) '[',rep_id, myrank, beta, partem_comm,
    207207     &            '] Energy before equilibration:', eol
    208208!     =====================Equilibration by canonical Metropolis
     
    211211      end do
    212212      CALL MPI_BARRIER(MPI_COMM_WORLD,IERR)
    213       write (*,*) '[',rep_id,'] Energy after equilibration:', eol
     213      write (logString, *) '[',rep_id,'] Energy after equilibration:',
     214     &   eol
    214215      call flush(6)
    215216!     
     
    222223         eol0 = eol
    223224         if (myrank.eq.0.and.rep_id.eq.0) then
    224             write (*,*) "Finished sweep", nsw
     225            write (logString, *) "Finished sweep", nsw
    225226            call flush(6)
    226227         endif
     
    494495     &                IERR)
    495496               if (myrank.ne.0) then
    496 !                  write (*,*) '[', myrank,'] Missed', randomCount,
     497!                  write (logString, *) '[', myrank,'] Missed', randomCount,
    497498!     &                            'random numbers.'
    498499                  do i = 1, randomCount
    499500                     rd = grnd()
    500 !                     write (*,*) '[', myrank,'] rd=', rd
     501!                     write (logString, *) '[', myrank,'] rd=', rd
    501502                  enddo
    502503               endif
     
    519520      e_final=energy()
    520521      if (partem_comm.ne.MPI_COMM_NULL) then
    521          write (*,*) rep_id, ' E_final', e_final
     522         write (logString, *) rep_id, ' E_final', e_final
    522523      endif
    523524      eol0 = eol
  • partem_s.f

    r32289cd r38d77eb  
    148148               CALL METROPOLIS(energ,acz,can_weight)
    149149            end do
    150             write(*,*) 'Start energy after equilibration for replica:',
    151      &                 k, energ
     150            write (logString, *)
     151     &         'Start energy after equilibration for replica:',k, energ
    152152            do i=1,nvr
    153153               iv = idvr(i)
  • pdbread.f

    r32289cd r38d77eb  
    3232      dimension cor(3)
    3333      character atm*4,rsn*3,rsno*3,chn,chno,
    34      &          rsid*5,rsido*5,line*132
     34     &          rsid*5,rsido*5,line*132, logString*255
    3535
    3636      natp=0
     
    4848        lunpdb = 99
    4949      else
    50         write (*,'(a)')
     50        write (logString, '(a)')
    5151     &    ' pdbread> empty file name to read pdb-structure'
    5252
     
    5757
    5858      if (io.le.0) then
    59         write (*,'(a,/,a)')
     59        write (logString, '(a,/,a)')
    6060     &  ' pdbread> ERROR opening file to read pdb-structure: ',
    6161     &  pdbfil(1:iendst(pdbfil))
     
    7070
    7171      if ( line(17:17).ne.' ' )  then
    72         write (*,'(a,/,a,/,a,/,2a)')
     72        write (logString, '(a,/,a,/,a,/,2a)')
    7373     &  ' pdbread> found alternate atom location: ',
    7474     &  '                !',
     
    8686
    8787      if ((natp+1).gt.MXATP) then
    88         write (*,'(a,i5,a,/,a)')
     88        write (logString, '(a,i5,a,/,a)')
    8989     &  ' pdbread>  >MXATP (',MXATP,') ATOM lines in PDB file ',
    9090     &  pdbfil(1:iendst(pdbfil))
     
    9797
    9898        if ((nchp+1).gt.MXCHP) then
    99           write (*,'(a,i3,a,/,a)')
     99          write (logString, '(a,i3,a,/,a)')
    100100     &    ' pdbread>  >MXCHP (',MXCHP,') chains in PDB file ',
    101101     &    pdbfil(1:iendst(pdbfil))
     
    106106
    107107        if ((nrsp+1).gt.MXRSP) then
    108           write (*,'(a,i3,a,/,a)')
     108          write (logString, '(a,i3,a,/,a)')
    109109     &    ' pdbread>  >MXRSP (',MXRSP,') residues in PDB file ',
    110110     &    pdbfil(1:iendst(pdbfil))
     
    141141
    142142        if ((nrsp+1).gt.MXRSP) then
    143           write (*,'(a,i3,a,/,a)')
     143          write (logString, '(a,i3,a,/,a)')
    144144     &    ' pdbread>  >MXRSP (',MXRSP,') residues in PDB file ',
    145145     &    pdbfil(1:iendst(pdbfil))
     
    172172      goto 1
    173173
    174     2 write (*,'(a,/,a,/,2a)')
     174    2 write (logString, '(a,/,a,/,2a)')
    175175     &  ' pdbread> ERROR reading ATOM line ',
    176176     &  line(:l),
     
    195195      else
    196196
    197         write (*,'(a,/,a)')
     197        write (logString, '(a,/,a)')
    198198     &  ' pdbread> NO atom coordinates selected from file ',
    199199     &  pdbfil(1:iendst(pdbfil))
     
    245245        nml=nml+1
    246246        if (nml.gt.mxml) then
    247           write(*,'(a,i4,2a)')' pdbvars> NUMBER of chains > '
     247          write (logString, '(a,i4,2a)')' pdbvars> NUMBER of chains > '
    248248     &                          ,mxml,' in ',' ?'
    249249          stop
     
    266266
    267267          if (nrs.gt.mxrs) then
    268             write(*,'(a,i4,2a)') ' pdbvars> NUMBER of residues > '
    269      &                       ,mxrs,' in ',' ?'
     268            write (logString, '(a,i4,2a)')
     269     &         ' pdbvars> NUMBER of residues > ', mxrs, ' in ',' ?'
    270270            stop
    271271          endif
     
    421421            zat(ii)=zatp(ix)
    422422          else
    423             write(*,'(3a)') ' pdbvars> missing PDB atom ',nmat(ii),
    424      &       ' is ref. point for SMMP - cannot proceed !'
     423            write (logString, '(3a)') ' pdbvars> missing PDB atom ',
     424     &         nmat(ii), ' is ref. point for SMMP - cannot proceed !'
    425425          endif
    426426        enddo
     
    436436! ++++++++++
    437437
    438        write(*,*) ' '
    439        write(*,*) ' Initial RMSD ',rmsd
     438       write (logString, *) ' '
     439       write (logString, *) ' Initial RMSD ',rmsd
    440440
    441441      enddo ! chains(molecules)
     
    485485            enddo
    486486
    487 !            write(*,'(8a)') ' pdbvars> ',atm,' not found in '
     487!            write (logString, '(8a)') ' pdbvars> ',atm,' not found in '
    488488!     #       ,chnp(nc),' ',rsidp(irs),' ',rsnmp(irs)
    489489
  • redseq.f

    r32289cd r38d77eb  
    3636
    3737      if (iopfil(lunseq,seqfil,'old','formatted').le.izero) then
    38         write (*,'(a,/,a,i3,2a)')
     38        write (logString, '(a,/,a,i3,2a)')
    3939     &    ' redseq> ERROR opening sequence file:',
    4040     &      ' LUN=',lunseq,' FILE=',seqfil(1:iendst(seqfil))
     
    6767
    6868            if ((nrs-irsml1(ntlml)+1).eq.0) then
    69               write(*,'(2a)') ' redseq> IGNORE molecule: ',
     69              write (logString, '(2a)') ' redseq> IGNORE molecule: ',
    7070     &                        nmml(ntlml)(1:iendst(nmml(ntlml)))
    7171              ntlml=ntlml-1
     
    7474          ntlml=ntlml+1
    7575          if (ntlml.gt.mxml) then
    76             write(*,'(a,i4,2a)')' redseq> NUMBER of molecules > '
     76            write (logString, '(a,i4,2a)')
     77     &                          ' redseq> NUMBER of molecules > '
    7778     &                          ,mxml,' in ',seqfil(1:iendst(seqfil))
    7879            close(lunseq)
     
    124125
    125126          if (id.gt.4) then
    126             write (*,'(4a)') ' redseq> INVALID residue NAME >',
     127            write (logString, '(4a)') ' redseq> INVALID residue NAME >',
    127128     &                       line(ib:ii),'< in ',
    128129     &      seqfil(1:iendst(seqfil))
     
    133134            nrs=nrs+1
    134135            if (nrs.gt.mxrs) then
    135               write(*,'(a,i4,2a)') ' redseq> NUMBER of residues > '
     136              write (logString, '(a,i4,2a)')
     137     &                       ' redseq> NUMBER of residues > '
    136138     &                       ,mxrs,' in ',seqfil(1:iendst(seqfil))
    137139              close(lunseq)
     
    162164
    163165      if (nrs.eq.0) then
    164         write (*,'(2a)') ' redseq> no residues found in ',
     166        write (logString, '(2a)') ' redseq> no residues found in ',
    165167     &                   seqfil(1:iendst(seqfil))
    166168        stop
     
    179181          if (i.eq.ntlml) then   ! Check last molecule
    180182            if ((nrs-ifirs+1).eq.0) then
    181               write(*,'(2a)') ' redseq> IGNORE molecule '
     183              write (logString, '(2a)') ' redseq> IGNORE molecule '
    182184     &                        ,nmml(ntlml)(1:iendst(nmml(ntlml)))
    183185              ntlml=ntlml-1
    184186              if (ntlml.eq.0) then
    185                 write (*,'(2a)') ' redseq> no residues found in ',
    186      &          seqfil(1:iendst(seqfil))
     187                write (logString, '(2a)')
     188     &             ' redseq> no residues found in ',
     189     &             seqfil(1:iendst(seqfil))
    187190                stop
    188191              endif
     
    192195          endif
    193196
    194 !          write (*,'(/,a,i4,2a)') ' redseq> ',irsml2(i)-irsml1(i)+1,
     197!          write (logString, '(/,a,i4,2a)') ' redseq> ',irsml2(i)-irsml1(i)+1,
    195198!     &           ' residue(s) in molecule: ',
    196199!     &           nmml(i)(1:iendst(nmml(i)))
    197 !          write (*,'(15(1x,a))') (seq(j),j=irsml1(i),irsml2(i))
     200!          write (logString, '(15(1x,a))') (seq(j),j=irsml1(i),irsml2(i))
    198201
    199202        enddo
     
    203206! _______________________________________________ error
    204207
    205     4 write (*,'(a,i4,2a)') ' redseq> ERROR reading line No. ',nln,
     208    4 write (logString, '(a,i4,2a)') ' redseq> ERROR reading line No. ',nln,
    206209     & ' in ',seqfil(1:iendst(seqfil))
    207210      close(lunseq)
  • redstr.f

    r32289cd r38d77eb  
    3030
    3131      character spr,blnk,str*(*),strn*(*)
     32      character*255 logString
    3233     
    3334      data blnk/' '/
     
    3637
    3738      if (spr.eq.blnk) then
    38         write (*,*) ' extstr> Separator should not be blank'
     39        write (logString, *) ' extstr> Separator should not be blank'
    3940        stop
    4041      endif
     
    7980      return
    8081! ______________________________________________________________ Error
    81     1 write (*,'(a)') ' extstr> Substring to be extracted is too long !'
     82    1 write (logString, '(a)')
     83     &   ' extstr> Substring to be extracted is too long !'
    8284      stop
    8385
  • redvar.f

    r32289cd r38d77eb  
    101101      ntlvr=ivrml1(ntlml)+nvrml(ntlml)-1
    102102      if (ntlvr.eq.0) then
    103         write (*,*) ' redvar> No variables defined in molecule(s)'
     103        write(logString,*)'redvar> No variables defined in molecule(s)'
    104104        return
    105105      endif
     
    108108      io=iopfil(lunvar,varfil,'old','formatted')
    109109      if (io.eq.0) then
    110         write (*,'(a,/,a,i3,2a)')
     110        write (logString, '(a,/,a,i3,2a)')
    111111     &    ' redvar> ERROR opening file to set variables:',
    112112     &    ' LUN=',lunvar,' FILE=',varfil(1:iendst(varfil))
     
    136136          vr=blat(iatvr(i))
    137137        else
    138           write(*,*) 'redvar>  unknown variable type: ',it,' !'
     138          write(logString,*) 'redvar>  unknown variable type: ',it,' !'
    139139          stop
    140140        endif
     
    159159            if (iredin(lincmd,nml).le.0.or.
    160160     &          nml.le.0.or.nml.gt.ntlml) then
    161               write (*,*) 'redvar> ','Incorrect molecule number >',
     161              write (logString, *)
     162     &                 'redvar> ','Incorrect molecule number >',
    162163     &                    lincmd(1:l),'<  Must be in range [1,',
    163164     &                    ntlml,'] !'
     
    310311
    311312                        if (inum.le.0.or.inum.gt.ntlml) then
    312                           write (*,*) ' # 1: ',inum
     313                          write (logString, *) ' # 1: ',inum
    313314                          goto 104
    314315                        endif
     
    324325
    325326                            if (k.lt.nfi.or.k.gt.irsml2(j)) then
    326                               write (*,*) ' # 2: ',inum
     327                              write (logString, *) ' # 2: ',inum
    327328                              goto 104
    328329                            endif
     
    343344                                if (l.lt.nfi.or.
    344345     &                              l.gt.nfi+nvrrs(k)-1) then
    345                                   write (*,*) ' # 3: ',inum
     346                                  write (logString, *) ' # 3: ',inum
    346347                                  goto 104
    347348                                endif
     
    427428
    428429                    if (ide.eq.1.and.ihy.eq.ide) then
    429                       write (*,*) ' # 4: ',ide
     430                      write (logString, *) ' # 4: ',ide
    430431                      goto 104
    431432                    endif
     
    441442                      if (iredin(linh,ibz).le.0.or.ibz.le.0)
    442443     &                  then
    443                         write (*,*) ' # 5 '
     444                        write (logString, *) ' # 5 '
    444445                        goto 104
    445446                      endif
     
    456457                      if (iredin(linh,iez).le.0.or.iez.le.0.or.
    457458     &                  iez.lt.ibz) then
    458                         write (*,*) ' # 6 '
     459                        write (logString, *) ' # 6 '
    459460                        goto 104
    460461                      endif
     
    524525                endif
    525526              enddo
    526               if (.not.did) write (*,'(3a)')
     527              if (.not.did) write (logString, '(3a)')
    527528     &          ' redvar> No variables affected by command >',
    528529     &          lincmd(1:ice),'<'
     
    531532              ll1=ibegst(linfld(nfld))
    532533              ll2=iendst(linfld(nfld))
    533               write (*,*) 'll1,ll2, linfld(nfld): ',ll1,ll2,
     534              write (logString, *) 'll1,ll2, linfld(nfld): ',ll1,ll2,
    534535     &           '>',linfld(nfld)(ll1:ll2),'<'
    535536
     
    559560             enddo
    560561
    561              write (*,'(3a,/,1x,5(a,2x),a)') ' redvar> ',nmml(i)(1:ie),
     562             write (logString, '(3a,/,1x,5(a,2x),a)') ' redvar> ',
     563     &                               nmml(i)(1:ie),
    562564     &                                    ' with global parameters:',
    563565     &                              (strg(k)(ibegst(strg(k)):),k=1,6)
     
    579581                did=.true.
    580582                if (fxvr(iv)) then
    581                   write (*,'(3a,i4,1x,4a,f10.3,a)') ' redvar> ',
     583                  write(logString,'(3a,i4,1x,4a,f10.3,a)') ' redvar> ',
    582584     &                nmml(i)(1:ie),': residue ',j-jb,seq(j),
    583585     &                ': ',nmvr(iv),' set ',vlvrx(iv),'   Fixed'
    584586                else
    585                   write (*,'(3a,i4,1x,4a,f10.3)') ' redvar> ',
     587                  write (logString, '(3a,i4,1x,4a,f10.3)') ' redvar> ',
    586588     &                nmml(i)(1:ie),': residue ',j-jb,seq(j),
    587589     &                ': ',nmvr(iv),' set ',vlvrx(iv)
     
    597599          enddo
    598600          if (did) then
    599             if (in.gt.0) write (*,'(3a,i5,a)')
     601            if (in.gt.0) write (logString, '(3a,i5,a)')
    600602     &        ' redvar> Molecule ',nmml(i)(1:ie),': ',in,
    601603     &        ' variable(s) remain unchanged'
    602604            call setvar(iml,vlvrx)
    603605          else
    604             write (*,'(3a)') ' redvar> Molecule ',
     606            write (logString, '(3a)') ' redvar> Molecule ',
    605607     &        nmml(i)(1:ie),': No internal variables changed'
    606608          endif
     
    610612      return
    611613! ____________________________________________________________ Errors
    612   100 write (*,'(3a)') ' redvar> Cannot interpret command >',
     614  100 write (logString, '(3a)') ' redvar> Cannot interpret command >',
    613615     &                 lincmd(1:ice),'<'
    614616      close(lunvar)
    615617      stop
    616   101 write (*,'(a,i5,a)') ' redvar> Command number ',ncmd,' reached'
     618  101 write (logString, '(a,i5,a)') ' redvar> Command number ',ncmd,
     619     &       ' reached'
    617620      close(lunvar)
    618621      stop
    619   102 write (*,'(3a)') ' redvar> Cannot read value from >',
     622  102 write (logString, '(3a)') ' redvar> Cannot read value from >',
    620623     &                   lincmd(1:ice),'<'
    621624      close(lunvar)
    622625      stop
    623   103 write (*,'(a,i3,3a)') ' redvar> Cannot read >',maxide,
     626  103 write (logString, '(a,i3,3a)') ' redvar> Cannot read >',maxide,
    624627     &         ' identifiers from >',linfld(ii)(1:ife),'<'
    625628      close(lunvar)
    626629      stop
    627   104 write (*,'(5a)') ' redvar> Error in identifier >',
     630  104 write (logString, '(5a)') ' redvar> Error in identifier >',
    628631     &            linide(1:ide),'< of command >',lincmd(1:ice),'<'
    629632      close(lunvar)
    630633      stop
    631   105 write (*,'(a,/,a,/,2a,/)') ' redvar> line with global paramters:',
     634  105 write (logString, '(a,/,a,/,2a,/)')
     635     &                           ' redvar> line with global paramters:',
    632636     &                           line(1:ile),' must contain 6 floating',
    633637     &                           ' point numbers separated by commas !'
     
    635639      stop
    636640
    637   106 write (*,'(a,/,a,/,2a,/)') ' redvar> line with global paramters:',
     641  106 write (logString, '(a,/,a,/,2a,/)')
     642     &                           ' redvar> line with global paramters:',
    638643     &                           line(1:ile),' angles must be inside ',
    639644     &'ranges [-180,180], [-90,90], and [-180,180] Deg., respectively !'
  • regul.f

    r32289cd r38d77eb  
    4444      wtey = 0.d0
    4545
    46       write(*,'(/,a,2(a,f4.2),/)')
     46      write (logString, '(/,a,2(a,f4.2),/)')
    4747     &  ' ====================== Regularization only',
    4848     &  '   Wt(energy) = ',wtey,'  Wt(regul.) = ',wtrg
     
    5050      call minim(2, nsteps, acc)
    5151
    52       write(*,*) ' '
    53       write(*,*) ' ---------- contacts after 1st regularization'
    54       write(*,*) ' '
     52      write (logString, *) ' '
     53      write (logString, *) ' -------- contacts after 1st regularization'
     54      write (logString, *) ' '
    5555      call cnteny(nml)
    56       write(*,*) ' '
     56      write (logString, *) ' '
    5757
    5858      nrs = irsml2(nml)-irsml1(nml)+1
    5959      call rmsdopt(nml,1,nrs,ixatp,xatp,yatp,zatp,0,rm,av1,av2,rmsd)
    6060
    61       write(*,*) ' RMSD = ',rmsd
     61      write (logString, *) ' RMSD = ',rmsd
    6262
    6363! --------------------------------------- fix vars. defined in PDB
     
    7070      ireg = 0
    7171
    72       write(*,'(/,a,2(a,f4.2),/)')
     72      write (logString, '(/,a,2(a,f4.2),/)')
    7373     &  ' ====================== Internal Energy for Hydrogens only',
    7474     &  '   Wt(energy) = ',wtey,'  Wt(regul.) = ',wtrg
     
    7676      call minim(1, nsteps, acc)
    7777
    78       write(*,*) ' '
    79       write(*,*) ' ---------- contacs after Emin. for hydrogens'
    80       write(*,*) ' '
     78      write (logString, *) ' '
     79      write (logString, *) ' -------- contacs after Emin. for hydrogens'
     80      write (logString, *) ' '
    8181      call cnteny(nml)
    8282
     
    9898        wtey = 1.d0 - wtrg
    9999
    100         write(*,'(/,a,i2,2(a,e11.3),/)')
     100        write (logString, '(/,a,i2,2(a,e11.3),/)')
    101101     &    ' ================ Minimization #',it,
    102102     &        '   Wt(energy) = ',wtey,'  Wt(regul.) = ',wtrg
     
    107107        call rmsdopt(nml,1,nrs,ixatp,xatp,yatp,zatp,0,rm,av1,av2,rmsd)
    108108
    109         write(*,*) ' '
    110         write(*,*) ' RMSD = ',rmsd
     109        write (logString, *) ' '
     110        write (logString, *) ' RMSD = ',rmsd
    111111
    112112      enddo
    113113
    114       write(*,*) ' '
    115       write(*,*) ' ---------- contacts after full regularization'
    116       write(*,*) ' '
     114      write (logString, *) ' '
     115      write (logString, *) ' ------- contacts after full regularization'
     116      write (logString, *) ' '
    117117      call cnteny(nml)
    118118
     
    120120
    121121! Output of dihedral angles of the regularized structure
    122       write(*,*) 'Dihedral angles of the regularized structure;'
     122      write (logString, *)
     123     &   'Dihedral angles of the regularized structure;'
    123124      call outvar(nml, 'regd.var')
    124125
  • rgyr.f

    r32289cd r38d77eb  
    4848
    4949      if (nat.le.0) then
    50         write (*,'(a,i4)')
     50        write (logString, '(a,i4)')
    5151     &     ' rgyr> No atoms found for molecule #',nml
    5252        return
  • rmsdfun.f

    r32289cd r38d77eb  
    8282
    8383      if (nml.lt.1.or.nml.gt.ntlml) then
    84         write(*,*) ' rmsdopt>  Sorry, there is no molecule #',nml
     84        write (logString, *) ' rmsdopt>  Sorry, there is no molecule #',
     85     &     nml
    8586        stop
    8687      endif
     
    137138
    138139      if (n.lt.3) then
    139         write(*,*) ' rmsdopt>  <3 atoms selected !'
     140        write (logString, *) ' rmsdopt>  <3 atoms selected !'
    140141        stop
    141142      endif
     
    290291      integer n,nrot,i,ip,iq,j
    291292
    292 
     293      character(255) logString
    293294      real*8 a(n,n),d(n),v(n,n),
    294295     &       c,g,h,s,sm,t,tau,theta,tresh,b(NMAX),z(NMAX),smeps
     
    403404      enddo
    404405
    405       write(*,*) ' jacobi> too many iterations'
     406      write (logString, *) ' jacobi> too many iterations'
    406407      stop
    407408
  • setmvs.f

    r32289cd r38d77eb  
    7777
    7878      if (ntlvr.eq.0) then
    79         write (*,'(a,i4)')
     79        write (logString, '(a,i4)')
    8080     &           ' setmvs> No variables defined in molecule #',nml
    8181        nmsml(nml)=0
     
    176176              if (i1.ne.0) then  ! combine ranges
    177177                if (j.gt.(i2+1).or.k.lt.(i1-1)) then
    178                   write (*,'(3a,/,2a,i4,a,i3)')
     178                  write (logString, '(3a,/,2a,i4,a,i3)')
    179179     &             ' setmvs> Cannot combine disjunct ranges of atom',
    180180     &             ' indices for torsion ',nmvr(iv),' in residue ',
     
    198198
    199199        if ((nms+1).gt.mxms) then
    200           write (*,'(a,i4,a,i5)') ' setmvs> Molecule # ',nml,
     200          write (logString, '(a,i4,a,i5)') ' setmvs> Molecule # ',nml,
    201201     &    ': Number of moving sets > ',mxms
    202202          stop
     
    231231                  nms=nms+1
    232232                  if (nms.gt.mxms) then
    233                     write (*,'(a,i4,a,i5)') ' setmvs> Molecule # ',
     233                    write (logString, '(a,i4,a,i5)')
     234     &                ' setmvs> Molecule # ',
    234235     &               nml,': Number of moving sets > ',mxms
    235236                     stop
     
    320321            nad=nad+1
    321322            if (nad.gt.mxvr) then
    322               write (*,'(a,i4,a,i5)') ' setmvs> Molecule # ',nml,
     323              write (logString, '(a,i4,a,i5)') ' setmvs> Molecule # ',
     324     &                         nml,
    323325     &                         ': Number of added variables > ',mxvr
    324326              stop
     
    335337                nad=nad+1
    336338                if (nad.gt.mxvr) then
    337                   write (*,'(a,i4,a,i5)') ' setmvs> Molecule # ',nml,
     339                  write (logString, '(a,i4,a,i5)')
     340     &                         ' setmvs> Molecule # ',nml,
    338341     &                         ': Number of added variables > ',mxvr
    339342                  stop
     
    349352              nad=nad+1
    350353              if (nad.gt.mxvr) then
    351                 write (*,'(a,i4,a,i5)') ' setmvs> Molecule # ',nml,
     354                write (logString, '(a,i4,a,i5)') ' setmvs> Molecule # ',
     355     &                       nml,
    352356     &                       ': Number of added variables > ',mxvr
    353357                stop
     
    375379!            i2=latms2(i)
    376380!            if (i.eq.i1s) then
    377 !              write (*,'(a,i3,7a,i4,3a,i4,a)') 'res # ',nursvr(iv),
     381!              write (logString, '(a,i3,7a,i4,3a,i4,a)') 'res # ',nursvr(iv),
    378382!     #        ' var: ',nmvr(iv),' base:',nmat(ib),'    atoms= ',
    379383!     #        nmat(i1),'(',i1,') - ',nmat(i2),'(',i2,')'
    380384!            else
    381 !              write (*,'(39x,2a,i4,3a,i4,a)')
     385!              write (logString, '(39x,2a,i4,3a,i4,a)')
    382386!     #        nmat(i1),'(',i1,') - ',nmat(i2),'(',i2,')'
    383387!            endif
    384388!          enddo
    385389!        else
    386 !          write (*,'(a,i3,5a)') 'res # ',nursvr(iv),
     390!          write (logString, '(a,i3,5a)') 'res # ',nursvr(iv),
    387391!     #    ' var: ',nmvr(iv),' base:',nmat(ib),'  No atoms'
    388392!        endif
     
    390394!        i2a=iadvr2(iv)
    391395!        if (i1a.le.i2a) then
    392 !          write (*,'(a,30(1x,a))') ' Depending variables:',
     396!          write (logString, '(a,30(1x,a))') ' Depending variables:',
    393397!     #                    (nmvr(ladvr(i)),i=i1a,i2a)
    394398!        else
    395 !          write (*,'(a)') ' No dep. variables'
     399!          write (logString, '(a)') ' No dep. variables'
    396400!        endif
    397401!      enddo
     
    400404      return
    401405
    402     6 write (*,'(a,i4,/,2(a,i5),a)')
     406    6 write (logString, '(a,i4,/,2(a,i5),a)')
    403407     & ' setmvs> Error in atom numbering of molecule # ',nml,
    404408     & ': atom ranges for variables # ',iv,' and # ',jv,
  • utilities.f

    r32289cd r38d77eb  
    6666      end do
    6767      ipps = isum / num_ppr
    68       write (*,*) "Total number of interactions:", isum
    69       write (*,*) "Average # of interactions per processor", ipps
     68      write (logString, *) "Total number of interactions:", isum
     69      write (logString, *) "Average # of interactions per processor",
     70     &   ipps
    7071
    7172      totalct = 0
     
    101102     &            .lt.abs(totalct + isum - itarget))) then
    102103               workPerProcessor(nml, irank) = io + 1
    103 !                write (*,*) io + 1, totalct, itarget
     104!                write (logString, *) io + 1, totalct, itarget
    104105            else
    105106               workPerProcessor(nml, irank) = io
    106 !                write (*,*) io, totalct + isum, itarget
     107!                write (logString, *) io, totalct + isum, itarget
    107108            end if
    108109            irank = irank + 1
     
    127128!     rank = 11
    128129!     fileName = fileNameMP('base_0000.dat', 6, 9, rank)
    129 !     write (*,*), fileName
     130!     write (logString, *), fileName
    130131!     \endcode
    131132!     will output base_0011.dat.
Note: See TracChangeset for help on using the changeset viewer.