Merge branch 'adasko' into devel
authorAdam Kazimierz Sieradzan <adasko@sun1.chem.univ.gda.pl>
Wed, 27 Jun 2012 11:53:41 +0000 (07:53 -0400)
committerAdam Kazimierz Sieradzan <adasko@sun1.chem.univ.gda.pl>
Wed, 27 Jun 2012 11:53:41 +0000 (07:53 -0400)
Conflicts:
.gitignore
bin/unres/MD/unres_ifort_MPICH_GAB.exe
source/cluster/wham/src/DIMENSIONS.COMPAR
source/cluster/wham/src/Makefile
source/wham/src/Makefile
source/wham/src/cinfo.f
source/wham/src/tmptmp

22 files changed:
bin/wham/wham_multparm-ham_rep-oldparm [new file with mode: 0755]
source/cluster/wham/src/COMMON.LOCAL
source/cluster/wham/src/COMMON.SCCOR
source/cluster/wham/src/COMMON.VAR
source/cluster/wham/src/DIMENSIONS
source/cluster/wham/src/Makefile [changed from symlink to file mode: 0644]
source/cluster/wham/src/energy_p_new.F
source/cluster/wham/src/initialize_p.F
source/cluster/wham/src/parmread.F
source/unres/src_MD/COMMON.VAR
source/unres/src_MD/cinfo.f
source/wham/src/COMMON.ALLPARM
source/wham/src/COMMON.VAR
source/wham/src/DIMENSIONS
source/wham/src/Makefile [changed from symlink to file mode: 0644]
source/wham/src/energy_p_new.F
source/wham/src/include_unres/COMMON.LOCAL
source/wham/src/include_unres/COMMON.SCCOR
source/wham/src/include_unres/COMMON.VAR [new file with mode: 0644]
source/wham/src/initialize_p.F
source/wham/src/parmread.F
source/wham/src/store_parm.F

diff --git a/bin/wham/wham_multparm-ham_rep-oldparm b/bin/wham/wham_multparm-ham_rep-oldparm
new file mode 100755 (executable)
index 0000000..2ddc49d
Binary files /dev/null and b/bin/wham/wham_multparm-ham_rep-oldparm differ
index 1d0f3aa..a248d99 100644 (file)
@@ -2,7 +2,7 @@
      & sigc0,dsc,dsc_inv,bsc,censc,gaussc,dsc0,vbl,vblinv,vblinv2,
      & vbl_cis,vbl0,vbld_inv
       integer nlob,loc_start,loc_end,ithet_start,ithet_end,
-     & iphi_start,iphi_end
+     & iphi_start,iphi_end,itau_start,itau_end
 C Parameters of the virtual-bond-angle probability distribution
       common /thetas/ a0thet(ntyp),athet(2,ntyp),bthet(2,ntyp),
      &  polthet(0:3,ntyp),gthet(3,ntyp),theta0(ntyp),sig0(ntyp),
@@ -31,6 +31,6 @@ C Parameters of the side-chain probability distribution
 C Virtual-bond lenghts
       common /peptbond/ vbl,vblinv,vblinv2,vbl_cis,vbl0
       common /indices/ loc_start,loc_end,ithet_start,ithet_end,
-     &                 iphi_start,iphi_end
+     &                 iphi_start,iphi_end,itau_start,itau_end
 C Inverses of the actual virtual bond lengths
       common /invlen/ vbld_inv(maxres2)
index 5217de7..ca6210f 100644 (file)
@@ -1,6 +1,16 @@
-C Parameters of the SCCOR term
-      double precision v1sccor,v2sccor
-      integer nterm_sccor
-      common/torsion/v1sccor(maxterm_sccor,20,20),
-     &    v2sccor(maxterm_sccor,20,20),
-     &    nterm_sccor
+cc Parameters of the SCCOR term
+      double precision v1sccor,v2sccor,vlor1sccor,
+     &                 vlor2sccor,vlor3sccor,gloc_sc,
+     &                 dcostau,dsintau,dtauangle,dcosomicron,
+     &                 domicron
+      integer nterm_sccor,isccortyp,nsccortyp,nlor_sccor
+      common/sccor/v1sccor(maxterm_sccor,3,20,20),
+     &    v2sccor(maxterm_sccor,3,20,20),
+     &    v0sccor(maxterm_sccor,20),
+     &    nterm_sccor(ntyp,ntyp),isccortyp(ntyp),nsccortyp,
+     &    nlor_sccor(ntyp,ntyp),vlor1sccor(maxterm_sccor,20,20),
+     &    vlor2sccor(maxterm_sccor,20,20),
+     &    vlor3sccor(maxterm_sccor,20,20),gloc_sc(3,0:maxres2,10),
+     &    dcostau(3,3,3,maxres2),dsintau(3,3,3,maxres2),
+     &    dtauangle(3,3,3,maxres2),dcosomicron(3,3,3,maxres2),
+     &    domicron(3,3,3,maxres2)
index ad412d0..326d6ec 100644 (file)
@@ -2,14 +2,15 @@ C Store the geometric variables in the following COMMON block.
       integer ntheta,nphi,nside,nvar,ialph,ivar
       double precision theta,phi,alph,omeg,vbld,vbld_ref,
      &  theta_ref,phi_ref,alph_ref,omeg_ref,
