Changeset 38d77eb for addend.f


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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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
Note: See TracChangeset for help on using the changeset viewer.