bugfix przekroczenia granic
authorAdam Sieradzan <adasko@mmka.chem.univ.gda.pl>
Thu, 6 Dec 2012 09:17:42 +0000 (10:17 +0100)
committerAdam Sieradzan <adasko@mmka.chem.univ.gda.pl>
Thu, 6 Dec 2012 09:17:42 +0000 (10:17 +0100)
source/unres/src_MD-M/COMMON.INTERACT
source/unres/src_MD-M/COMMON.SCROT
source/unres/src_MD-M/energy_p_new_barrier.F
source/unres/src_MD-M/parmread.F
source/unres/src_MD-M/readpdb.F
source/wham/src-M/energy_p_new.F

index 982ae4a..83af3fb 100644 (file)
@@ -21,7 +21,8 @@ C 12/1/95 Array EPS included in the COMMON block.
      & sigmaii(ntyp,ntyp),
      & rs0(ntyp,ntyp),chi(ntyp,ntyp),chip(ntyp),alp(ntyp),sigma0(ntyp),
      & sigii(ntyp),rr0(ntyp),r0(ntyp,ntyp),r0e(ntyp,ntyp),r0d(ntyp,2),
-     & rpp(2,2),epp(2,2),elpp6(2,2),elpp3(2,2),eps_scp(20,2),rscp(20,2)
+     & rpp(2,2),epp(2,2),elpp6(2,2),elpp3(2,2),eps_scp(ntyp,2),
+     & rscp(ntyp,2)
 c 12/5/03 modified 09/18/03 Bond stretching parameters.
       double precision vbldp0,vbldsc0,akp,aksc,abond0,distchainmax
       integer nbondterm
index 2da7b8f..a352775 100644 (file)
@@ -1,3 +1,3 @@
 C Parameters of the SC rotamers (local) term
       double precision sc_parmin
-      common/scrot/sc_parmin(maxsccoef,20)
+      common/scrot/sc_parmin(maxsccoef,ntyp)
index a0c2f84..e435753 100644 (file)
@@ -3956,8 +3956,9 @@ C Uncomment following three lines for Ca-p interactions
           endif
           evdwij=e1+e2
           evdw2=evdw2+evdwij
-          if (energy_dec) write (iout,'(a6,2i5,0pf7.3)')
-     &        'evdw2',i,j,evdwij
+          if (energy_dec) write (iout,'(a6,2i5,0pf7.3,2i3,3e11.3)')
+     &        'evdw2',i,j,evdwij,iteli,itypj,fac,aad(itypj,iteli),
+     &       bad(itypj,iteli)
 C
 C Calculate contributions to the gradient in the virtual-bond and SC vectors.
 C
index 29c5dec..61b17cc 100644 (file)
@@ -1140,7 +1140,7 @@ C
         bad(i,1)=-2*eps_scp(i,1)*rscp(i,1)**6
         bad(i,2)=-2*eps_scp(i,2)*rscp(i,2)**6
       enddo
-
+      lprint=.true.
       if (lprint) then
         write (iout,*) "Parameters of SC-p interactions:"
         do i=1,ntyp
@@ -1148,6 +1148,7 @@ C
      &     eps_scp(i,2),rscp(i,2),aad(i,1),bad(i,1),aad(i,2),bad(i,2)
         enddo
       endif
+      lprint=.false.
 #endif
 C
 C Define the constants of the disulfide bridge
index 1cfb213..b5305e1 100644 (file)
@@ -230,6 +230,7 @@ c       write (iout,*) "spraw lancuchy",(c(j,i),j=1,3)
          enddo
       enddo
       write (iout,*) chain_length
+      if (chain_length.eq.0) chain_length=nres
       do j=1,3
       chain_rep(j,chain_length,symetr)=chain_rep(j,chain_length,1)
       chain_rep(j,chain_length+nres,symetr)
index f9dbc12..b266ab4 100644 (file)
@@ -2835,7 +2835,9 @@ C Uncomment following three lines for Ca-p interactions
             evdw2_14=evdw2_14+e1+e2
           endif
           evdwij=e1+e2
-c          write (iout,*) i,j,evdwij
+          write (iout,'(a6,2i5,0pf7.3,2i3,3e11.3)')
+     &        'evdw2',i,j,evdwij,iteli,itypj,fac,aad(itypj,iteli),
+     &       bad(itypj,iteli)
           evdw2=evdw2+evdwij
           if (calc_grad) then
 C