-     &  costtab,sinttab,cost2tab,sint2tab,
+     &  costtab,sinttab,cost2tab,sint2tab,tauangle,omicron,
      &          xxtab,yytab,zztab
       common /var/ theta(maxres),phi(maxres),alph(maxres),omeg(maxres),
      &          vbld(2*maxres),
      &          costtab(maxres), sinttab(maxres), cost2tab(maxres),
      &          sint2tab(maxres),xxtab(maxres),yytab(maxres),
      &          zztab(maxres),
-     &          ialph(maxres,2),ivar(4*maxres2),ntheta,nphi,nside,nvar
+     &          ialph(maxres,2),ivar(4*maxres2),ntheta,nphi,nside,nvar,
+     &          omicron(2,maxres),tauangle(3,maxres)
 C Angles from experimental structure
       common /varref/ vbld_ref(maxres),
      &  theta_ref(maxres),phi_ref(maxres),
index 099de28..806387c 100644 (file)
@@ -36,7 +36,7 @@ C Max. number of types of dihedral angles & multiplicity of torsional barriers
       parameter (maxtor=4,maxterm=10,maxlor=3,maxtermd_1=8,maxtermd_2=8)
 c Max number of torsional terms in SCCOR
       integer maxterm_sccor
-      parameter (maxterm_sccor=3)
+      parameter (maxterm_sccor=6)
 C Max. number of residue types and parameters in expressions for
 C virtual-bond angle bending potentials
       integer maxthetyp,maxthetyp1,maxtheterm,maxtheterm2,maxtheterm3,
deleted file mode 120000 (symlink)
index 693492ee96e635ce1b09cbb19e94f4da87bde8c2..0000000000000000000000000000000000000000
+++ /dev/null
@@ -1 +0,0 @@
-Makefile-MPICH-ifort
\ No newline at end of file
new file mode 100644 (file)
index 0000000000000000000000000000000000000000..2f5d84f2dca87b25216049a5f60e9a60c70886c4
--- /dev/null
@@ -0,0 +1,33 @@
+INSTALL_DIR = /users/software/mpich-1.2.7p1_intel-10.1_em64_ssh
+BIN=../../../../bin
+FC = ifort
+OPT = -O3 -ip -w
+OPT = -CB -g 
+FFLAGS =  ${OPT} -c -I. -I../src_MD_T-sccor/include_unres -I../src_MD_T-sccor -I/users/adam/MEY_MD/src_Tc-czarek -I$(INSTALL_DIR)/include
+CPPFLAGS = -DLINUX -DPGI -DSPLITELE -DPROCOR -DCRYST_BOND -DCRYST_THETA -DCRYST_SC -DMP -DMPI
+LIBS = -L$(INSTALL_DIR)/lib -lmpich ../../../wham/src/xdrf/libxdrf.a -g -d2 -CA -CB
+
+.c.o:
+       cc -c -DLINUX -DPGI $*.c
+
+.f.o:
+       ${FC} ${FFLAGS} $*.f
+
+.F.o:
+       ${FC} ${FFLAGS} ${CPPFLAGS} ${FFLAGS} $*.F
+
+objects = main_clust.o arcos.o cartprint.o chainbuild.o convert.o initialize_p.o \
+       matmult.o readrtns.o pinorm.o rescode.o intcor.o timing.o misc.o \
+       geomout.o readpdb.o read_coords.o parmread.o probabl.o fitsq.o hc.o  \
+       track.o wrtclust.o srtclust.o noyes.o contact.o printmat.o \
+       int_from_cart1.o energy_p_new.o icant.o proc_proc.o work_partition.o \
+       setup_var.o read_ref_str.o
+
+unres_clust: $(objects)
+       $(FC) ${OPT} ${objects} ${LIBS} -o ${BIN}/unres_clustMD_MPI-oldparm
+
+clean:
+       /bin/rm *.o
+
+move:
+       mv *.o ${OBJ}
index bf9c563..38090fe 100644 (file)
@@ -4453,26 +4453,55 @@ C Set lprn=.true. for debugging
 c      lprn=.true.
 c      write (iout,*) "EBACK_SC_COR",iphi_start,iphi_end,nterm_sccor
       esccor=0.0D0
-      do i=iphi_start,iphi_end
+      do i=itau_start,itau_end
         esccor_ii=0.0D0
-        itori=itype(i-2)
-        itori1=itype(i-1)
+        isccori=isccortyp(itype(i-2))
+        isccori1=isccortyp(itype(i-1))
         phii=phi(i)
