Merge branch 'prerelease-3.2.1' into czarek
authorCezary Czaplewski <czarek@chem.univ.gda.pl>
Sun, 17 Feb 2013 02:19:35 +0000 (03:19 +0100)
committerCezary Czaplewski <czarek@chem.univ.gda.pl>
Sun, 17 Feb 2013 02:19:35 +0000 (03:19 +0100)
Conflicts:
bin/unres/MD/unres_ifort_MPICH_GAB.exe
source/unres/src_MD/cinfo.f
source/unres/src_MD/energy_p_new_barrier.F

1  2 
bin/unres/MD/unres_ifort_MPICH_GAB.exe
source/unres/src_MD/cinfo.f
source/unres/src_MD/energy_p_new_barrier.F
source/unres/src_MD/geomout.F
source/unres/src_MD/readrtns.F

index 97d45b7,a5decdb..968912a
Binary files differ
@@@ -1,10 -1,10 +1,10 @@@
  C DO NOT EDIT THIS FILE - IT HAS BEEN GENERATED BY COMPINFO.C
- C 3 1 52
 -C 3 1 78
++C 3 1 53
        subroutine cinfo
        include 'COMMON.IOUNITS'
        write(iout,*)'++++ Compile info ++++'
-       write(iout,*)'Version 3.1 build 52'
-       write(iout,*)'compiled Sun Feb 17 00:55:22 2013'
 -      write(iout,*)'Version 3.1 build 78'
 -      write(iout,*)'compiled Sun Feb 17 03:00:27 2013'
++      write(iout,*)'Version 3.1 build 53'
++      write(iout,*)'compiled Sun Feb 17 03:17:55 2013'
        write(iout,*)'compiled by czarek@piasek3'
        write(iout,*)'OS name:    Linux '
        write(iout,*)'OS release: 2.6.32-42-generic '
@@@ -428,14 -428,14 +428,14 @@@ cMS$ATTRIBUTES C ::  proc_pro
  #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
@@@ -1057,25 -1057,25 +1057,25 @@@ C--------------------------------------
       &  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
@@@ -4279,13 -4279,14 +4279,13 @@@ C 24/11/03 AL: SS bridges handled separ
  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)
@@@ -4423,9 -4424,8 +4423,9 @@@ c      dscj_inv=dsc_inv(itypj
        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 
@@@ -79,9 -79,15 +79,15 @@@ cmodel      write (iunit,'(a5,i6)') 'MO
  
        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)
@@@ -370,124 -379,6 +379,124 @@@ c--------------------------------------
  #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)
@@@ -1127,8 -1127,8 +1127,8 @@@ czscore          call geom_to_var(nvar,
  c        write (iout,*) "constr_dist",constr_dist,nstart_sup,nsup
        if (constr_dist.gt.0) then
          call read_dist_constr
 -        call hpb_partition
        endif
 +      if (nhpb.gt.0) call hpb_partition
  c      write (iout,*) "After read_dist_constr nhpb",nhpb
  c      call flush(iout)
        if (indpdb.eq.0 .and. modecalc.ne.2 .and. modecalc.ne.4
@@@ -1340,10 -1340,12 +1340,12 @@@ C Check whether the specified bridging 
        do i=1,ns
        if (itype(iss(i)).ne.1) then
          if (me.eq.king.or..not.out1file) write (iout,'(2a,i3,a)') 
-      &   'Do you REALLY think that the residue ',restyp(iss(i)),i,
+      &   'Do you REALLY think that the residue ',
+      &    restyp(itype(iss(i))),i,
       &   ' can form a disulfide bridge?!!!'
          write (*,'(2a,i3,a)') 
-      &   'Do you REALLY think that the residue ',restyp(iss(i)),i,
+      &   'Do you REALLY think that the residue ',
+      &    restyp(itype(iss(i))),i,
       &   ' can form a disulfide bridge?!!!'
  #ifdef MPI
         call MPI_Finalize(MPI_COMM_WORLD,ierror)