Wprowadzenie SCCOR do WHAMa i CLUSTROWNIA
authorAdam Kazimierz Sieradzan <adasko@sun1.chem.univ.gda.pl>
Wed, 27 Jun 2012 11:32:25 +0000 (07:32 -0400)
committerAdam Kazimierz Sieradzan <adasko@sun1.chem.univ.gda.pl>
Wed, 27 Jun 2012 11:32:25 +0000 (07:32 -0400)
24 files changed:
.gitignore
bin/unres/MD/unres_ifort_MPICH_GAB.exe
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
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
source/wham/src/cinfo.f
source/wham/src/energy_p_new.F
source/wham/src/include_unres/COMMON.LOCAL
source/wham/src/include_unres/COMMON.SCCOR
source/wham/src/initialize_p.F
source/wham/src/parmread.F
source/wham/src/store_parm.F
source/wham/src/tmptmp

index 2035385..bac4617 100644 (file)
@@ -1,4 +1,4 @@
-~.[oa]
+*.[oa]
 gradcheck/
 mapcheck/
 run/
index 51bbafe..e8a026b 100755 (executable)
Binary files a/bin/unres/MD/unres_ifort_MPICH_GAB.exe and b/bin/unres/MD/unres_ifort_MPICH_GAB.exe 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,
index 3402c53..2f5d84f 100644 (file)
@@ -1,11 +1,11 @@
 INSTALL_DIR = /users/software/mpich-1.2.7p1_intel-10.1_em64_ssh
-BIN=/users/adam/ZSCOREZ/bin
+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 ../srcWHAM-Tsccor/xdrf/libxdrf.a -g -d2 -CA -CB
+LIBS = -L$(INSTALL_DIR)/lib -lmpich ../../../wham/src/xdrf/libxdrf.a -g -d2 -CA -CB
 
 .c.o:
        cc -c -DLINUX -DPGI $*.c
index 1b69eb3..f29e57d 100644 (file)
@@ -4409,26 +4409,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 9b22a2e..f4b921c 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,
index 97240fb..5b5eba7 100644 (file)
@@ -1,5 +1,5 @@
 INSTALL_DIR = /users/software/mpich-1.2.7p1_intel-10.1_em64_ssh
-BIN = ../bin
+BIN = ../../../bin
 FC= ifort
 #OPT = -mcmodel=medium -O3 -ip -w
 OPT = -mcmodel=medium -g -CB
index a3988c1..aa71fbb 100644 (file)
@@ -1,17 +1,17 @@
 C DO NOT EDIT THIS FILE - IT HAS BEEN GENERATED BY COMPINFO.C
-C 0 0 496
+C 0 0 504
       subroutine cinfo
       include 'COMMON.IOUNITS'
       write(iout,*)'++++ Compile info ++++'
-      write(iout,*)'Version 0.0 build 496'
-      write(iout,*)'compiled Sun Feb 19 04:44:59 2012'
-      write(iout,*)'compiled by adam@matrix.chem.cornell.edu'
+      write(iout,*)'Version 0.0 build 504'
+      write(iout,*)'compiled Thu Jun 21 08:40:33 2012'
+      write(iout,*)'compiled by aks255@matrix.chem.cornell.edu'
       write(iout,*)'OS name:    Linux '
-      write(iout,*)'OS release: 2.6.34.8-68.fc13.x86_64 '
-      write(iout,*)'OS version: #1 SMP Thu Feb 17 15:03:58 UTC 2011 '
+      write(iout,*)'OS release: 2.6.34.9-69.fc13.x86_64 '
+      write(iout,*)'OS version: #1 SMP Tue May 3 09:23:03 UTC 2011 '
       write(iout,*)'flags:'
       write(iout,*)'INSTALL_DIR = /users/software/mpich-1.2.7p1_int...'
-      write(iout,*)'BIN = ../bin'
+      write(iout,*)'BIN = ../../../bin'
       write(iout,*)'FC= ifort'
       write(iout,*)'OPT = -mcmodel=medium -g -CB'
       write(iout,*)'FFLAGS = ${OPT} -c -I. -I./include_unres -I$(IN...'
index 052d8c3..06bdd76 100644 (file)
@@ -4494,26 +4494,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)
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