- Timestamp:
- 09/05/08 11:49:42 (16 years ago)
- Branches:
- master
- Children:
- fafe4d6
- Parents:
- 2ebb8b6
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
addend.f
r2ebb8b6 rbd2278d 1 c**************************************************************2 c 3 c 4 cThis file contains the subroutines: addend, redchg, rplgrp5 c 6 cCopyright 2003-2005 Frank Eisenmenger, U.H.E. Hansmann,7 cShura Hayryan, Chin-Ku8 cCopyright 2007 Frank Eisenmenger, U.H.E. Hansmann,9 cJan H. Meinke, Sandipan Mohanty10 c 11 c$Id: addend.f 334 2007-08-07 09:23:59Z meinke $12 c**************************************************************1 ! ************************************************************** 2 ! 3 ! 4 ! This file contains the subroutines: addend, redchg, rplgrp 5 ! 6 ! Copyright 2003-2005 Frank Eisenmenger, U.H.E. Hansmann, 7 ! Shura Hayryan, Chin-Ku 8 ! Copyright 2007 Frank Eisenmenger, U.H.E. Hansmann, 9 ! Jan H. Meinke, Sandipan Mohanty 10 ! 11 ! $Id: addend.f 334 2007-08-07 09:23:59Z meinke $ 12 ! ************************************************************** 13 13 subroutine addend(nml,grpn,grpc) 14 14 15 c..............................................................16 cPURPOSE: modify terminal residues to complete bonding scheme17 cwith residue 'grpn' at N- and residue 'grpc' at C-terminus18 c! need initial co-ordinates for residues to modify19 c! for N-terminus: may add only simple groups20 c 21 cCALLS: rplgrp,tolost,redchg22 c..............................................................15 ! .............................................................. 16 ! PURPOSE: modify terminal residues to complete bonding scheme 17 ! with residue 'grpn' at N- and residue 'grpc' at C-terminus 18 ! ! need initial co-ordinates for residues to modify 19 ! ! for N-terminus: may add only simple groups 20 ! 21 ! CALLS: rplgrp,tolost,redchg 22 ! .............................................................. 23 23 24 24 include 'INCL.H' … … 35 35 36 36 if (grn(:3).eq.'ace'.or.grc(:3).eq.'ace' 37 #.or.grn(:3).eq.'nme'.or.grc(:3).eq.'nme') then37 &.or.grn(:3).eq.'nme'.or.grc(:3).eq.'nme') then 38 38 39 39 write(*,'(2a)') ' addend> N-Acetyl (ace) or N-Methylamide (nme)' 40 #,' should be put in SEQUENCE file, not added as end groups'40 & ,' should be put in SEQUENCE file, not added as end groups' 41 41 42 42 stop 43 43 endif 44 44 45 c__________________________________________ N-terminus45 ! __________________________________________ N-terminus 46 46 ifirs=irsml1(nml) 47 47 rpat='n ' … … 55 55 else 56 56 write (*,'(2a)') ' addend> ', 57 #' No N-terminal Hyp possible with ECEPP/3 dataset'57 & ' No N-terminal Hyp possible with ECEPP/3 dataset' 58 58 stop 59 59 endif … … 83 83 84 84 write(*,'(2a)') ' addend> Can add only ', 85 *'nh2 or nh3+ to N-terminus'85 & 'nh2 or nh3+ to N-terminus' 86 86 stop 87 87 … … 94 94 95 95 write(*,'(2a)') ' addend> Acetyl group', 96 #' at N-terminus not modified'97 endif 98 99 c__________________________________________ C-terminus96 & ' at N-terminus not modified' 97 endif 98 99 ! __________________________________________ C-terminus 100 100 ilars=irsml2(nml) 101 101 rpat='c ' … … 124 124 125 125 write(*,'(2a)') ' addend> Can add only ', 126 #'cooh or coo- to C-terminus'126 & 'cooh or coo- to C-terminus' 127 127 stop 128 128 … … 135 135 136 136 write(*,'(2a)') ' addend> N-Methylamide', 137 #' at C-terminus not modified'138 139 endif 140 141 c----------------------------- net charge of molecule137 & ' at C-terminus not modified' 138 139 endif 140 141 ! ----------------------------- net charge of molecule 142 142 cg = 0.d0 143 143 do i=iatrs1(irsml1(nml)),iatrs2(irsml2(nml)) … … 145 145 enddo 146 146 if (abs(cg).gt.1.d-5) write(*,'(a,i2,a,f7.3,/)') 147 #' addend> Net charge of molecule #'148 #,nml,': ',cg147 & ' addend> Net charge of molecule #' 148 & ,nml,': ',cg 149 149 150 150 return 151 151 end 152 c****************************************152 ! **************************************** 153 153 subroutine rplgrp(nml,nrs,rpat,sbrs) 154 154 155 c...............................................................156 cPURPOSE: replace atom(s) rooted at atom 'rpat' in residue157 c'nrs' of molecule 'nml' by atom(s) rooted at158 c'rpat' of residue 'sbrs' (same name of root159 catom 'rpat' maintains bonding geometry for160 cpreceeding atoms in 'nrs')161 c 162 cis NOT performed if 'rpat' is within mainchain,163 cexcept it is first/last mainchain atom of 'nml'164 c 165 cCALLS: dihedr,iopfil,iendst,eyring,fndbrn,redres,setsys,valang166 c...............................................................155 ! ............................................................... 156 ! PURPOSE: replace atom(s) rooted at atom 'rpat' in residue 157 ! 'nrs' of molecule 'nml' by atom(s) rooted at 158 ! 'rpat' of residue 'sbrs' (same name of root 159 ! atom 'rpat' maintains bonding geometry for 160 ! preceeding atoms in 'nrs') 161 ! 162 ! is NOT performed if 'rpat' is within mainchain, 163 ! except it is first/last mainchain atom of 'nml' 164 ! 165 ! CALLS: dihedr,iopfil,iendst,eyring,fndbrn,redres,setsys,valang 166 ! ............................................................... 167 167 168 168 include 'INCL.H' … … 180 180 nfi=iatrs1(nrs) 181 181 nla=iatrs2(nrs) 182 c__________________________ indices of atoms to be replaced182 ! __________________________ indices of atoms to be replaced 183 183 do i=nfi,nla 184 184 if (rpat.eq.nmat(i)) then … … 188 188 enddo 189 189 write (*,'(4a,i4,a,i4)') ' rplgrp> cannot find atom >',rpat, 190 #'< to be replaced in residue ',seq(nrs),nrs,' of molecule ',nml190 &'< to be replaced in residue ',seq(nrs),nrs,' of molecule ',nml 191 191 stop 192 192 … … 218 218 if (ibdrg.ne.0) then 219 219 write (*,'(2a,i3)') 220 #' rplgrp> Can handle only simple ring at 1st',221 #' atom of molecule #',nml220 & ' rplgrp> Can handle only simple ring at 1st', 221 & ' atom of molecule #',nml 222 222 stop 223 223 endif … … 245 245 else 246 246 write (*,'(4a,i4,a,i4)') 247 #' rplgrp> Cannot replace BACKBONE atom ',rpat,248 #' of residue ',seq(nrs),nrs,' in molecule #',nml247 & ' rplgrp> Cannot replace BACKBONE atom ',rpat, 248 & ' of residue ',seq(nrs),nrs,' in molecule #',nml 249 249 stop 250 250 endif 251 251 252 252 endif ! N-terminus 253 c_________________________________ previous atoms253 ! _________________________________ previous atoms 254 254 2 if (nfirp.eq.nfi.and.nrs.eq.ifirs) goto 11 255 255 nxtbb1=iowat(nfirp) 256 256 if (nxtbb1.eq.nfi.and.nrs.eq.ifirs) goto 11 257 257 nxtbb2=iowat(nxtbb1) 258 c_______________________________ get data for substituent atoms258 ! _______________________________ get data for substituent atoms 259 259 3 if (iopfil(lunlib,reslib,'old','formatted').le.izero) then 260 260 write (*,'(a,/,a,i3,2a)') 261 #' rplgrp> ERROR opening library of residues:',262 #' LUN=',lunlib,' FILE=',reslib(1:iendst(reslib))261 & ' rplgrp> ERROR opening library of residues:', 262 & ' LUN=',lunlib,' FILE=',reslib(1:iendst(reslib)) 263 263 stop 264 264 endif 265 265 call redres(sbrs,natsb,nxtsb,nvrsb) 266 266 close (lunlib) 267 c__________________________ indices of substituent atoms267 ! __________________________ indices of substituent atoms 268 268 do i=1,natsb 269 269 if (rpat.eq.nmath(i)) then … … 273 273 enddo 274 274 write (*,'(4a)') ' rplgrp> Cannot find atom >',rpat, 275 #'< in substituent residue ',sbrs275 &'< in substituent residue ',sbrs 276 276 stop 277 277 … … 288 288 enddo ! ... branch atoms 289 289 5 enddo ! ... branches 290 c_________________________________________________ local axes at 'nfirp'290 ! _________________________________________________ local axes at 'nfirp' 291 291 call setsys(nxtbb1,nfirp,nxtbb2,x1,x2,x3,y1,y2,y3,z1,z2,z3) 292 292 … … 298 298 zbaat(nfirp)=z3 299 299 300 c_____________________ add virtual atoms300 ! _____________________ add virtual atoms 301 301 if (ntbb) then 302 302 … … 306 306 sa=snbaat(nxtbb1) 307 307 308 c------------------- Eyring308 ! ------------------- Eyring 309 309 h2=-sa*ct 310 310 h3=-sa*st … … 331 331 st=sntoat(nxtbb1) 332 332 333 c-------------------- Eyring with b.angle = 90 deg.333 ! -------------------- Eyring with b.angle = 90 deg. 334 334 xat(-ione)=xat(izero)-ct*(z2*x3-z3*x2)-st*z1 335 335 yat(-ione)=yat(izero)-ct*(z3*x1-z1*x3)-st*z2 … … 337 337 338 338 endif 339 c_____________________________________________ Shift atom data339 ! _____________________________________________ Shift atom data 340 340 nrp=nlarp-nfirp 341 341 nsb=nlasb-nfisb … … 407 407 408 408 enddo 409 c____________________________________________ Shift residue data409 ! ____________________________________________ Shift residue data 410 410 do i=nrs+1,irsml2(ntlml) 411 411 iatrs1(i)=iatrs1(i)+nsh … … 418 418 nsh=0 419 419 endif 420 c_________________________________________ Correct data of 'nfirp'420 ! _________________________________________ Correct data of 'nfirp' 421 421 ish=nfirp-nfisb 422 422 ityat(nfirp)=ityath(nfisb) … … 450 450 if (nb.gt.mxbd) then 451 451 write (*,'(6a,/,2a,3(i4,a))') 452 #' rplgrp> Cannot add atoms following ',rpat,453 #' from group ',sbrs,' to atom ',rpat,454 #' of residue ',seq(nrs),nrs,' in molecule #',nml,455 #' because need >',(mxbd+1),' bonds'452 & ' rplgrp> Cannot add atoms following ',rpat, 453 & ' from group ',sbrs,' to atom ',rpat, 454 & ' of residue ',seq(nrs),nrs,' in molecule #',nml, 455 & ' because need >',(mxbd+1),' bonds' 456 456 stop 457 457 endif … … 474 474 endif 475 475 nbdat(nfirp)=nb 476 c_________________________________________ Add data for substituent476 ! _________________________________________ Add data for substituent 477 477 ii=nfirp 478 478 do i=nfisb+1,nlasb … … 527 527 528 528 enddo ! substituent atoms 529 c___________________________________________________ Take care of Variables530 c(assume variables of replaced group/substituent to be stored CONSECUTIVELY)529 ! ___________________________________________________ Take care of Variables 530 ! (assume variables of replaced group/substituent to be stored CONSECUTIVELY) 531 531 532 532 ilavr=ivrml1(ntlml)+nvrml(ntlml)-1 … … 610 610 611 611 return 612 c__________________________________________ Errors612 ! __________________________________________ Errors 613 613 10 write (*,'(3a,/,2a,i4,a,i4,/,2a)') 614 #' rplgrp> Cannot replace atom(s) following ',rpat,615 #' from INSIDE a ring',' in residue: ',seq(nrs),nrs,616 #' in molecule #',nml,' or in substitute: ',sbrs614 & ' rplgrp> Cannot replace atom(s) following ',rpat, 615 & ' from INSIDE a ring',' in residue: ',seq(nrs),nrs, 616 & ' in molecule #',nml,' or in substitute: ',sbrs 617 617 stop 618 618 11 write (*,'(4a,i4,a,i4,/,a)') 619 #' rplgrp> Cannot replace atom(s) following ',rpat,620 #' of residue ',seq(nrs),nrs,' in molecule #',nml,621 #' since necessary 2 previous atoms are not available'619 & ' rplgrp> Cannot replace atom(s) following ',rpat, 620 & ' of residue ',seq(nrs),nrs,' in molecule #',nml, 621 & ' since necessary 2 previous atoms are not available' 622 622 stop 623 623 624 624 end 625 c****************************************625 ! **************************************** 626 626 subroutine redchg(nml,nrs,rpat,sbrs) 627 627 628 c.........................................................629 cPURPOSE: read and place atomic point charges from residue630 c'sbrs' to residue 'nrs' of molecule 'nml'631 cfrom library 'chglib' with LUN=lunchg, if ilib=1632 c'reslib' with LUN=lunlib, if ilib=2633 c 634 cCALLS: iopfil,iendst,tolost635 c........................................................628 ! ......................................................... 629 ! PURPOSE: read and place atomic point charges from residue 630 ! 'sbrs' to residue 'nrs' of molecule 'nml' 631 ! from library 'chglib' with LUN=lunchg, if ilib=1 632 ! 'reslib' with LUN=lunlib, if ilib=2 633 ! 634 ! CALLS: iopfil,iendst,tolost 635 ! ........................................................ 636 636 637 637 include 'INCL.H' … … 677 677 if (iopfil(lunchg,chgfil,'old','formatted').le.izero) then 678 678 write (*,'(a,/,a,i3,2a)') 679 #' redchg> ERROR opening library of charges:',680 #' LUN=',lunchg,' FILE=',chgfil(1:iendst(chgfil))679 & ' redchg> ERROR opening library of charges:', 680 & ' LUN=',lunchg,' FILE=',chgfil(1:iendst(chgfil)) 681 681 stop 682 682 endif … … 701 701 enddo 702 702 write (*,'(6a)') ' redchg> Cannot find atom: ',atnm, 703 #' for entry: ',cgty,' in library: ',704 #chgfil(1:iendst(chgfil))703 & ' for entry: ',cgty,' in library: ', 704 & chgfil(1:iendst(chgfil)) 705 705 stop 706 706 2 enddo … … 708 708 else 709 709 write (*,'(4a)') 710 #' redchg> must increase MXATH to read data for entry: ',711 #cgty,' in library: ',chgfil(1:iendst(chgfil))710 & ' redchg> must increase MXATH to read data for entry: ', 711 & cgty,' in library: ',chgfil(1:iendst(chgfil)) 712 712 close(lunchg) 713 713 stop … … 716 716 goto 1 717 717 3 write (*,'(4a)') 718 #' redchg> Cannot find entry: ',cgty,' in library: ',719 #chgfil(1:iendst(chgfil))718 & ' redchg> Cannot find entry: ',cgty,' in library: ', 719 & chgfil(1:iendst(chgfil)) 720 720 close(lunchg) 721 721 stop … … 725 725 if (iopfil(lunlib,reslib,'old','formatted').le.izero) then 726 726 write (*,'(a,/,a,i3,2a)') 727 #' redchg> ERROR opening library of residues:',728 #' LUN=',lunlib,' FILE=',reslib(1:iendst(reslib))727 & ' redchg> ERROR opening library of residues:', 728 & ' LUN=',lunlib,' FILE=',reslib(1:iendst(reslib)) 729 729 stop 730 730 endif … … 748 748 enddo 749 749 write (*,'(6a)') ' redchg> Cannot find atom: ',atnm, 750 #' for entry: ',cgty,' in library: ',751 #reslib(1:iendst(reslib))750 & ' for entry: ',cgty,' in library: ', 751 & reslib(1:iendst(reslib)) 752 752 stop 753 753 5 enddo … … 755 755 else 756 756 write (*,'(4a)') 757 #' redchg> must increase MXATH to read data for entry: ',758 #cgty,' in library: ',reslib(1:iendst(reslib))757 & ' redchg> must increase MXATH to read data for entry: ', 758 & cgty,' in library: ',reslib(1:iendst(reslib)) 759 759 close(lunchg) 760 760 stop … … 763 763 goto 4 764 764 6 write (*,'(4a)') 765 #' redchg> Cannot find entry: ',cgty,' in library: ',766 #reslib(1:iendst(reslib))765 & ' redchg> Cannot find entry: ',cgty,' in library: ', 766 & reslib(1:iendst(reslib)) 767 767 close(lunchg) 768 768 stop … … 771 771 772 772 10 write (*,'(4a)') 773 #' redchg> Do not have charges for N/C-terminal residue ',774 #res,' modified with group :',sbrs773 & ' redchg> Do not have charges for N/C-terminal residue ', 774 & res,' modified with group :',sbrs 775 775 stop 776 776
Note:
See TracChangeset
for help on using the changeset viewer.