#ifdef SPLITELE
etot=wsc*evdw+wscp*evdw2+welec*ees+wvdwpp*evdw1
& +wang*ebe+wtor*etors+wscloc*escloc
- & +wstrain*ehpb+nss*ebr+wcorr*ecorr+wcorr5*ecorr5
+ & +wstrain*ehpb+wcorr*ecorr+wcorr5*ecorr5
& +wcorr6*ecorr6+wturn4*eello_turn4+wturn3*eello_turn3
& +wturn6*eturn6+wel_loc*eel_loc+edihcnstr+wtor_d*etors_d
& +wbond*estr+Uconst+wsccor*esccor
#else
etot=wsc*evdw+wscp*evdw2+welec*(ees+evdw1)
& +wang*ebe+wtor*etors+wscloc*escloc
- & +wstrain*ehpb+nss*ebr+wcorr*ecorr+wcorr5*ecorr5
+ & +wstrain*ehpb+wcorr*ecorr+wcorr5*ecorr5
& +wcorr6*ecorr6+wturn4*eello_turn4+wturn3*eello_turn3
& +wturn6*eturn6+wel_loc*eel_loc+edihcnstr+wtor_d*etors_d
& +wbond*estr+Uconst+wsccor*esccor
& edihcnstr,ebr*nss,
& Uconst,etot
10 format (/'Virtual-chain energies:'//
- & 'EVDW= ',1pE16.6,' WEIGHT=',1pD16.6,' (SC-SC)'/
- & 'EVDW2= ',1pE16.6,' WEIGHT=',1pD16.6,' (SC-p)'/
- & 'EES= ',1pE16.6,' WEIGHT=',1pD16.6,' (p-p)'/
- & 'EVDWPP=',1pE16.6,' WEIGHT=',1pD16.6,' (p-p VDW)'/
- & 'ESTR= ',1pE16.6,' WEIGHT=',1pD16.6,' (stretching)'/
- & 'EBE= ',1pE16.6,' WEIGHT=',1pD16.6,' (bending)'/
- & 'ESC= ',1pE16.6,' WEIGHT=',1pD16.6,' (SC local)'/
- & 'ETORS= ',1pE16.6,' WEIGHT=',1pD16.6,' (torsional)'/
- & 'ETORSD=',1pE16.6,' WEIGHT=',1pD16.6,' (double torsional)'/
- & 'EHPB= ',1pE16.6,' WEIGHT=',1pD16.6,
+ & 'EVDW= ',1pE16.6,' WEIGHT=',1pE16.6,' (SC-SC)'/
+ & 'EVDW2= ',1pE16.6,' WEIGHT=',1pE16.6,' (SC-p)'/
+ & 'EES= ',1pE16.6,' WEIGHT=',1pE16.6,' (p-p)'/
+ & 'EVDWPP=',1pE16.6,' WEIGHT=',1pE16.6,' (p-p VDW)'/
+ & 'ESTR= ',1pE16.6,' WEIGHT=',1pE16.6,' (stretching)'/
+ & 'EBE= ',1pE16.6,' WEIGHT=',1pE16.6,' (bending)'/
+ & 'ESC= ',1pE16.6,' WEIGHT=',1pE16.6,' (SC local)'/
+ & 'ETORS= ',1pE16.6,' WEIGHT=',1pE16.6,' (torsional)'/
+ & 'ETORSD=',1pE16.6,' WEIGHT=',1pE16.6,' (double torsional)'/
+ & 'EHPB= ',1pE16.6,' WEIGHT=',1pE16.6,
& ' (SS bridges & dist. cnstr.)'/
- & 'ECORR4=',1pE16.6,' WEIGHT=',1pD16.6,' (multi-body)'/
- & 'ECORR5=',1pE16.6,' WEIGHT=',1pD16.6,' (multi-body)'/
- & 'ECORR6=',1pE16.6,' WEIGHT=',1pD16.6,' (multi-body)'/
- & 'EELLO= ',1pE16.6,' WEIGHT=',1pD16.6,' (electrostatic-local)'/
- & 'ETURN3=',1pE16.6,' WEIGHT=',1pD16.6,' (turns, 3rd order)'/
- & 'ETURN4=',1pE16.6,' WEIGHT=',1pD16.6,' (turns, 4th order)'/
- & 'ETURN6=',1pE16.6,' WEIGHT=',1pD16.6,' (turns, 6th order)'/
- & 'ESCCOR=',1pE16.6,' WEIGHT=',1pD16.6,' (backbone-rotamer corr)'/
+ & 'ECORR4=',1pE16.6,' WEIGHT=',1pE16.6,' (multi-body)'/
+ & 'ECORR5=',1pE16.6,' WEIGHT=',1pE16.6,' (multi-body)'/
+ & 'ECORR6=',1pE16.6,' WEIGHT=',1pE16.6,' (multi-body)'/
+ & 'EELLO= ',1pE16.6,' WEIGHT=',1pE16.6,' (electrostatic-local)'/
+ & 'ETURN3=',1pE16.6,' WEIGHT=',1pE16.6,' (turns, 3rd order)'/
+ & 'ETURN4=',1pE16.6,' WEIGHT=',1pE16.6,' (turns, 4th order)'/
+ & 'ETURN6=',1pE16.6,' WEIGHT=',1pE16.6,' (turns, 6th order)'/
+ & 'ESCCOR=',1pE16.6,' WEIGHT=',1pE16.6,' (backbone-rotamer corr)'/
& 'EDIHC= ',1pE16.6,' (dihedral angle constraints)'/
& 'ESS= ',1pE16.6,' (disulfide-bridge intrinsic energy)'/
& 'UCONST= ',1pE16.6,' (Constraint energy)'/
include 'COMMON.IOUNITS'
dimension ggg(3)
ehpb=0.0D0
-cd write(iout,*)'edis: nhpb=',nhpb,' fbr=',fbr
-cd write(iout,*)'link_start=',link_start,' link_end=',link_end
+c write(iout,*)'edis: nhpb=',nhpb,' fbr=',fbr
+c write(iout,*)'link_start=',link_start,' link_end=',link_end
if (link_end.eq.0) return
do i=link_start,link_end
C If ihpb(i) and jhpb(i) > NRES, this is a SC-SC distance, otherwise a
C distance and angle dependent SS bond potential.
cmc if (ii.gt.nres .and. itype(iii).eq.1 .and. itype(jjj).eq.1) then
C 18/07/06 MC: Use the convention that the first nss pairs are SS bonds
- c if (.not.dyn_ss .and. i.le.nss) then
- C 15/02/13 CC dynamic SSbond
- if (.not.dyn_ss.and.
- & ii.gt.nres .and. itype(iii).eq.1 .and. itype(jjj).eq.1) then
+ if (.not.dyn_ss .and. i.le.nss) then
+ C 15/02/13 CC dynamic SSbond - additional check
+ if (ii.gt.nres
+ & .and. itype(iii).eq.1 .and. itype(jjj).eq.1) then
call ssbond_ene(iii,jjj,eij)
ehpb=ehpb+2*eij
- c write (iout,*) "eij",eij
+ endif
-cd write (iout,*) "eij",eij
else if (ii.gt.nres .and. jj.gt.nres) then
c Restraints from contact prediction
dd=dist(ii,jj)
deltat12=om2-om1+2.0d0
cosphi=om12-om1*om2
eij=akcm*deltad*deltad+akth*(deltat1*deltat1+deltat2*deltat2)
- & +akct*deltad*deltat12
+ & +akct*deltad*deltat12+ebr
& +v1ss*cosphi+v2ss*cosphi*cosphi+v3ss*cosphi*cosphi*cosphi
+ & +ss_depth
c write(iout,*) i,j,"rij",rij,"d0cm",d0cm," akcm",akcm," akth",akth,
c & " akct",akct," deltad",deltad," deltat",deltat1,deltat2,
c & " deltat12",deltat12," eij",eij
if (nss.gt.0) then
do i=1,nss
+ if (dyn_ss) then
write(iunit,'(a6,i4,1x,a3,i7,4x,a3,i7)')
- & 'SSBOND',i,'CYS',ihpb(i)-1-nres,
- & 'CYS',jhpb(i)-1-nres
+ & 'SSBOND',i,'CYS',idssb(i)-nnt+1,
+ & 'CYS',jdssb(i)-nnt+1
+ else
+ write(iunit,'(a6,i4,1x,a3,i7,4x,a3,i7)')
+ & 'SSBOND',i,'CYS',ihpb(i)-nnt+1-nres,
+ & 'CYS',jhpb(i)-nnt+1-nres
+ endif
enddo
endif
write (iunit,30) ica(nct),ica(nct)+1
endif
do i=1,nss
- c trzeba uporzdkowac
- c write (iunit,30) ica(ihpb(i))+1,ica(jhpb(i))+1
+ if (dyn_ss) then
+ write (iunit,30) ica(idssb(i))+1,ica(jdssb(i))+1
+ else
+ write (iunit,30) ica(ihpb(i)-nres)+1,ica(jhpb(i)-nres)+1
+ endif
enddo
write (iunit,'(a6)') 'ENDMDL'
10 FORMAT ('ATOM',I7,' CA ',A3,I6,4X,3F8.3,f15.3)
#endif
return
end
+c-----------------------------------------------
+ subroutine read_cx(ixdrf,*)
+c xdrfopen should be called before this subroutine
+ implicit real*8 (a-h,o-z)
+ include 'DIMENSIONS'
+#ifdef MPI
+ include 'mpif.h'
+ include 'COMMON.SETUP'
+#else
+ parameter (me=0)
+#endif
+ include 'COMMON.CHAIN'
+ include 'COMMON.INTERACT'
+ include 'COMMON.NAMES'
+ include 'COMMON.IOUNITS'
+ include 'COMMON.HEADER'
+ include 'COMMON.SBRIDGE'
+ include 'COMMON.DISTFIT'
+ include 'COMMON.MD'
+ include 'COMMON.LOCAL'
+ double precision time
+ integer iret,itmp
+ real xcoord(3,maxres2+2),prec
+ real r_time,r_potE,r_uconst,r_uconst_back,r_t_bath
+
+
+#ifdef AIX
+c call xdrfopen_(ixdrf,cartname, "r", iret)
+ call xdrffloat_(ixdrf, r_time, iret)
+ if(iret.eq.0) return1
+
+ call xdrffloat_(ixdrf, r_potE), iret)
+ call xdrffloat_(ixdrf, r_uconst), iret)
+ call xdrffloat_(ixdrf, r_uconst_back), iret)
+ call xdrffloat_(ixdrf, r_t_bath), iret)
+ call xdrfint_(ixdrf, nss, iret)
+ do j=1,nss
+ call xdrfint_(ixdrf, ihpb(j), iret)
+ call xdrfint_(ixdrf, jhpb(j), iret)
+ enddo
+ call xdrfint_(ixdrf, nfrag+npair+3*nfrag_back, iret)
+ do i=1,nfrag
+ call xdrffloat_(ixdrf, real(qfrag(i)), iret)
+ enddo
+ do i=1,npair
+ call xdrffloat_(ixdrf, real(qpair(i)), iret)
+ enddo
+ do i=1,nfrag_back
+ call xdrffloat_(ixdrf, real(utheta(i)), iret)
+ call xdrffloat_(ixdrf, real(ugamma(i)), iret)
+ call xdrffloat_(ixdrf, real(uscdiff(i)), iret)
+ enddo
+#else
+c call xdrfopen(ixdrf,cartname, "r", iret)
+ call xdrffloat(ixdrf, r_time, iret)
+ if(iret.eq.0) return1
+
+ call xdrffloat(ixdrf, r_potE, iret)
+ call xdrffloat(ixdrf, r_uconst, iret)
+ call xdrffloat(ixdrf, r_uconst_back, iret)
+ call xdrffloat(ixdrf, r_t_bath, iret)
+ call xdrfint(ixdrf, nss, iret)
+ do j=1,nss
+ call xdrfint(ixdrf, ihpb(j), iret)
+ call xdrfint(ixdrf, jhpb(j), iret)
+ enddo
+ call xdrfint(ixdrf, nfrag+npair+3*nfrag_back, iret)
+ do i=1,nfrag
+ call xdrffloat(ixdrf, real(qfrag(i)), iret)
+ enddo
+ do i=1,npair
+ call xdrffloat(ixdrf, real(qpair(i)), iret)
+ enddo
+ do i=1,nfrag_back
+ call xdrffloat(ixdrf, real(utheta(i)), iret)
+ call xdrffloat(ixdrf, real(ugamma(i)), iret)
+ call xdrffloat(ixdrf, real(uscdiff(i)), iret)
+ enddo
+#endif
+ prec=10000.0
+
+ itmp=nres+nct-nnt+1
+#ifdef AIX
+ call xdrf3dfcoord_(ixdrf, xcoord, itmp, prec, iret)
+c call xdrfclose_(ixdrf, iret)
+#else
+ call xdrf3dfcoord(ixdrf, xcoord, itmp, prec, iret)
+c call xdrfclose(ixdrf, iret)
+#endif
+
+ do i=1,nres
+ do j=1,3
+ c(j,i)=xcoord(j,i)
+ enddo
+ enddo
+ do i=nnt,nct
+ do j=1,3
+ c(j,i+nres)=xcoord(j,nres+i-nnt+1)
+ enddo
+ enddo
+
+ call int_from_cart1(.false.)
+
+ do i=1,nres-1
+ do j=1,3
+ dc(j,i)=c(j,i+1)-c(j,i)
+ dc_norm(j,i)=dc(j,i)*vbld_inv(i+1)
+ enddo
+ enddo
+ do i=2,nres-1
+ do j=1,3
+ dc(j,i+nres)=c(j,i+nres)-c(j,i)
+ dc_norm(j,i+nres)=dc(j,i+nres)*vbld_inv(i+nres)
+ enddo
+ enddo
+
+ return
+ end
#endif
c-----------------------------------------------------------------
subroutine statout(itime)