Changeset 38d77eb for pdbread.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
  • 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
Note: See TracChangeset for help on using the changeset viewer.