!
! Define the origin and orientation of the coordinate system and locate the
! first three CA's and SC(2).
!
! Define the origin and orientation of the coordinate system and locate the
! first three CA's and SC(2).
be1=rad2deg*beta(nres+i,i,nres2+2,i+1)
alfai=0.0D0
if (i.gt.2) alfai=rad2deg*alpha(i-2,i-1,i)
be1=rad2deg*beta(nres+i,i,nres2+2,i+1)
alfai=0.0D0
if (i.gt.2) alfai=rad2deg*alpha(i-2,i-1,i)
- write (iout,1212) restyp(itype(i)),i,dist(i-1,i),&
+ write (iout,1212) restyp(itype(i,1),1),i,dist(i-1,i),&
alfai,be,dist(nres+i,i),rad2deg*alpha(nres+i,i,nres2+2),be1
enddo
1212 format (a3,'(',i3,')',2(f10.5,2f10.2))
alfai,be,dist(nres+i,i),rad2deg*alpha(nres+i,i,nres2+2),be1
enddo
1212 format (a3,'(',i3,')',2(f10.5,2f10.2))
real(kind=8) :: alphi,omegi,theta2
real(kind=8) :: dsci,dsci_inv,sinalphi,cosalphi,cosomegi,sinomegi
real(kind=8) :: xp,yp,zp,cost2,sint2,rj
real(kind=8) :: alphi,omegi,theta2
real(kind=8) :: dsci,dsci_inv,sinalphi,cosalphi,cosomegi,sinomegi
real(kind=8) :: xp,yp,zp,cost2,sint2,rj
-!d print '(a3,i3,3f10.5,5x,3f10.5)',restyp(itype(i)),i,
+!d print '(a3,i3,3f10.5,5x,3f10.5)',restyp(itype(i,1)),i,
!d & xp,yp,zp,(xx(k),k=1,3)
do j=1,3
xloc(j,i)=xx(j)
!d & xp,yp,zp,(xx(k),k=1,3)
do j=1,3
xloc(j,i)=xx(j)
be=0.0D0
if (i.gt.2) then
if (i.le.nres) phi(i+1)=beta(i-2,i-1,i,i+1)
be=0.0D0
if (i.gt.2) then
if (i.le.nres) phi(i+1)=beta(i-2,i-1,i,i+1)
tauangle(3,i+1)=beta(i+nres-1,i-1,i,i+nres)
endif
tauangle(3,i+1)=beta(i+nres-1,i-1,i,i+nres)
endif
tauangle(1,i+1)=beta(i-1+nres,i-1,i,i+1)
omicron(1,i)=alpha(i-2,i-1,i-1+nres)
omicron(2,i)=alpha(i-1+nres,i-1,i)
endif
tauangle(1,i+1)=beta(i-1+nres,i-1,i,i+1)
omicron(1,i)=alpha(i-2,i-1,i-1+nres)
omicron(2,i)=alpha(i-1+nres,i-1,i)
endif
tauangle(2,i+1)=beta(i-2,i-1,i,i+nres)
endif
endif
tauangle(2,i+1)=beta(i-2,i-1,i,i+nres)
endif
endif
vbld(i)=dist(i-1,i)
vbld_inv(i)=1.0d0/vbld(i)
vbld(nres+i)=dist(nres+i,i)
vbld(i)=dist(i-1,i)
vbld_inv(i)=1.0d0/vbld(i)
vbld(nres+i)=dist(nres+i,i)
- write (iout,1212) restyp(itype(i)),i,vbld(i),&
+ write (iout,1212) restyp(itype(i,1),1),i,vbld(i),&
rad2deg*theta(i),rad2deg*phi(i),vbld(nres+i),&
rad2deg*alph(i),rad2deg*omeg(i)
enddo
rad2deg*theta(i),rad2deg*phi(i),vbld(nres+i),&
rad2deg*alph(i),rad2deg*omeg(i)
enddo
- open (20,file=restyp(it)//'_distr.sdc',status='unknown')
+ open (20,file=restyp(it,1)//'_distr.sdc',status='unknown')
call gen_side(it,90.0D0 * deg2rad,al,om,fail)
close (20)
goto 10
call gen_side(it,90.0D0 * deg2rad,al,om,fail)
close (20)
goto 10
- open (20,file=restyp(it)//'_distr1.sdc',status='unknown')
+ open (20,file=restyp(it,1)//'_distr1.sdc',status='unknown')
- it1=iabs(itype(2))
- phi(4)=gen_phi(4,iabs(itype(2)),iabs(itype(3)))
+ it1=iabs(itype(2,1))
+ phi(4)=gen_phi(4,iabs(itype(2,1)),iabs(itype(3,1)))
- if (nstart.lt.3) theta(3)=gen_theta(iabs(itype(2)),pi,phi(4))
+ if (nstart.lt.3) theta(3)=gen_theta(iabs(itype(2,1)),pi,phi(4))
! print *,'Gen_Rand_Conf: i=',i,' it=',it,' it1=',it1,' it2=',it2,
! & ' nit=',nit,' niter=',niter,' maxgen=',maxgen
phi(i+1)=gen_phi(i+1,it1,it)
! print *,'Gen_Rand_Conf: i=',i,' it=',it,' it1=',it1,' it2=',it2,
! & ' nit=',nit,' niter=',niter,' maxgen=',maxgen
phi(i+1)=gen_phi(i+1,it1,it)
if (iti.gt.ntyp) return
! Check for SC-SC overlaps.
!d print *,'nnt=',nnt,' nct=',nct
do j=nnt,i-1
if (iti.gt.ntyp) return
! Check for SC-SC overlaps.
!d print *,'nnt=',nnt,' nct=',nct
do j=nnt,i-1
c(j,nres2+3)=0.5D0*(c(j,i)+c(j,i+1))
enddo
do j=nnt,i-2
c(j,nres2+3)=0.5D0*(c(j,i)+c(j,i+1))
enddo
do j=nnt,i-2
!d print *,'overlap, p-Sc: i=',i,' j=',j,
!d & ' dist=',dist(nres+j,maxres2+1)
if (dist(nres+j,nres2+3).lt.4.0D0*redfac) then
!d print *,'overlap, p-Sc: i=',i,' j=',j,
!d & ' dist=',dist(nres+j,maxres2+1)
if (dist(nres+j,nres2+3).lt.4.0D0*redfac) then
! print *,'>>overlap_sc nnt=',nnt,' nct=',nct
ind=0
do i=iatsc_s,iatsc_e
! print *,'>>overlap_sc nnt=',nnt,' nct=',nct
ind=0
do i=iatsc_s,iatsc_e
do iint=1,nint_gr(i)
do j=istart(i,iint),iend(i,iint)
ind=ind+1
do iint=1,nint_gr(i)
do j=istart(i,iint),iend(i,iint)
ind=ind+1
- iti=itype(i)
- if (dist(i,i+1).lt.2.0D0 .or. dist(i,i+1).gt.5.0D0) then
+ iti=itype(i,1)
+ if ((dist(i,i+1).lt.2.0D0 .or. dist(i,i+1).gt.5.0D0).and.&
+ (iti.ne.ntyp1 .and. itype(i+1,1).ne.ntyp1)) then
write (iout,'(a,i4)') 'Bad Cartesians for residue',i
!test stop
endif
write (iout,'(a,i4)') 'Bad Cartesians for residue',i
!test stop
endif
! do j=1,3
! c(j,1)=c(j,2)+(c(j,3)-c(j,4))
! enddo
! endif
! do j=1,3
! c(j,1)=c(j,2)+(c(j,3)-c(j,4))
! enddo
! endif
! do j=1,3
! c(j,nres)=c(j,nres-1)+(c(j,nres-2)-c(j,nres-3))
! enddo
! endif
!#endif
! if (unres_pdb) then
! do j=1,3
! c(j,nres)=c(j,nres-1)+(c(j,nres-2)-c(j,nres-3))
! enddo
! endif
!#endif
! if (unres_pdb) then
+(c(j,i+1)-c(j,i))*vbld_inv(i+1))
! in wham c(j,maxres2)=0.5D0*(c(j,i-1)+c(j,i+1)
enddo
+(c(j,i+1)-c(j,i))*vbld_inv(i+1))
! in wham c(j,maxres2)=0.5D0*(c(j,i-1)+c(j,i+1)
enddo
- if (itype(i).ne.10 .and. itype(i).ne.ntyp1 .and. di.eq.0.0d0) &
- di=dsc(itype(i))
+
+ if (itype(i,1).ne.10 .and. itype(i,1).ne.ntyp1 .and. di.eq.0.0d0) &
+ di=dsc(itype(i,molnum(i)))
alph(i)=alpha(nres+i,i,nres2+2)
omeg(i)=beta(nres+i,i,nres2+2,i+1)
endif
alph(i)=alpha(nres+i,i,nres2+2)
omeg(i)=beta(nres+i,i,nres2+2,i+1)
endif
- write (iout,'(a3,i4,7f10.3)') restyp(iti),i,vbld(i),&
+ write (iout,'(a3,i4,7f10.3)') restyp(iti,1),i,vbld(i),&
rad2deg*theta(i),rad2deg*phi(i),dsc(iti),vbld(nres+i),&
rad2deg*alph(i),rad2deg*omeg(i)
endif
rad2deg*theta(i),rad2deg*phi(i),dsc(iti),vbld(nres+i),&
rad2deg*alph(i),rad2deg*omeg(i)
endif
+ else
+ if(me.eq.king.or..not.out1file)then
+ if (lprn) &
+ write (iout,'(a3,i4,7f10.3)') restyp(iti,1),i,vbld(i),&
+ rad2deg*theta(i),rad2deg*phi(i),dsc(iti+1),vbld(nres+i),&
+ rad2deg*alph(i),rad2deg*omeg(i)
+ endif
+ endif
- write (iout,'(a3,i4,7f10.3)') restyp(iti),i,dist(i,i-1),&
+ write (iout,'(a3,i4,7f10.3)') restyp(iti,1),i,dist(i,i-1),&
do j=1,3
dc_norm(j,i+nres)=vbld_inv(i+nres)*(c(j,i+nres)-c(j,i))
enddo
do j=1,3
dc_norm(j,i+nres)=vbld_inv(i+nres)*(c(j,i+nres)-c(j,i))
enddo
- write (iout,'(a3,i4,3f10.5)') restyp(iti),i,xxref(i),&
+ write (iout,'(a3,i4,3f10.5)') restyp(iti,1),i,xxref(i),&
integer :: i,j,ires,nscat
real(kind=8),dimension(3,20) :: sccor
real(kind=8) :: sccmj
integer :: i,j,ires,nscat
real(kind=8),dimension(3,20) :: sccor
real(kind=8) :: sccmj
- vbld(i+1+nres)=dsc(itype(i+1))
- vbld_inv(i+1+nres)=dsc_inv(itype(i+1))
+ vbld(i+1+nres)=dsc(itype(i+1,1))
+ vbld_inv(i+1+nres)=dsc_inv(itype(i+1,1))
do j=1,3
gcart(j,1)=gcart(j,1)+gloc(1,icg)*dphi(j,1,4) &
+gloc(nres-2,icg)*dtheta(j,1,3)
do j=1,3
gcart(j,1)=gcart(j,1)+gloc(1,icg)*dphi(j,1,4) &
+gloc(nres-2,icg)*dtheta(j,1,3)
gcart(j,1)=gcart(j,1)+gloc(ialph(2,1),icg)*dalpha(j,1,2)+ &
gloc(ialph(2,1)+nside,icg)*domega(j,1,2)
endif
gcart(j,1)=gcart(j,1)+gloc(ialph(2,1),icg)*dalpha(j,1,2)+ &
gloc(ialph(2,1)+nside,icg)*domega(j,1,2)
endif
do j=1,3
gcart(j,2)=gcart(j,2)+gloc(1,icg)*dphi(j,2,4)+ &
gloc(nres-2,icg)*dtheta(j,2,3)+gloc(nres-1,icg)*dtheta(j,1,4)
do j=1,3
gcart(j,2)=gcart(j,2)+gloc(1,icg)*dphi(j,2,4)+ &
gloc(nres-2,icg)*dtheta(j,2,3)+gloc(nres-1,icg)*dtheta(j,1,4)
gcart(j,2)=gcart(j,2)+gloc(ialph(2,1),icg)*dalpha(j,2,2)+ &
gloc(ialph(2,1)+nside,icg)*domega(j,2,2)
endif
gcart(j,2)=gcart(j,2)+gloc(ialph(2,1),icg)*dalpha(j,2,2)+ &
gloc(ialph(2,1)+nside,icg)*domega(j,2,2)
endif
gcart(j,2)=gcart(j,2)+gloc(ialph(3,1),icg)*dalpha(j,1,3)+ &
gloc(ialph(3,1)+nside,icg)*domega(j,1,3)
endif
gcart(j,2)=gcart(j,2)+gloc(ialph(3,1),icg)*dalpha(j,1,3)+ &
gloc(ialph(3,1)+nside,icg)*domega(j,1,3)
endif
gcart(j,3)=gcart(j,3)+gloc(1,icg)*dphi(j,3,4)+gloc(2,icg)* &
dphi(j,2,5)+gloc(nres-1,icg)*dtheta(j,2,4)+gloc(nres,icg)* &
dtheta(j,1,5)
gcart(j,3)=gcart(j,3)+gloc(1,icg)*dphi(j,3,4)+gloc(2,icg)* &
dphi(j,2,5)+gloc(nres-1,icg)*dtheta(j,2,4)+gloc(nres,icg)* &
dtheta(j,1,5)
gcart(j,3)=gcart(j,3)+gloc(ialph(3,1),icg)* &
dalpha(j,2,3)+gloc(ialph(3,1)+nside,icg)*domega(j,2,3)
endif
gcart(j,3)=gcart(j,3)+gloc(ialph(3,1),icg)* &
dalpha(j,2,3)+gloc(ialph(3,1)+nside,icg)*domega(j,2,3)
endif
gcart(j,3)=gcart(j,3)+gloc(ialph(4,1),icg)* &
dalpha(j,1,4)+gloc(ialph(4,1)+nside,icg)*domega(j,1,4)
endif
gcart(j,3)=gcart(j,3)+gloc(ialph(4,1),icg)* &
dalpha(j,1,4)+gloc(ialph(4,1)+nside,icg)*domega(j,1,4)
endif
+gloc(i-1,icg)*dphi(j,2,i+2)+ &
gloc(i,icg)*dphi(j,1,i+3)+gloc(nres+i-4,icg)*dtheta(j,2,i+1)+ &
gloc(nres+i-3,icg)*dtheta(j,1,i+2)
+gloc(i-1,icg)*dphi(j,2,i+2)+ &
gloc(i,icg)*dphi(j,1,i+3)+gloc(nres+i-4,icg)*dtheta(j,2,i+1)+ &
gloc(nres+i-3,icg)*dtheta(j,1,i+2)
gcart(j,i)=gcart(j,i)+gloc(ialph(i,1),icg)*dalpha(j,2,i)+ &
gloc(ialph(i,1)+nside,icg)*domega(j,2,i)
endif
gcart(j,i)=gcart(j,i)+gloc(ialph(i,1),icg)*dalpha(j,2,i)+ &
gloc(ialph(i,1)+nside,icg)*domega(j,2,i)
endif
gcart(j,i)=gcart(j,i)+gloc(ialph(i+1,1),icg)*dalpha(j,1,i+1) &
+gloc(ialph(i+1,1)+nside,icg)*domega(j,1,i+1)
endif
gcart(j,i)=gcart(j,i)+gloc(ialph(i+1,1),icg)*dalpha(j,1,i+1) &
+gloc(ialph(i+1,1)+nside,icg)*domega(j,1,i+1)
endif
dphi(j,3,nres-1)+gloc(nres-3,icg)*dphi(j,2,nres) &
+gloc(2*nres-6,icg)* &
dtheta(j,2,nres-1)+gloc(2*nres-5,icg)*dtheta(j,1,nres)
dphi(j,3,nres-1)+gloc(nres-3,icg)*dphi(j,2,nres) &
+gloc(2*nres-6,icg)* &
dtheta(j,2,nres-1)+gloc(2*nres-5,icg)*dtheta(j,1,nres)
gcart(j,nres-2)=gcart(j,nres-2)+gloc(ialph(nres-2,1),icg)* &
dalpha(j,2,nres-2)+gloc(ialph(nres-2,1)+nside,icg)* &
domega(j,2,nres-2)
endif
gcart(j,nres-2)=gcart(j,nres-2)+gloc(ialph(nres-2,1),icg)* &
dalpha(j,2,nres-2)+gloc(ialph(nres-2,1)+nside,icg)* &
domega(j,2,nres-2)
endif
gcart(j,nres-2)=gcart(j,nres-2)+gloc(ialph(nres-1,1),icg)* &
dalpha(j,1,nres-1)+gloc(ialph(nres-1,1)+nside,icg)* &
domega(j,1,nres-1)
gcart(j,nres-2)=gcart(j,nres-2)+gloc(ialph(nres-1,1),icg)* &
dalpha(j,1,nres-1)+gloc(ialph(nres-1,1)+nside,icg)* &
domega(j,1,nres-1)
do j=1,3
gcart(j,nres-1)=gcart(j,nres-1)+gloc(nres-3,icg)*dphi(j,3,nres)+ &
gloc(2*nres-5,icg)*dtheta(j,2,nres)
do j=1,3
gcart(j,nres-1)=gcart(j,nres-1)+gloc(nres-3,icg)*dphi(j,3,nres)+ &
gloc(2*nres-5,icg)*dtheta(j,2,nres)
gcart(j,nres-1)=gcart(j,nres-1)+gloc(ialph(nres-1,1),icg)* &
dalpha(j,2,nres-1)+gloc(ialph(nres-1,1)+nside,icg)* &
domega(j,2,nres-1)
gcart(j,nres-1)=gcart(j,nres-1)+gloc(ialph(nres-1,1),icg)* &
dalpha(j,2,nres-1)+gloc(ialph(nres-1,1)+nside,icg)* &
domega(j,2,nres-1)
do j=1,3
gxcart(j,i)=gxcart(j,i)+gloc(ialph(i,1),icg)*dalpha(j,3,i) &
+gloc(ialph(i,1)+nside,icg)*domega(j,3,i)
do j=1,3
gxcart(j,i)=gxcart(j,i)+gloc(ialph(i,1),icg)*dalpha(j,3,i) &
+gloc(ialph(i,1)+nside,icg)*domega(j,3,i)
! write (iout,*) "poczotkoawy",i,gloc_sc(1,i,icg)
! enddo
if (nres.lt.2) return
! write (iout,*) "poczotkoawy",i,gloc_sc(1,i,icg)
! enddo
if (nres.lt.2) return
- if ((nres.lt.3).and.(itype(1).eq.10)) return
- if ((itype(1).ne.10).and.(itype(1).ne.ntyp1)) then
+ if ((nres.lt.3).and.(itype(1,1).eq.10)) return
+ if ((itype(1,1).ne.10).and.(itype(1,1).ne.ntyp1)) then
do j=1,3
!c Derviative was calculated for oposite vector of side chain therefore
! there is "-" sign before gloc_sc
do j=1,3
!c Derviative was calculated for oposite vector of side chain therefore
! there is "-" sign before gloc_sc
dtauangle(j,1,1,3)
gcart(j,1)=gcart(j,1)+gloc_sc(1,0,icg)* &
dtauangle(j,1,2,3)
dtauangle(j,1,1,3)
gcart(j,1)=gcart(j,1)+gloc_sc(1,0,icg)* &
dtauangle(j,1,2,3)
gxcart(j,1)= gxcart(j,1) &
-gloc_sc(3,0,icg)*dtauangle(j,3,1,3)
gcart(j,1)=gcart(j,1)+gloc_sc(3,0,icg)* &
gxcart(j,1)= gxcart(j,1) &
-gloc_sc(3,0,icg)*dtauangle(j,3,1,3)
gcart(j,1)=gcart(j,1)+gloc_sc(3,0,icg)* &
then
do j=1,3
gcart(j,1)=gcart(j,1)+gloc_sc(2,1,icg)*dtauangle(j,2,1,4)
then
do j=1,3
gcart(j,1)=gcart(j,1)+gloc_sc(2,1,icg)*dtauangle(j,2,1,4)
- if((itype(2).ne.10).and.(itype(2).ne.ntyp1)) then
- if (itype(1).ne.10) gxcart(j,2)=gxcart(j,2)+ &
+ if((itype(2,1).ne.10).and.(itype(2,1).ne.ntyp1)) then
+ if (itype(1,1).ne.10) gxcart(j,2)=gxcart(j,2)+ &
gloc_sc(3,0,icg)*dtauangle(j,3,3,3)
gloc_sc(3,0,icg)*dtauangle(j,3,3,3)
then
gxcart(j,2)=gxcart(j,2)-gloc_sc(3,1,icg)*dtauangle(j,3,1,4)
!c the - above is due to different vector direction
then
gxcart(j,2)=gxcart(j,2)-gloc_sc(3,1,icg)*dtauangle(j,3,1,4)
!c the - above is due to different vector direction
! write(iout,*) gloc_sc(1,1,icg),dtauangle(j,1,1,4),"gx"
endif
endif
! write(iout,*) gloc_sc(1,1,icg),dtauangle(j,1,1,4),"gx"
endif
endif
gcart(j,2)=gcart(j,2)+gloc_sc(1,0,icg)*dtauangle(j,1,3,3)
! write(iout,*) gloc_sc(1,0,icg),dtauangle(j,1,3,3)
endif
gcart(j,2)=gcart(j,2)+gloc_sc(1,0,icg)*dtauangle(j,1,3,3)
! write(iout,*) gloc_sc(1,0,icg),dtauangle(j,1,3,3)
endif
gcart(j,2)=gcart(j,2)+gloc_sc(2,1,icg)*dtauangle(j,2,2,4)
! write(iout,*) gloc_sc(2,1,icg),dtauangle(j,2,2,4)
endif
gcart(j,2)=gcart(j,2)+gloc_sc(2,1,icg)*dtauangle(j,2,2,4)
! write(iout,*) gloc_sc(2,1,icg),dtauangle(j,2,2,4)
endif
gcart(j,2)=gcart(j,2)+gloc_sc(2,2,icg)*dtauangle(j,2,1,5)
! write(iout,*) gloc_sc(2,2,icg),dtauangle(j,2,1,5)
endif
gcart(j,2)=gcart(j,2)+gloc_sc(2,2,icg)*dtauangle(j,2,1,5)
! write(iout,*) gloc_sc(2,2,icg),dtauangle(j,2,1,5)
endif
-! write(iout,*) gcart(j,2),itype(2),itype(1),itype(3), "gcart2"
+! write(iout,*) gcart(j,2),itype(2,1),itype(1,1),itype(3,1), "gcart2"
enddo
! If there are more than five residues
if(nres.ge.5) then
do i=3,nres-2
do j=1,3
! write(iout,*) "before", gcart(j,i)
enddo
! If there are more than five residues
if(nres.ge.5) then
do i=3,nres-2
do j=1,3
! write(iout,*) "before", gcart(j,i)
gxcart(j,i)=gxcart(j,i)+gloc_sc(2,i-2,icg) &
*dtauangle(j,2,3,i+1) &
-gloc_sc(1,i-1,icg)*dtauangle(j,1,1,i+2)
gxcart(j,i)=gxcart(j,i)+gloc_sc(2,i-2,icg) &
*dtauangle(j,2,3,i+1) &
-gloc_sc(1,i-1,icg)*dtauangle(j,1,1,i+2)
*dtauangle(j,1,2,i+2)
! write(iout,*) "new",j,i,
! & gcart(j,i),gloc_sc(1,i-1,icg),dtauangle(j,1,2,i+2)
*dtauangle(j,1,2,i+2)
! write(iout,*) "new",j,i,
! & gcart(j,i),gloc_sc(1,i-1,icg),dtauangle(j,1,2,i+2)
gxcart(j,i)=gxcart(j,i)+gloc_sc(3,i-2,icg) &
*dtauangle(j,3,3,i+1)
endif
gxcart(j,i)=gxcart(j,i)+gloc_sc(3,i-2,icg) &
*dtauangle(j,3,3,i+1)
endif
gxcart(j,i)=gxcart(j,i)-gloc_sc(3,i-1,icg) &
*dtauangle(j,3,1,i+2)
gcart(j,i)=gcart(j,i)+gloc_sc(3,i-1,icg) &
*dtauangle(j,3,2,i+2)
endif
endif
gxcart(j,i)=gxcart(j,i)-gloc_sc(3,i-1,icg) &
*dtauangle(j,3,1,i+2)
gcart(j,i)=gcart(j,i)+gloc_sc(3,i-1,icg) &
*dtauangle(j,3,2,i+2)
endif
endif
gcart(j,i)=gcart(j,i)+gloc_sc(1,i-2,icg)* &
dtauangle(j,1,3,i+1)
endif
gcart(j,i)=gcart(j,i)+gloc_sc(1,i-2,icg)* &
dtauangle(j,1,3,i+1)
endif
gcart(j,i)=gcart(j,i)+gloc_sc(2,i-1,icg)* &
dtauangle(j,2,2,i+2)
! write(iout,*) "numer",i,gloc_sc(2,i-1,icg),
! & dtauangle(j,2,2,i+2)
endif
gcart(j,i)=gcart(j,i)+gloc_sc(2,i-1,icg)* &
dtauangle(j,2,2,i+2)
! write(iout,*) "numer",i,gloc_sc(2,i-1,icg),
! & dtauangle(j,2,2,i+2)
endif
gcart(j,i)=gcart(j,i)+gloc_sc(2,i,icg)* &
dtauangle(j,2,1,i+3)
endif
gcart(j,i)=gcart(j,i)+gloc_sc(2,i,icg)* &
dtauangle(j,2,1,i+3)
endif
gxcart(j,nres-1)=gxcart(j,nres-1)+gloc_sc(2,nres-3,icg) &
*dtauangle(j,2,3,nres)
! write (iout,*) "gxcart(nres-1)", gloc_sc(2,nres-3,icg),
! & dtauangle(j,2,3,nres), gxcart(j,nres-1)
gxcart(j,nres-1)=gxcart(j,nres-1)+gloc_sc(2,nres-3,icg) &
*dtauangle(j,2,3,nres)
! write (iout,*) "gxcart(nres-1)", gloc_sc(2,nres-3,icg),
! & dtauangle(j,2,3,nres), gxcart(j,nres-1)
gxcart(j,nres-1)=gxcart(j,nres-1)+gloc_sc(3,nres-3,icg) &
*dtauangle(j,3,3,nres)
endif
gxcart(j,nres-1)=gxcart(j,nres-1)+gloc_sc(3,nres-3,icg) &
*dtauangle(j,3,3,nres)
endif
gxcart(j,nres-1)=gxcart(j,nres-1)-gloc_sc(3,nres-2,icg) &
*dtauangle(j,3,1,nres+1)
gcart(j,nres-1)=gcart(j,nres-1)+gloc_sc(3,nres-2,icg) &
*dtauangle(j,3,2,nres+1)
endif
endif
gxcart(j,nres-1)=gxcart(j,nres-1)-gloc_sc(3,nres-2,icg) &
*dtauangle(j,3,1,nres+1)
gcart(j,nres-1)=gcart(j,nres-1)+gloc_sc(3,nres-2,icg) &
*dtauangle(j,3,2,nres+1)
endif
endif
gcart(j,nres-1)=gcart(j,nres-1)+gloc_sc(1,nres-3,icg)* &
dtauangle(j,1,3,nres)
endif
gcart(j,nres-1)=gcart(j,nres-1)+gloc_sc(1,nres-3,icg)* &
dtauangle(j,1,3,nres)
endif
gcart(j,nres-1)=gcart(j,nres-1)+gloc_sc(2,nres-2,icg)* &
dtauangle(j,2,2,nres+1)
! write (iout,*) "gcart(nres-1)", gloc_sc(2,nres-2,icg),
gcart(j,nres-1)=gcart(j,nres-1)+gloc_sc(2,nres-2,icg)* &
dtauangle(j,2,2,nres+1)
! write (iout,*) "gcart(nres-1)", gloc_sc(2,nres-2,icg),
-! & dtauangle(j,2,2,nres+1), itype(nres-1),itype(nres)
+! & dtauangle(j,2,2,nres+1), itype(nres-1,1),itype(nres,1)
- if ((nres.ge.3).and.(itype(nres).ne.10).and. &
- (itype(nres).ne.ntyp1))then
+ if ((nres.ge.3).and.(itype(nres,1).ne.10).and. &
+ (itype(nres,1).ne.ntyp1))then
do j=1,3
gxcart(j,nres)=gxcart(j,nres)+gloc_sc(3,nres-2,icg) &
*dtauangle(j,3,3,nres+1)+gloc_sc(2,nres-2,icg) &
do j=1,3
gxcart(j,nres)=gxcart(j,nres)+gloc_sc(3,nres-2,icg) &
*dtauangle(j,3,3,nres+1)+gloc_sc(2,nres-2,icg) &
- write (iout,110) restyp(itype(i)),i,c(1,i),c(2,i),&
+ write (iout,110) restyp(itype(i,1),1),i,c(1,i),c(2,i),&
c(3,i),c(1,nres+i),c(2,nres+i),c(3,nres+i)
enddo
100 format (//' alpha-carbon coordinates ',&
c(3,i),c(1,nres+i),c(2,nres+i),c(3,nres+i)
enddo
100 format (//' alpha-carbon coordinates ',&