- Timestamp:
- 09/05/08 11:49:42 (16 years ago)
- Branches:
- master
- Children:
- fafe4d6
- Parents:
- 2ebb8b6
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
redseq.f
r2ebb8b6 rbd2278d 1 c**************************************************************2 c 3 cThis file contains the subroutines: redseq4 c 5 cCopyright 2003-2005 Frank Eisenmenger, U.H.E. Hansmann,6 cShura Hayryan, Chin-Ku7 cCopyright 2007 Frank Eisenmenger, U.H.E. Hansmann,8 cJan H. Meinke, Sandipan Mohanty9 c 10 c**************************************************************1 !************************************************************** 2 ! 3 ! This file contains the subroutines: redseq 4 ! 5 ! Copyright 2003-2005 Frank Eisenmenger, U.H.E. Hansmann, 6 ! Shura Hayryan, Chin-Ku 7 ! Copyright 2007 Frank Eisenmenger, U.H.E. Hansmann, 8 ! Jan H. Meinke, Sandipan Mohanty 9 ! 10 ! ************************************************************** 11 11 12 12 13 13 subroutine redseq 14 14 15 c............................................................16 cPURPOSE: read 'lunseq' 'seqfil', extract names of molecules,17 csequences18 c 19 cMolecules are separated by lines containing char. '#',20 ca name for the molecule may follow '#' on this line21 cResidue names can be of 1-4 characters to be separated by ' '22 c 23 cReturns: ntlml,nmml,irsml1,irsml2,seq24 c 25 cCALLS: ibegst,iendst,iopfil,tolost26 c............................................................15 ! ............................................................ 16 ! PURPOSE: read 'lunseq' 'seqfil', extract names of molecules, 17 ! sequences 18 ! 19 ! Molecules are separated by lines containing char. '#', 20 ! a name for the molecule may follow '#' on this line 21 ! Residue names can be of 1-4 characters to be separated by ' ' 22 ! 23 ! Returns: ntlml,nmml,irsml1,irsml2,seq 24 ! 25 ! CALLS: ibegst,iendst,iopfil,tolost 26 ! ............................................................ 27 27 28 28 include 'INCL.H' … … 33 33 if (iopfil(lunseq,seqfil,'old','formatted').le.izero) then 34 34 write (*,'(a,/,a,i3,2a)') 35 #' redseq> ERROR opening sequence file:',36 #' LUN=',lunseq,' FILE=',seqfil(1:iendst(seqfil))35 & ' redseq> ERROR opening sequence file:', 36 & ' LUN=',lunseq,' FILE=',seqfil(1:iendst(seqfil)) 37 37 stop 38 38 endif 39 39 40 cntlml=040 ! ntlml=0 41 41 if (ntlml.gt.0) then 42 42 nrs = irsml2(ntlml) … … 56 56 if (ic.gt.0) then ! found '#' 57 57 58 c____________________________________ new molecule58 ! ____________________________________ new molecule 59 59 60 60 if (ntlml.gt.0) then ! check previous molecule … … 64 64 if ((nrs-irsml1(ntlml)+1).eq.0) then 65 65 write(*,'(2a)') ' redseq> IGNORE molecule: ', 66 #nmml(ntlml)(1:iendst(nmml(ntlml)))66 & nmml(ntlml)(1:iendst(nmml(ntlml))) 67 67 ntlml=ntlml-1 68 68 endif … … 71 71 if (ntlml.gt.mxml) then 72 72 write(*,'(a,i4,2a)')' redseq> NUMBER of molecules > ' 73 #,mxml,' in ',seqfil(1:iendst(seqfil))73 & ,mxml,' in ',seqfil(1:iendst(seqfil)) 74 74 close(lunseq) 75 75 stop … … 80 80 81 81 if (ic.le.lg) then 82 c___________________________________ extract name of molecule82 ! ___________________________________ extract name of molecule 83 83 84 84 hlin=blnk … … 99 99 else ! no '#' 100 100 101 c_________________________________________ sequence101 ! _________________________________________ sequence 102 102 103 103 ib=ibegst(line) … … 110 110 111 111 ie=iendst(line) 112 c___________________________________ extract names of residues112 ! ___________________________________ extract names of residues 113 113 2 id=index(line(ib:ie),blnk)-1 ! find next separator 114 114 if (id.gt.0) then … … 121 121 if (id.gt.4) then 122 122 write (*,'(4a)') ' redseq> INVALID residue NAME >', 123 #line(ib:ii),'< in ',124 #seqfil(1:iendst(seqfil))123 & line(ib:ii),'< in ', 124 & seqfil(1:iendst(seqfil)) 125 125 close(lunseq) 126 126 stop … … 130 130 if (nrs.gt.mxrs) then 131 131 write(*,'(a,i4,2a)') ' redseq> NUMBER of residues > ' 132 #,mxrs,' in ',seqfil(1:iendst(seqfil))132 & ,mxrs,' in ',seqfil(1:iendst(seqfil)) 133 133 close(lunseq) 134 134 stop … … 155 155 156 156 3 close(lunseq) 157 c___________________________________ output157 ! ___________________________________ output 158 158 159 159 if (nrs.eq.0) then 160 160 write (*,'(2a)') ' redseq> no residues found in ', 161 #seqfil(1:iendst(seqfil))161 & seqfil(1:iendst(seqfil)) 162 162 stop 163 163 else … … 176 176 if ((nrs-ifirs+1).eq.0) then 177 177 write(*,'(2a)') ' redseq> IGNORE molecule ' 178 #,nmml(ntlml)(1:iendst(nmml(ntlml)))178 & ,nmml(ntlml)(1:iendst(nmml(ntlml))) 179 179 ntlml=ntlml-1 180 180 if (ntlml.eq.0) then 181 181 write (*,'(2a)') ' redseq> no residues found in ', 182 #seqfil(1:iendst(seqfil))182 & seqfil(1:iendst(seqfil)) 183 183 stop 184 184 endif … … 188 188 endif 189 189 190 ccwrite (*,'(/,a,i4,2a)') ' redseq> ',irsml2(i)-irsml1(i)+1,191 cc #' residue(s) in molecule: ',192 cc #nmml(i)(1:iendst(nmml(i)))193 ccwrite (*,'(15(1x,a))') (seq(j),j=irsml1(i),irsml2(i))190 ! write (*,'(/,a,i4,2a)') ' redseq> ',irsml2(i)-irsml1(i)+1, 191 ! & ' residue(s) in molecule: ', 192 ! & nmml(i)(1:iendst(nmml(i))) 193 ! write (*,'(15(1x,a))') (seq(j),j=irsml1(i),irsml2(i)) 194 194 195 195 enddo … … 197 197 endif 198 198 return 199 c_______________________________________________ error199 ! _______________________________________________ error 200 200 201 201 4 write (*,'(a,i4,2a)') ' redseq> ERROR reading line No. ',nln, 202 #' in ',seqfil(1:iendst(seqfil))202 & ' in ',seqfil(1:iendst(seqfil)) 203 203 close(lunseq) 204 204 stop
Note:
See TracChangeset
for help on using the changeset viewer.