+cccc  Added 9 May 2012
+cc Tauangle is torsional engle depending on the value of first digit 
+c(see comment below)
+cc Omicron is flat angle depending on the value of first digit 
+c(see comment below)
+
+
+        do intertyp=1,3 !intertyp
+cc Added 09 May 2012 (Adasko)
+cc  Intertyp means interaction type of backbone mainchain correlation: 
+c   1 = SC...Ca...Ca...Ca
+c   2 = Ca...Ca...Ca...SC
+c   3 = SC...Ca...Ca...SCi
         gloci=0.0D0
-        do j=1,nterm_sccor
-          v1ij=v1sccor(j,itori,itori1)
-          v2ij=v2sccor(j,itori,itori1)
-          cosphi=dcos(j*phii)
-          sinphi=dsin(j*phii)
+        if (((intertyp.eq.3).and.((itype(i-2).eq.10).or.
+     &      (itype(i-1).eq.10).or.(itype(i-2).eq.21).or.
+     &      (itype(i-1).eq.21)))
+     &    .or. ((intertyp.eq.1).and.((itype(i-2).eq.10)
+     &     .or.(itype(i-2).eq.21)))
+     &    .or.((intertyp.eq.2).and.((itype(i-1).eq.10).or.
+     &      (itype(i-1).eq.21)))) cycle
+        if ((intertyp.eq.2).and.(i.eq.4).and.(itype(1).eq.21)) cycle
+        if ((intertyp.eq.1).and.(i.eq.nres).and.(itype(nres).eq.21))
+     & cycle
+        do j=1,nterm_sccor(isccori,isccori1)
+          v1ij=v1sccor(j,intertyp,isccori,isccori1)
+          v2ij=v2sccor(j,intertyp,isccori,isccori1)
+          cosphi=dcos(j*tauangle(intertyp,i))
+          sinphi=dsin(j*tauangle(intertyp,i))
           esccor=esccor+v1ij*cosphi+v2ij*sinphi
-          gloci=gloci+fact*j*(v2ij*cosphi-v1ij*sinphi)
+          gloci=gloci+j*(v2ij*cosphi-v1ij*sinphi)
         enddo
+        gloc_sc(intertyp,i-3,icg)=gloc_sc(intertyp,i-3,icg)+wsccor*gloci
+c        write (iout,*) "WTF",intertyp,i,itype(i),v1ij*cosphi+v2ij*sinphi
+c     &gloc_sc(intertyp,i-3,icg)
         if (lprn)
      &  write (iout,'(2(a3,2x,i3,2x),2i3,6f8.3/26x,6f8.3/)')
      &  restyp(itype(i-2)),i-2,restyp(itype(i-1)),i-1,itori,itori1,
-     &  (v1sccor(j,itori,itori1),j=1,6),(v2sccor(j,itori,itori1),j=1,6)
-        gsccor_loc(i-3)=gloci
+     &  (v1sccor(j,intertyp,itori,itori1),j=1,6)
+     & ,(v2sccor(j,intertyp,itori,itori1),j=1,6)
+        gsccor_loc(i-3)=gsccor_loc(i-3)+gloci
+       enddo !intertyp
       enddo
+
       return
       end
 c------------------------------------------------------------------------------
index 06e7b0b..37e0bf9 100644 (file)
@@ -475,6 +475,9 @@ C Partition local interactions
       call int_bounds(nct-nnt-2,iphi_start,iphi_end) 
       iphi_start=iphi_start+nnt+2
       iphi_end=iphi_end+nnt+2
+      call int_bounds(nres-3,itau_start,itau_end)
+      itau_start=itau_start+3
+      itau_end=itau_end+3
       if (lprint) then 
         write (iout,*) 'Processor:',MyID,
      & ' loc_start',loc_start,' loc_end',loc_end,
@@ -498,6 +501,9 @@ C Partition local interactions
       ithet_end=nres
       iphi_start=nnt+3
       iphi_end=nct
+      itau_start=4
+      itau_end=nres
+
 #endif
       return
       end 
index d29bb1f..7f6a145 100644 (file)
@@ -465,32 +465,60 @@ C
       enddo
       endif
 #endif
-C
-C 5/21/07 (AL) Read coefficients of the backbone-local sidechain-local
-C         correlation energies.
-C
-      read (isccor,*) nterm_sccor
-      do i=1,20
-        do j=1,20
-          read (isccor,'(a)')
-          do k=1,nterm_sccor
-            read (isccor,*) 
-     &        kk,v1sccor(k,i,j),v2sccor(k,i,j)
+C Read of Side-chain backbone correlation parameters
+C Modified 11 May 2012 by Adasko
+CCC
+C
+      read (isccor,*) nsccortyp
+      read (isccor,*) (isccortyp(i),i=1,ntyp)
+c      write (iout,*) 'ntortyp',ntortyp
+      maxinter=3
+cc maxinter is maximum interaction sites
+      do l=1,maxinter
+      do i=1,nsccortyp
+        do j=1,nsccortyp
+          read (isccor,*)
+     &nterm_sccor(i,j),nlor_sccor(i,j)
+          v0ijsccor=0.0d0
+          si=-1.0d0
+
+          do k=1,nterm_sccor(i,j)
+            read (isccor,*) kk,v1sccor(k,l,i,j)
+     &    ,v2sccor(k,l,i,j)
+            v0ijsccor=v0ijsccor+si*v1sccor(k,l,i,j)
+            si=-si
           enddo
