- Timestamp:
- 11/19/09 11:29:41 (14 years ago)
- Branches:
- master
- Children:
- 38d77eb
- Parents:
- 6650a56
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
esolan.f
r6650a56 r32289cd 4 4 ! 5 5 ! Copyright 2003-2005 Frank Eisenmenger, U.H.E. Hansmann, 6 ! Shura Hayryan, Chin-Ku 6 ! Shura Hayryan, Chin-Ku 7 7 ! Copyright 2007 Frank Eisenmenger, U.H.E. Hansmann, 8 8 ! Jan H. Meinke, Sandipan Mohanty … … 14 14 ! ----------------------------------------------------------------- 15 15 ! 16 ! Calculates the solvation energy of the protein with 17 ! solavtion parameters model E=\sum\sigma_iA_i. 16 ! Calculates the solvation energy of the protein with 17 ! solavtion parameters model E=\sum\sigma_iA_i. 18 18 ! The solvent accessible surface area per atom 19 ! and its gradients with respect to the Cartesian coordinates of 19 ! and its gradients with respect to the Cartesian coordinates of 20 20 ! the atoms are calculated using the projection method described in 21 21 ! … … 25 25 ! 26 26 ! INPUT: nmol - the order number of the protein chain. 27 ! The atomic coordinates, radii and solvation parameters 27 ! The atomic coordinates, radii and solvation parameters 28 28 ! are taken from the global arrays of SMMP 29 29 ! 30 ! OUTPUT: global array gradan(mxat,3) contains the gradients of 30 ! OUTPUT: global array gradan(mxat,3) contains the gradients of 31 31 ! solvation energy per atom 32 32 ! local array as(mxat) contains accessible surface area per atom … … 42 42 43 43 include 'INCL.H' 44 45 44 45 46 46 integer nmol, ks0, ks2 47 47 Cf2py intent(in) nmol 48 48 49 49 parameter (ks0=mxat*(mxat+1)) 50 50 parameter (ks2=mxat+mxat) … … 53 53 54 54 integer neib, neibp, ivrx, iv, ial, i, ij, j, iii, idi,ivr, ifu, 55 & ita2, ita3, ine, kk, j2, jkk, jjj, jj, jk, k, l, ll, 55 & ita2, ita3, ine, kk, j2, jkk, jjj, jj, jk, k, l, ll, 56 56 & nb, numat, nyx 57 57 real*8 vertex, ax, pol, as, ayx, ayx1, probe, dd, ddat, dadx, gp, 58 58 & dalp,dbet, daalp, dabet, vrx, dv, dx, dy, dz, dt, di, 59 & dii, ss, dta, dtb, di1, di2, gs, xold, yold, zold, 59 & dii, ss, dta, dtb, di1, di2, gs, xold, yold, zold, 60 60 & energy, sss, a1, a, ab1, a2, aa, ac2, ac1, ab2, am2, 61 61 & am, aia, ak, alp, am1, ap1, amibe, amabe, amaal, amial, … … 63 63 & ba, bcd, bc, bet, c1, c, c2, cc, sfcg, caba, cg, cfsg, 64 64 & cfcg, daba, ct, cs, d1, d2, dbe, dal, dcotbma, dcbet, 65 & dcalp, dcbetmalp, dcbetpalp, ddp2, div, dsbetmalp, 66 & dsalp, dsbet, yy, dsbetpalp, enr, p1, p2, r42, r22, 65 & dcalp, dcbetmalp, dcbetpalp, ddp2, div, dsbetmalp, 66 & dsalp, dsbet, yy, dsbetpalp, enr, p1, p2, r42, r22, 67 67 & r22p, r2, pom, prob, r, r42p, ratom, rr, s, sfsg, sf, 68 & sg, vv1, t, ufi, tt, uga, uv, vv, vv2, wv, xx, xv, yv, 68 & sg, vv1, t, ufi, tt, uga, uv, vv, vv2, wv, xx, xv, yv, 69 69 & zz, zv 70 70 dimension neib(0:mxat),neibp(0:mxat),ivrx(ks0) … … 78 78 integer ta2(0:mxat),ta3(0:mxat),fullarc(0:mxat),al(0:ks2) 79 79 real*8 neibor(mxat,4) 80 80 81 81 real*8, dimension(:, :, :), allocatable :: grad 82 82 83 83 allocate(grad(mxat, mxat, 3)) 84 85 84 85 86 86 ! open(3,file='solvation.dat')! Output file with solvation data 87 87 … … 90 90 if (nmol.eq.0) then 91 91 numat=iatrs2(irsml2(ntlml))-iatrs1(irsml1(1))+1 ! Number of atoms 92 else 92 else 93 93 numat=iatrs2(irsml2(nmol))-iatrs1(irsml1(nmol))+1 ! Number of atoms 94 94 endif … … 96 96 do i=1,numat 97 97 do j=1,3 98 gradan(i,j)=0.0d0 98 gradan(i,j)=0.0d0 99 99 end do 100 100 end do … … 102 102 do i=1,numat 103 103 xold(i)=xat(i)! Redefine the coordinates just for safety 104 yold(i)=yat(i)! 105 zold(i)=zat(i)! 106 pol(i)=rvdw(i)*rvdw(i)!The water radius is already added in 'main' 104 yold(i)=yat(i)! 105 zold(i)=zat(i)! 106 pol(i)=rvdw(i)*rvdw(i)!The water radius is already added in 'main' 107 107 As(i)=pi4*pol(i)! Initially the whole surface of the atom is accessible. 108 108 end do 109 109 110 110 do iii=1,numat 111 111 do jjj=1,numat … … 120 120 !*************************** 121 121 122 do 1 i=1,numat ! Lop over atoms "i" 122 do 1 i=1,numat ! Lop over atoms "i" 123 123 ! ---------------------------------------------------- 124 125 R=rvdw(i) 124 125 R=rvdw(i) 126 126 jj=0 127 127 do j=1,numat !Find the neighbours of "i" … … 132 132 write(*,*)'ERROR in data: centres of two atoms coincide!' 133 133 write(*,*)i,j,xold(i),yold(i),zold(i),rvdw(i), 134 & xold(j),yold(j),zold(j),rvdw(j) 134 & xold(j),yold(j),zold(j),rvdw(j) 135 135 stop 'Centres of atoms coincide!' 136 136 endif … … 146 146 end if 147 147 end do!Neighbours 148 148 149 149 neib(0)=jj ! The number of neighbors of "i" 150 150 … … 197 197 ! 198 198 uga=grnd() ! Random \gamma angle 199 ufi=grnd() ! Random \pi angle 199 ufi=grnd() ! Random \pi angle 200 200 uga=pi*uga/2 201 201 ufi=pi*ufi/2 … … 219 219 end do 220 220 end do 221 ! 222 221 ! 222 223 223 if(jjj.ne.0) then ! Rotation is necessary 224 224 sfsg=sf*sg … … 243 243 do jj=1,neib(0) 244 244 j=neib(jj) 245 neibor(j,1)=(ddat(j,2))**2+(ddat(j,3))**2+ 245 neibor(j,1)=(ddat(j,2))**2+(ddat(j,3))**2+ 246 246 & (ddat(j,4)-R)**2-pol(j) ! a 247 247 neibor(j,2)=-pom*ddat(j,2) ! b … … 259 259 do while(k.gt.1) ! B 260 260 k=k-1 261 ! Analyse mutual disposition of every pair of neighbours 261 ! Analyse mutual disposition of every pair of neighbours 262 262 do 13 L=neib(0),k+1,-1 ! A 263 263 … … 283 283 elseif(D.le.0d0.and.dsqrt((b1-b2)**2+(c1-c2)**2).le. ! a01 02 284 284 & -dsqrt(b2*b2+c2*c2-4d0*d2)+dsqrt(b1*b1+c1*c1-4d0*d1)) then 285 ! The circle neib(k) encloses circle neib(L) and the later is discarded 285 ! The circle neib(k) encloses circle neib(L) and the later is discarded 286 286 neib(0)=neib(0)-1 287 287 do j=L,neib(0) … … 326 326 elseif(D.le.0d0.and.dsqrt((b1-b2)**2+(c1-c2)**2).ge. ! a03 02 327 327 & dsqrt(b2*b2+c2*c2-4d0*d2)+dsqrt(b1*b1+c1*c1-4d0*d1)) then 328 ! Don't exclude neib(k) 328 ! Don't exclude neib(k) 329 329 neib(0)=neib(0)-1 330 330 do j=k,neib(0) … … 370 370 elseif(D.le.0d0.and.dsqrt((b1-b2)**2+(c1-c2)**2).ge. ! a07 02 371 371 & dsqrt(b2*b2+c2*c2-4d0*d2)+dsqrt(b1*b1+c1*c1-4d0*d1)) then 372 ! discard the circle neib(L) 372 ! discard the circle neib(L) 373 373 neib(0)=neib(0)-1 374 374 do j=L,neib(0) … … 385 385 p2=(b1-b2)*pom 386 386 !-- Assign t and s coordinates and the order number of circles 387 vertex(iv,1)=(t+p1)/am 387 vertex(iv,1)=(t+p1)/am 388 388 vertex(iv,2)=(s-p2)/am 389 389 vertex(iv,3)=neib(k) … … 394 394 vertex(iv,3)=neib(k) 395 395 vertex(iv,4)=neib(L) 396 !-- 396 !-- 397 397 endif ! 10 398 398 … … 491 491 dbe=amabe-amibe 492 492 if(dal.lt.pi) then 493 As(i)=R22*(pi-dal) 493 As(i)=R22*(pi-dal) 494 494 elseif(dbe.lt.pi) then 495 495 As(i)=R22*(pi-dbe) … … 510 510 enddo 511 511 do j=1,neib(0) 512 ! "iv" is the number of intersection point. 512 ! "iv" is the number of intersection point. 513 513 do k=1,iv 514 514 if(neibp(j).eq.vertex(k,3).or.neibp(j).eq.vertex(k,4)) goto 30 … … 532 532 do k=1,ifu 533 533 a=neibor(fullarc(k),1) 534 if(a.lt.0.d0) then 534 if(a.lt.0.d0) then 535 535 aia=-1.d0 536 536 else … … 579 579 ak=a*a 580 580 daba=dabs(a) 581 if(a.lt.0d0) then 581 if(a.lt.0d0) then 582 582 aia=-1d0 583 583 else … … 679 679 do j=1,nyx 680 680 681 ! 681 ! 682 682 ! Escape 'bad' intersections. 683 683 if(dabs(ayx1(j+1)-ayx1(j)).lt.1d-8) goto 40 … … 686 686 ap1=ct+rr*dcos(prob) ! The middle point of the arc. 687 687 ap2=cs+rr*dsin(prob) 688 ! Verify if the middle point belongs to a covered part. 688 ! Verify if the middle point belongs to a covered part. 689 689 ! If yes then omit. 690 690 do ij=1,ial … … 754 754 dabet(3)=(a*ac2-ak*c2+wv*daba*a2*dsbet)/am2 755 755 dabet(4)=(2d0*ak*a2)/am2 756 dv(2)=R42*b*vv1 757 dv(3)=R42*c*vv1 758 dv(4)=(d-R42*a)*vv1 759 dv(1)=-dv(4)*R42 760 dx(1)=R42*vv1-(d+R42*a)*dv(1)*vv2 761 dx(2)=-(d+R42*a)*dv(2)*vv2 762 dx(3)=-(d+R42*a)*dv(3)*vv2 763 dx(4)=1d0*vv1-(d+R42*a)*dv(4)*vv2 756 dv(2)=R42*b*vv1 757 dv(3)=R42*c*vv1 758 dv(4)=(d-R42*a)*vv1 759 dv(1)=-dv(4)*R42 760 dx(1)=R42*vv1-(d+R42*a)*dv(1)*vv2 761 dx(2)=-(d+R42*a)*dv(2)*vv2 762 dx(3)=-(d+R42*a)*dv(3)*vv2 763 dx(4)=1d0*vv1-(d+R42*a)*dv(4)*vv2 764 764 dy(1)=(-2d0*d+4d0*R42*a)/daba*vv1-(b*b+c*c-2d0*a*d+2d0* 765 765 & R42*ak)*(aia*vv+daba*dv(1))/ak*vv2 … … 769 769 & R42*ak)*aia*dv(3)/a*vv2 770 770 dy(4)=-2.d0*a/daba*vv1-(b*b+c*c-2.d0*a*d+2.d0* 771 & R42*ak)*aia*dv(4)/a*vv2 771 & R42*ak)*aia*dv(4)/a*vv2 772 772 dz(1)=-2d0*d/wv/a*vv1-wv*(vv+a*dv(1))/ak*vv2 773 773 dz(2)=b/wv/a*vv1-wv*dv(2)/a*vv2 … … 820 820 dii(4,2)=dii(1,2)*R42 821 821 dii(4,3)=2d0*(ddat(jk,4)+R)*R42 822 822 823 823 do idi=1,3 824 824 grad(i,jk,idi)=grad(i,jk,idi)+ … … 826 826 & di(3)*dii(3,idi)+di(4)*dii(4,idi) 827 827 828 enddo 828 enddo 829 829 do idi=1,4 830 830 dta(idi)=5d-1*daalp(idi)*(((yv-zv*((-b*dsbetpalp … … 838 838 di1(idi)=R2*(aia*daalp(idi)-4d0*xv*dta(idi)/(4d0+tt*tt)) 839 839 di2(idi)=R2*(-aia*dabet(idi)-4d0*xv*dtb(idi)/(4d0+tt*tt)) 840 enddo 840 enddo 841 841 842 842 dii(1,1)=2d0*ddat(kk,2) … … 866 866 40 continue 867 867 enddo 868 868 869 869 else ! analyse the case with lines (not necessary after rotation). 870 870 … … 920 920 enddo 921 921 probe(nyx+1)=ayx1(nyx)+1d0 922 922 923 923 924 924 bc=b*b+c*c … … 960 960 22 continue 961 961 endif 962 enddo 962 enddo 963 963 11 continue 964 964 … … 1017 1017 111 continue 1018 1018 1019 ! write(3,*)' No Area sigma Enrg gradx grady', 1019 ! write(3,*)' No Area sigma Enrg gradx grady', 1020 1020 ! & ' gradz Rad Atom' 1021 1021 ! write(3,*) 1022 1022 1023 1023 1024 1024 do i=1,numat 1025 1025 enr=As(i)*sigma(i) … … 1038 1038 1039 1039 esolan=sss 1040 1040 1041 1041 deallocate(grad) 1042 1042 ! close(3) … … 1046 1046 200 format(2i4,3f16.6) 1047 1047 700 format(i5,7f8.3,5x,a4) 1048 1048 1049 1049 end
Note:
See TracChangeset
for help on using the changeset viewer.