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),
& 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)
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
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
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