+          do k=1,nlor_sccor(i,j)
+            read (isccor,*) kk,vlor1sccor(k,i,j),
+     &        vlor2sccor(k,i,j),vlor3sccor(k,i,j)
+            v0ijsccor=v0ijsccor+vlor1sccor(k,i,j)/
+     &(1+vlor3sccor(k,i,j)**2)
+          enddo
+          v0sccor(i,j)=v0ijsccor
         enddo
       enddo
+      enddo
       close (isccor)
+
       if (lprint) then
-        write (iout,'(/a/)') 'Torsional constants of SCCORR:'
-        do i=1,20
-          do j=1,20 
+        write (iout,'(/a/)') 'Torsional constants:'
+        do i=1,nsccortyp
+          do j=1,nsccortyp
             write (iout,*) 'ityp',i,' jtyp',j
-            do k=1,nterm_sccor
-              write (iout,'(2(1pe15.5))') v1sccor(k,i,j),v2sccor(k,i,j)
-            enddo 
+            write (iout,*) 'Fourier constants'
+            do k=1,nterm_sccor(i,j)
+              write (iout,'(2(1pe15.5))')
+     & v1sccor(k,l,i,j),v2sccor(k,l,i,j)
+            enddo
+            write (iout,*) 'Lorenz constants'
+            do k=1,nlor_sccor(i,j)
+              write (iout,'(3(1pe15.5))')
+     &         vlor1sccor(k,i,j),vlor2sccor(k,i,j),vlor3sccor(k,i,j)
+            enddo
           enddo
         enddo
       endif
+
 C
 C 9/18/99 (AL) Read coefficients of the Fourier expansion of the local
 C         interaction energy of the Gly, Ala, and Pro prototypes.
index d560c87..edc81d7 100644 (file)
@@ -3,7 +3,7 @@ C Store the geometric variables in the following COMMON block.
      &        mask_theta,mask_phi,mask_side
       double precision theta,phi,alph,omeg,varsave,esave,varall,vbld,
      &          thetaref,phiref,costtab,sinttab,cost2tab,sint2tab,
-     &          xxtab,yytab,zztab,xxref,yyref,zzref
+     &          xxtab,yytab,zztab,xxref,yyref,zzref,tauangle,omicron
       common /var/ theta(maxres),phi(maxres),alph(maxres),omeg(maxres),
      &          omicron(2,maxres),tauangle(3,maxres),
      &          vbld(2*maxres),thetaref(maxres),phiref(maxres),
index 755efb0..afd4fb8 100644 (file)
@@ -1,10 +1,10 @@
 C DO NOT EDIT THIS FILE - IT HAS BEEN GENERATED BY COMPINFO.C
-C 2 5 295
+C 2 5 297
       subroutine cinfo
       include 'COMMON.IOUNITS'
       write(iout,*)'++++ Compile info ++++'
-      write(iout,*)'Version 2.5 build 295'
-      write(iout,*)'compiled Mon Jun 18 05:08:20 2012'
+      write(iout,*)'Version 2.5 build 297'
+      write(iout,*)'compiled Mon Jun 25 07:29:48 2012'
       write(iout,*)'compiled by aks255@matrix.chem.cornell.edu'
       write(iout,*)'OS name:    Linux '
       write(iout,*)'OS release: 2.6.34.9-69.fc13.x86_64 '
index ba107a6..896b5a2 100644 (file)
@@ -49,8 +49,8 @@
      & alp_all(ntyp,max_parm),ebr_all(max_parm),d0cm_all(max_parm),
      & akcm_all(max_parm),akth_all(max_parm),akct_all(max_parm),
      & v1ss_all(max_parm),v2ss_all(max_parm),v3ss_all(max_parm),
-     & v1sccor_all(maxterm_sccor,ntyp,ntyp,max_parm),
-     & v2sccor_all(maxterm_sccor,ntyp,ntyp,max_parm)
+     & v1sccor_all(maxterm_sccor,3,ntyp,ntyp,max_parm),
+     & v2sccor_all(maxterm_sccor,3,ntyp,ntyp,max_parm)
       integer nlob_all(ntyp1,max_parm),nlor_all(maxtor,maxtor,max_parm),
      & nterm_all(maxtor,maxtor,max_parm),
      & ntermd1_all(maxtor,maxtor,maxtor,max_parm),
