********> bugfix.45 Author: Dave Case Date: 9/29/95 Programs: protonate Severity: severe Problem: Crashes with 'error in computed goto'. Cause: PROTON_INFO dbase was updated but corresponding code change was not installed. Fix: Make the following change to protonate/protonate.f -------------------------------------------------------------------------- *** OLD protonate.f --- NEW protonate.f *************** *** 11,17 character*4 inatm(3),it character*4 amide, amidet(3) character*1 ifrst ! logical keep,brook,first,header c dimension protp(3,4) c --- 11,17 ----- character*4 inatm(3),it character*4 amide, amidet(3) character*1 ifrst ! logical keep,brook,first,header,aminot,nterm(MAXAT) c dimension protp(3,4) c *************** *** 20,26 parameter (prot_type = 1, mol = 1, srf = 2) data inatm/'N ','CA ','C '/ data npro/'PRO'/ ! data first /.true./ c line='----------------------------------------' keep = .false. --- 20,27 ----- parameter (prot_type = 1, mol = 1, srf = 2) data inatm/'N ','CA ','C '/ data npro/'PRO'/ ! data first,aminot /.true.,.true./ ! data nterm /MAXAT*.false./ c line='----------------------------------------' keep = .false. *************** *** 86,91 else isoldp(iat) = .false. end if iat=iat+1 else if (inline(1:3).eq.'END') then go to 40 --- 87,96 ----- else isoldp(iat) = .false. end if + if (namat(iat)(1:2).eq.'N '.and. aminot) then + if(iat.eq.1 .or. nares(iat-1).ne.'ACE') nterm(iat) = .true. + aminot = .false. + end if iat=iat+1 else if (inline(1:3).eq.'TER') then aminot = .true. *************** *** 87,92 isoldp(iat) = .false. end if iat=iat+1 else if (inline(1:3).eq.'END') then go to 40 endif --- 92,99 ----- aminot = .false. end if iat=iat+1 + else if (inline(1:3).eq.'TER') then + aminot = .true. else if (inline(1:3).eq.'END') then go to 40 endif *************** *** 176,182 do 120 l=1,3 iatom(l)=inatm(l) 120 continue ! if (ires(j).eq.1) then call atfind(3,ires(j)) call hydros(10,3,nhyd,protp) do 130 n=1,nhyd --- 183,189 ----- do 120 l=1,3 iatom(l)=inatm(l) 120 continue ! if (nterm(j)) then call atfind(3,ires(j)) call hydros(10,3,nhyd,protp) do 130 n=1,nhyd *************** *** 292,298 c*****coordinates of required non-proton atoms c dimension protp(3,4),r1(3),r2(3),r3(3),r4(3),r5(3),r6(3) ! dimension dh(12),det(3) logical keep,brook common /both/sc(3,6),ipopt,icount,keep,brook c --- 299,305 ----- c*****coordinates of required non-proton atoms c dimension protp(3,4),r1(3),r2(3),r3(3),r4(3),r5(3),r6(3) ! dimension dh(13),det(3) logical keep,brook common /both/sc(3,6),ipopt,icount,keep,brook c *************** *** 299,305 c -- following values taken from CRC handbook, 59th edition, c p. F-215: c ! data (dh(i),i=1,12) 1 /1.084,1.073,1.070,1.084,1.101,1.084, 1 0.96, 1.01, 1.01, 1.014,1.073,1.070/ rad=3.141593/180.0 --- 306,312 ----- c -- following values taken from CRC handbook, 59th edition, c p. F-215: c ! data (dh(i),i=1,13) 1 /1.084,1.073,1.070,1.084,1.101,1.084, 1 0.96, 1.01, 1.01, 1.014,1.073,1.070,1.330/ rad=3.141593/180.0 *************** *** 301,307 c data (dh(i),i=1,12) 1 /1.084,1.073,1.070,1.084,1.101,1.084, ! 1 0.96, 1.01, 1.01, 1.014,1.073,1.070/ rad=3.141593/180.0 c1=cos(54.73*rad) c2=cos(35.27*rad) --- 308,314 ----- c data (dh(i),i=1,13) 1 /1.084,1.073,1.070,1.084,1.101,1.084, ! 1 0.96, 1.01, 1.01, 1.014,1.073,1.070,1.330/ rad=3.141593/180.0 c1=cos(54.73*rad) c2=cos(35.27*rad) *************** *** 309,315 c4=cos(60.0*rad) c5=cos(70.53*rad) c6=cos(19.47*rad) ! go to (10,10,90,120,140,160,180,10,120,140,10,90),ip call exit_error('error on computed goto #1 in subr hydros', 1 ip,na,nhyd,protp) c --- 316,322 ----- c4=cos(60.0*rad) c5=cos(70.53*rad) c6=cos(19.47*rad) ! go to (10,10,90,120,140,160,180,10,120,140,10,90,192),ip call exit_error('error on computed goto #1 in subr hydros', 1 ip,na,nhyd,protp) c *************** *** 479,484 do 190 ic=1,3 190 protp(ic,1)=sc(ic,1) + (r1(ic)*c5 - r4(ic)*c6)*dh(7) go to 210 200 write(0,*)'eqns. for h position have no unique soln.', . ' all four atoms are co-planar' 210 go to (220,230,220,230,240,240,220,220,230,240,230,220),ip --- 486,509 ----- do 190 ic=1,3 190 protp(ic,1)=sc(ic,1) + (r1(ic)*c5 - r4(ic)*c6)*dh(7) go to 210 + c + c*****case 13 ch2sh type proton + c + 192 call unit(1,2,r1,ierror) + if (ierror .gt. 0) then + call exit_error('case #7.1800a, bond r1 has zero length. ', + 1 ip,na,nhyd,protp) + end if + call unit(3,2,r2,ierror) + if (ierror .gt. 0) then + call exit_error('case #7.1800b, bond r2 has zero length. ', + 1 ip,na,nhyd,protp) + end if + call mult(r3,r2,r1) + call mult(r4,r1,r3) + do 194 ic=1,3 + 194 protp(ic,1)=sc(ic,1) + (r1(ic)*c5 - r4(ic)*c6)*dh(13) + go to 210 200 write(0,*)'eqns. for h position have no unique soln.', . ' all four atoms are co-planar' 210 go to (220,230,220,230,240,240,220,220,230,240,230,220,220),ip *************** *** 481,487 go to 210 200 write(0,*)'eqns. for h position have no unique soln.', . ' all four atoms are co-planar' ! 210 go to (220,230,220,230,240,240,220,220,230,240,230,220),ip call exit_error('error in computed goto #2 of subr hydros', 1 ip,na,nhyd,protp) 220 nhyd=1 --- 506,512 ----- go to 210 200 write(0,*)'eqns. for h position have no unique soln.', . ' all four atoms are co-planar' ! 210 go to (220,230,220,230,240,240,220,220,230,240,230,220,220),ip call exit_error('error in computed goto #2 of subr hydros', 1 ip,na,nhyd,protp) 220 nhyd=1 -------------------------------------------------------------------------- Temporary workarounds: none --