From b4054889e690bb9994dc79deb014e5acd8611d76 Mon Sep 17 00:00:00 2001 From: Adam Sieradzan Date: Tue, 5 Nov 2013 18:49:55 +0100 Subject: [PATCH] Debug part 5 --- source/unres/src_MD-M/COMMON.SCCOR | 2 +- source/unres/src_MD/COMMON.SCCOR | 5 +---- source/unres/src_MD/gen_rand_conf.F | 3 ++- source/unres/src_MD/initialize_p.F | 8 ++++++-- source/unres/src_MD/intcartderiv.F | 6 +++--- 5 files changed, 13 insertions(+), 11 deletions(-) diff --git a/source/unres/src_MD-M/COMMON.SCCOR b/source/unres/src_MD-M/COMMON.SCCOR index 154de36..7952bd1 100644 --- a/source/unres/src_MD-M/COMMON.SCCOR +++ b/source/unres/src_MD-M/COMMON.SCCOR @@ -2,7 +2,7 @@ cc Parameters of the SCCOR term double precision v1sccor,v2sccor,vlor1sccor, & vlor2sccor,vlor3sccor,gloc_sc, & dcostau,dsintau,dtauangle,dcosomicron, - & domicron + & domicron,v0sccor integer nterm_sccor,isccortyp,nsccortyp,nlor_sccor common/sccor/v1sccor(maxterm_sccor,3,-ntyp:ntyp,-ntyp:ntyp), & v2sccor(maxterm_sccor,3,-ntyp:ntyp,-ntyp:ntyp), diff --git a/source/unres/src_MD/COMMON.SCCOR b/source/unres/src_MD/COMMON.SCCOR index 1922d2b..154de36 100644 --- a/source/unres/src_MD/COMMON.SCCOR +++ b/source/unres/src_MD/COMMON.SCCOR @@ -13,9 +13,6 @@ cc Parameters of the SCCOR term & vlor1sccor(maxterm_sccor,20,20), & vlor2sccor(maxterm_sccor,20,20), & vlor3sccor(maxterm_sccor,20,20),gloc_sc(3,0:maxres2,10), - & v0sccor(ntyp,ntyp), & 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), - & nterm_sccor(ntyp,ntyp),isccortyp(ntyp),nsccortyp, - & nlor_sccor(ntyp,ntyp) + & domicron(3,3,3,maxres2) diff --git a/source/unres/src_MD/gen_rand_conf.F b/source/unres/src_MD/gen_rand_conf.F index 6cc31ba..e5d278e 100644 --- a/source/unres/src_MD/gen_rand_conf.F +++ b/source/unres/src_MD/gen_rand_conf.F @@ -238,7 +238,8 @@ c print *,'gen_theta: it=',it endif thet_pred_mean=a0thet(it) do k=1,2 - thet_pred_mean=thet_pred_mean+athet(k,it)*y(k)+bthet(k,it)*z(k) + thet_pred_mean=thet_pred_mean+athet(k,it,1,1)*y(k) + & +bthet(k,it,1,1)*z(k) enddo sig=polthet(3,it) do j=2,0,-1 diff --git a/source/unres/src_MD/initialize_p.F b/source/unres/src_MD/initialize_p.F index 565ccaf..18451d6 100644 --- a/source/unres/src_MD/initialize_p.F +++ b/source/unres/src_MD/initialize_p.F @@ -164,8 +164,12 @@ c call memmon_print_usage() rr0(i)=0.0D0 a0thet(i)=0.0D0 do j=1,2 - athet(j,i)=0.0D0 - bthet(j,i)=0.0D0 + do k=-1,1 + do kk=-1,1 + athet(j,i,k,kk)=0.0D0 + bthet(j,i,k,kk)=0.0D0 + enddo + enddo enddo do j=0,3 polthet(j,i)=0.0D0 diff --git a/source/unres/src_MD/intcartderiv.F b/source/unres/src_MD/intcartderiv.F index 5da4fc7..c4bf31c 100644 --- a/source/unres/src_MD/intcartderiv.F +++ b/source/unres/src_MD/intcartderiv.F @@ -61,11 +61,11 @@ c We need dtheta(:,:,i-1) to compute dphi(:,:,i) CC Calculate derivative over first omicron (Cai-2,Cai-1,SCi-1) dcosomicron(j,1,1,i)=-(dc_norm(j,i-1+nres)+ & cost1*dc_norm(j,i-2))/ - & vbld(i-1) - domicron(j,1,1,i)=-1/sint1*dcosomicron(j,1,1,i) + & vbld(i-1) + domicron(j,1,1,i)=-1.0/sint1*dcosomicron(j,1,1,i) dcosomicron(j,1,2,i)=-(dc_norm(j,i-2) & +cost1*(dc_norm(j,i-1+nres)))/ - & vbld(i-1+nres) + & vbld(i-1+nres) domicron(j,1,2,i)=-1/sint1*dcosomicron(j,1,2,i) CC Calculate derivative over second omicron Sci-1,Cai-1 Cai CC Looks messy but better than if in loop -- 1.7.9.5