@@ -59,7 +59,7 @@
      & ithetyp_all(ntyp1,max_parm),ntheterm_all(max_parm),
      & ntheterm2_all(max_parm),ntheterm3_all(max_parm),
      & nsingle_all(max_parm),ndouble_all(max_parm),
-     & nntheterm_all(max_parm),nterm_sccor_all(max_parm)
+     & nntheterm_all(max_parm),nterm_sccor_all(max_parm,ntyp,ntyp)
       common /allparm/ ww_all,vbldp0_all,akp_all,vbldsc0_all,aksc_all,
      & abond0_all,aa0thet_all,aathet_all,bbthet_all,ccthet_all,
      & ddthet_all,eethet_all,ffthet_all,ggthet_all,
index ad412d0..2b11894 100644 (file)
@@ -3,8 +3,9 @@ C Store the geometric variables in the following COMMON block.
       double precision theta,phi,alph,omeg,vbld,vbld_ref,
      &  theta_ref,phi_ref,alph_ref,omeg_ref,
      &  costtab,sinttab,cost2tab,sint2tab,
-     &          xxtab,yytab,zztab
+     &          xxtab,yytab,zztab,tauangle,omicron
       common /var/ theta(maxres),phi(maxres),alph(maxres),omeg(maxres),
+     &          omicron(2,maxres),tauangle(3,maxres),
      &          vbld(2*maxres),
      &          costtab(maxres), sinttab(maxres), cost2tab(maxres),
      &          sint2tab(maxres),xxtab(maxres),yytab(maxres),
index ec026c7..4d9279d 100644 (file)
@@ -45,7 +45,7 @@ C and the number of terms in double torsionals
       parameter (maxtor=4,maxterm=10,maxlor=3,maxtermd_1=8,maxtermd_2=8)
 c Max number of torsional terms in SCCOR
       integer maxterm_sccor
-      parameter (maxterm_sccor=3)
+      parameter (maxterm_sccor=6)
 C Max. number of residue types and parameters in expressions for
 C virtual-bond angle bending potentials
       integer maxthetyp,maxthetyp1,maxtheterm,maxtheterm2,maxtheterm3,
deleted file mode 120000 (symlink)
index 8453cddeb7b08caf0a886e4bb11a3abc3a14980c..0000000000000000000000000000000000000000
+++ /dev/null
@@ -1 +0,0 @@
-Makefile_MPICH_ifort
\ No newline at end of file
new file mode 100644 (file)
index 0000000000000000000000000000000000000000..15fcd214d0a39845b9ebc7b5aa5e4a79f45da243
--- /dev/null
@@ -0,0 +1,68 @@
+INSTALL_DIR = /users/software/mpich-1.2.7p1_intel-10.1_em64_ssh
+BIN = ../../../bin/wham/
+FC= ifort
+#OPT = -mcmodel=medium -O3 -ip -w
+OPT = -mcmodel=medium -g -CB
+FFLAGS = ${OPT} -c -I. -I./include_unres -I$(INSTALL_DIR)/include
+LIBS = -L$(INSTALL_DIR)/lib -lmpich -lpmpich xdrf/libxdrf.a
+CPPFLAGS = -DMPI -DLINUX -DUNRES -DSPLITELE -DPROCOR -DPGI -DISNAN -DAMD64 \
+       -DCRYST_BOND -DCRYST_THETA -DCRYST_SC
+
+.f.o:
+       ${FC} ${FFLAGS} $*.f
+
+.F.o:
+       ${FC} ${FFLAGS} ${CPPFLAGS} $*.F
+
+all: make_dbase
+
+objects = \
+       wham_multparm.o \
+       bxread.o \
+       xread.o \
+       cxread.o \
+       enecalc1.o \
+       energy_p_new.o \
+       initialize_p.o \
+       molread_zs.o \
+       openunits.o \
+       readrtns.o \
+       arcos.o \
+       cartder.o \
+       cartprint.o \
+       chainbuild.o \
+       geomout.o \
+       icant.o \
+       intcor.o \
+       int_from_cart.o \
+       make_ensemble1.o \
+       matmult.o \
+       misc.o \
+       mygetenv.o \
+       parmread.o \
+       pinorm.o \
+       printmat.o \
+       proc_proc.o \
+       rescode.o \
+       setup_var.o \
+       slices.o \
+       store_parm.o \
+       timing.o \
+       wham_calc1.o
+
+objects_compar = \
+        readrtns_compar.o \
+        readpdb.o fitsq.o contact.o \
+        elecont.o contfunc.o cont_frag.o conf_compar.o match_contact.o \
+        angnorm.o odlodc.o promienie.o qwolynes.o read_ref_str.o \
+        rmscalc.o secondary.o proc_cont.o define_pairs.o mysort.o
+
+make_dbase: ${objects} ${objects_compar}
+       cc -o compinfo compinfo.c
+       ./compinfo
+       ${FC} -c ${FFLAGS} cinfo.f
+       $(FC) ${OPT} ${objects} ${objects_compar} cinfo.o \
+       ${LIBS} -static-intel -o ${BIN}/wham_multparm-ham_rep-oldparm
+
+clean:
+       /bin/rm *.o
index dfef8c3..27f9010 100644 (file)
@@ -4536,26 +4536,57 @@ C Set lprn=.true. for debugging
 c      lprn=.true.
 c      write (iout,*) "EBACK_SC_COR",iphi_start,iphi_end,nterm_sccor
       esccor=0.0D0
