From a12fec1b1bb1405b29ce7db86524648c70f5d635 Mon Sep 17 00:00:00 2001 From: Adam Sieradzan Date: Thu, 6 Dec 2012 10:17:42 +0100 Subject: [PATCH] bugfix przekroczenia granic --- source/unres/src_MD-M/COMMON.INTERACT | 3 ++- source/unres/src_MD-M/COMMON.SCROT | 2 +- source/unres/src_MD-M/energy_p_new_barrier.F | 5 +++-- source/unres/src_MD-M/parmread.F | 3 ++- source/unres/src_MD-M/readpdb.F | 1 + source/wham/src-M/energy_p_new.F | 4 +++- 6 files changed, 12 insertions(+), 6 deletions(-) diff --git a/source/unres/src_MD-M/COMMON.INTERACT b/source/unres/src_MD-M/COMMON.INTERACT index 982ae4a..83af3fb 100644 --- a/source/unres/src_MD-M/COMMON.INTERACT +++ b/source/unres/src_MD-M/COMMON.INTERACT @@ -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 diff --git a/source/unres/src_MD-M/COMMON.SCROT b/source/unres/src_MD-M/COMMON.SCROT index 2da7b8f..a352775 100644 --- a/source/unres/src_MD-M/COMMON.SCROT +++ b/source/unres/src_MD-M/COMMON.SCROT @@ -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) diff --git a/source/unres/src_MD-M/energy_p_new_barrier.F b/source/unres/src_MD-M/energy_p_new_barrier.F index a0c2f84..e435753 100644 --- a/source/unres/src_MD-M/energy_p_new_barrier.F +++ b/source/unres/src_MD-M/energy_p_new_barrier.F @@ -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 diff --git a/source/unres/src_MD-M/parmread.F b/source/unres/src_MD-M/parmread.F index 29c5dec..61b17cc 100644 --- a/source/unres/src_MD-M/parmread.F +++ b/source/unres/src_MD-M/parmread.F @@ -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 diff --git a/source/unres/src_MD-M/readpdb.F b/source/unres/src_MD-M/readpdb.F index 1cfb213..b5305e1 100644 --- a/source/unres/src_MD-M/readpdb.F +++ b/source/unres/src_MD-M/readpdb.F @@ -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) diff --git a/source/wham/src-M/energy_p_new.F b/source/wham/src-M/energy_p_new.F index f9dbc12..b266ab4 100644 --- a/source/wham/src-M/energy_p_new.F +++ b/source/wham/src-M/energy_p_new.F @@ -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 -- 1.7.9.5