-      do i=iphi_start,iphi_end
+      do i=itau_start,itau_end
         esccor_ii=0.0D0
-        itori=itype(i-2)
-        itori1=itype(i-1)
+        isccori=isccortyp(itype(i-2))
+        isccori1=isccortyp(itype(i-1))
         phii=phi(i)
+cccc  Added 9 May 2012
+cc Tauangle is torsional engle depending on the value of first digit 
+c(see comment below)
+cc Omicron is flat angle depending on the value of first digit 
+c(see comment below)
+
+
+        do intertyp=1,3 !intertyp
+cc Added 09 May 2012 (Adasko)
+cc  Intertyp means interaction type of backbone mainchain correlation: 
+c   1 = SC...Ca...Ca...Ca
+c   2 = Ca...Ca...Ca...SC
+c   3 = SC...Ca...Ca...SCi
         gloci=0.0D0
-        do j=1,nterm_sccor
-          v1ij=v1sccor(j,itori,itori1)
-          v2ij=v2sccor(j,itori,itori1)
-          cosphi=dcos(j*phii)
-          sinphi=dsin(j*phii)
+        if (((intertyp.eq.3).and.((itype(i-2).eq.10).or.
+     &      (itype(i-1).eq.10).or.(itype(i-2).eq.21).or.
+     &      (itype(i-1).eq.21)))
+     &    .or. ((intertyp.eq.1).and.((itype(i-2).eq.10)
+     &     .or.(itype(i-2).eq.21)))
+     &    .or.((intertyp.eq.2).and.((itype(i-1).eq.10).or.
+     &      (itype(i-1).eq.21)))) cycle
+        if ((intertyp.eq.2).and.(i.eq.4).and.(itype(1).eq.21)) cycle
+        if ((intertyp.eq.1).and.(i.eq.nres).and.(itype(nres).eq.21))
+     & cycle
+        do j=1,nterm_sccor(isccori,isccori1)
+          v1ij=v1sccor(j,intertyp,isccori,isccori1)
+          v2ij=v2sccor(j,intertyp,isccori,isccori1)
+          cosphi=dcos(j*tauangle(intertyp,i))
+          sinphi=dsin(j*tauangle(intertyp,i))
           esccor=esccor+v1ij*cosphi+v2ij*sinphi
           gloci=gloci+j*(v2ij*cosphi-v1ij*sinphi)
         enddo
+        gloc_sc(intertyp,i-3,icg)=gloc_sc(intertyp,i-3,icg)+wsccor*gloci
+c       write (iout,*) "WTF",intertyp,i,itype(i),v1ij*cosphi+v2ij*sinphi
+c     &gloc_sc(intertyp,i-3,icg)
         if (lprn)
      &  write (iout,'(2(a3,2x,i3,2x),2i3,6f8.3/26x,6f8.3/)')
      &  restyp(itype(i-2)),i-2,restyp(itype(i-1)),i-1,itori,itori1,
-     &  (v1sccor(j,itori,itori1),j=1,6),(v2sccor(j,itori,itori1),j=1,6)
-        gsccor_loc(i-3)=gloci
+     &  (v1sccor(j,intertyp,itori,itori1),j=1,6)
+     & ,(v2sccor(j,intertyp,itori,itori1),j=1,6)
+        gsccor_loc(i-3)=gsccor_loc(i-3)+gloci
+       enddo !intertyp
       enddo
+c        do i=1,nres
+c        write (iout,*) "W@T@F",  gloc_sc(1,i,icg),gloc(i,icg)
+c        enddo
       return
       end
 c------------------------------------------------------------------------------
index 1d0f3aa..a248d99 100644 (file)
@@ -2,7 +2,7 @@
      & sigc0,dsc,dsc_inv,bsc,censc,gaussc,dsc0,vbl,vblinv,vblinv2,
      & vbl_cis,vbl0,vbld_inv
       integer nlob,loc_start,loc_end,ithet_start,ithet_end,
-     & iphi_start,iphi_end
+     & iphi_start,iphi_end,itau_start,itau_end
 C Parameters of the virtual-bond-angle probability distribution
       common /thetas/ a0thet(ntyp),athet(2,ntyp),bthet(2,ntyp),
      &  polthet(0:3,ntyp),gthet(3,ntyp),theta0(ntyp),sig0(ntyp),
@@ -31,6 +31,6 @@ C Parameters of the side-chain probability distribution
 C Virtual-bond lenghts
       common /peptbond/ vbl,vblinv,vblinv2,vbl_cis,vbl0
       common /indices/ loc_start,loc_end,ithet_start,ithet_end,
-     &                 iphi_start,iphi_end
+     &                 iphi_start,iphi_end,itau_start,itau_end
 C Inverses of the actual virtual bond lengths
       common /invlen/ vbld_inv(maxres2)
index 5217de7..06bbc01 100644 (file)
@@ -1,6 +1,16 @@
-C Parameters of the SCCOR term
-      double precision v1sccor,v2sccor
-      integer nterm_sccor
-      common/torsion/v1sccor(maxterm_sccor,20,20),
-     &    v2sccor(maxterm_sccor,20,20),
-     &    nterm_sccor
+cc Parameters of the SCCOR term
+      double precision v1sccor,v2sccor,vlor1sccor,
+     &                 vlor2sccor,vlor3sccor,gloc_sc,
+     &                 dcostau,dsintau,dtauangle,dcosomicron,
+     &                 domicron,v0sccor
+      integer nterm_sccor,isccortyp,nsccortyp,nlor_sccor
+      common/sccor/v1sccor(maxterm_sccor,3,20,20),
+     &    v2sccor(maxterm_sccor,3,20,20),
+     &    v0sccor(maxterm_sccor,20),
+     &    nterm_sccor(ntyp,ntyp),isccortyp(ntyp),nsccortyp,
+     &    nlor_sccor(ntyp,ntyp),vlor1sccor(maxterm_sccor,20,20),
+     &    vlor2sccor(maxterm_sccor,20,20),
+     &    vlor3sccor(maxterm_sccor,20,20),gloc_sc(3,0:maxres2,10),
+     &    dcostau(3,3,3,maxres2),dsintau(3,3,3,maxres2),
+     &    dtauangle(3,3,3,maxres2),dcosomicron(3,3,3,maxres2),
+     &    domicron(3,3,3,maxres2)
diff --git a/source/wham/src/include_unres/COMMON.VAR b/source/wham/src/include_unres/COMMON.VAR
new file mode 100644 (file)
index 0000000..d560c87
--- /dev/null
@@ -0,0 +1,21 @@
+C Store the geometric variables in the following COMMON block.
+      integer ntheta,nphi,nside,nvar,Origin,nstore,ialph,ivar,
+     &        mask_theta,mask_phi,mask_side
+      double precision theta,phi,alph,omeg,varsave,esave,varall,vbld,
+     &          thetaref,phiref,costtab,sinttab,cost2tab,sint2tab,
+     &          xxtab,yytab,zztab,xxref,yyref,zzref
+      common /var/ theta(maxres),phi(maxres),alph(maxres),omeg(maxres),
+     &          omicron(2,maxres),tauangle(3,maxres),
+     &          vbld(2*maxres),thetaref(maxres),phiref(maxres),
+     &          costtab(maxres), sinttab(maxres), cost2tab(maxres),
+     &          sint2tab(maxres),xxtab(maxres),yytab(maxres),
+     &          zztab(maxres),xxref(maxres),yyref(maxres),zzref(maxres),
+     &          ialph(maxres,2),ivar(4*maxres2),ntheta,nphi,nside,nvar
+C Store the angles and variables corresponding to old conformations (for use
+C in MCM).
+      common /oldgeo/ varsave(maxvar,maxsave),esave(maxsave),
+     &  Origin(maxsave),nstore
+C freeze some variables
+      logical mask_r
+      common /restr/ varall(maxvar),mask_r,mask_theta(maxres),
+     &               mask_phi(maxres),mask_side(maxres)
index 710496d..7ca29e0 100644 (file)
@@ -483,6 +483,9 @@ C Partition local interactions
       call int_bounds(nct-nnt-2,iphi_start,iphi_end) 
       iphi_start=iphi_start+nnt+2
       iphi_end=iphi_end+nnt+2
+      call int_bounds(nres-3,itau_start,itau_end)
+      itau_start=itau_start+3
+      itau_end=itau_end+3
       if (lprint) then 
         write (iout,*) 'Processor:',MyID,
      & ' loc_start',loc_start,' loc_end',loc_end,
@@ -506,6 +509,8 @@ C Partition local interactions
       ithet_end=nres
       iphi_start=nnt+3
       iphi_end=nct
+      itau_start=4
+      itau_end=nres
 #endif
       return
       end 
index ee048d8..9b5e224 100644 (file)
@@ -582,32 +582,58 @@ C
       enddo
       endif
 #endif
-C
-C 5/21/07 (AL) Read coefficients of the backbone-local sidechain-local
-C         correlation energies.
-C
-      read (isccor,*) nterm_sccor
-      do i=1,20
-        do j=1,20
-          read (isccor,'(a)')
-          do k=1,nterm_sccor
-            read (isccor,*) 
-     &        kk,v1sccor(k,i,j),v2sccor(k,i,j)
+C Read of Side-chain backbone correlation parameters
+C Modified 11 May 2012 by Adasko
+CCC
+C
+      read (isccor,*) nsccortyp
+      read (isccor,*) (isccortyp(i),i=1,ntyp)
+c      write (iout,*) 'ntortyp',ntortyp
+      maxinter=3
+cc maxinter is maximum interaction sites
+      do l=1,maxinter
+      do i=1,nsccortyp
+        do j=1,nsccortyp
+          read (isccor,*) nterm_sccor(i,j),nlor_sccor(i,j)
+          v0ijsccor=0.0d0
+          si=-1.0d0
+
+          do k=1,nterm_sccor(i,j)
+            read (isccor,*) kk,v1sccor(k,l,i,j)
+     &    ,v2sccor(k,l,i,j)
+            v0ijsccor=v0ijsccor+si*v1sccor(k,l,i,j)
+            si=-si
+          enddo
+          do k=1,nlor_sccor(i,j)
+            read (isccor,*) kk,vlor1sccor(k,i,j),
+     &        vlor2sccor(k,i,j),vlor3sccor(k,i,j)
+            v0ijsccor=v0ijsccor+vlor1sccor(k,i,j)/
+     &(1+vlor3sccor(k,i,j)**2)
           enddo
+          v0sccor(i,j)=v0ijsccor
         enddo
       enddo
+      enddo
       close (isccor)
+
       if (lprint) then
-        write (iout,'(/a/)') 'Torsional constants of SCCORR:'
-        do i=1,20
-          do j=1,20
+        write (iout,'(/a/)') 'Torsional constants:'
+        do i=1,nsccortyp
+          do j=1,nsccortyp
             write (iout,*) 'ityp',i,' jtyp',j
-            do k=1,nterm_sccor
-              write (iout,'(2(1pe15.5))') v1sccor(k,i,j),v2sccor(k,i,j)
+            write (iout,*) 'Fourier constants'
+            do k=1,nterm_sccor(i,j)
+           write (iout,'(2(1pe15.5))')v1sccor(k,l,i,j),v2sccor(k,l,i,j)
+            enddo
+            write (iout,*) 'Lorenz constants'
+            do k=1,nlor_sccor(i,j)
+              write (iout,'(3(1pe15.5))')
+     &         vlor1sccor(k,i,j),vlor2sccor(k,i,j),vlor3sccor(k,i,j)
             enddo
           enddo
         enddo
       endif
+
 C
 C 9/18/99 (AL) Read coefficients of the Fourier expansion of the local
 C         interaction energy of the Gly, Ala, and Pro prototypes.
index 0727c01..6aa33c5 100644 (file)
@@ -226,13 +226,16 @@ c Store disulfide-bond parameters
       v2ss_all(iparm)=v2ss
       v3ss_all(iparm)=v3ss
 c Store SC-backbone correlation parameters
-      nterm_sccor_all(iparm)=nterm_sccor
-      do i=1,20
-        do j=1,20
-          do k=1,nterm_sccor
-            v1sccor_all(k,i,j,iparm)=v1sccor(k,i,j)
-            v2sccor_all(k,i,j,iparm)=v2sccor(k,i,j)
+      do i=1,nsccortyp
+       do j=1,nsccortyp
+
+      nterm_sccor_all(j,i,iparm)=nterm_sccor(j,i)
+        do l=1,3
+           do k=1,nterm_sccor(j,i)
+            v1sccor_all(k,l,j,i,iparm)=v1sccor(k,l,j,i)
+            v2sccor_all(k,l,j,i,iparm)=v2sccor(k,l,j,i)
           enddo
+         enddo
         enddo
       enddo
       return
@@ -466,13 +469,18 @@ c Restore disulfide-bond parameters
       v2ss=v2ss_all(iparm)
       v3ss=v3ss_all(iparm)
 c Restore SC-backbone correlation parameters
-      nterm_sccor=nterm_sccor_all(iparm)
-      do i=1,20
-        do j=1,20
-          do k=1,nterm_sccor
-            v1sccor(k,i,j)=v1sccor_all(k,i,j,iparm)
-            v2sccor(k,i,j)=v2sccor_all(k,i,j,iparm)
+      do i=1,nsccortyp
+       do j=1,nsccortyp
+
+      nterm_sccor(j,i)=nterm_sccor_all(j,i,iparm)
+c      do i=1,20
+c        do j=1,20
+         do l=1,3
+          do k=1,nterm_sccor(j,i)
+            v1sccor(k,l,j,i)=v1sccor_all(k,l,j,i,iparm)
+            v2sccor(k,l,j,i)=v2sccor_all(k,l,j,i,iparm)
           enddo
+         enddo
         enddo
       enddo
       return