gcorr_loc(i)=0.0d0
enddo
do i=iatel_s,iatel_e
- if (i.eq.1) then
- if (itype(i).eq.ntyp1.or. itype(i+1).eq.ntyp1
- & .or. itype(i+2).eq.ntyp1) cycle
- else
+ if (i.eq.1) cycle
+C if (itype(i).eq.ntyp1.or. itype(i+1).eq.ntyp1
+C & .or. itype(i+2).eq.ntyp1) cycle
+C else
if (itype(i).eq.ntyp1 .or. itype(i+1).eq.ntyp1
& .or. itype(i+2).eq.ntyp1
& .or. itype(i-1).eq.ntyp1
&) cycle
- endif
+C endif
if (itel(i).eq.0) goto 1215
dxi=dc(1,i)
dyi=dc(2,i)
num_conti=0
c write (iout,*) 'i',i,' ielstart',ielstart(i),' ielend',ielend(i)
do j=ielstart(i),ielend(i)
- if (j.eq.1) then
- if (itype(j).eq.ntyp1 .or. itype(j+1).eq.ntyp1
- & .or.itype(j+2).eq.ntyp1
- &) cycle
- else
+ if (j.eq.1) cycle
+C if (itype(j).eq.ntyp1 .or. itype(j+1).eq.Cntyp1
+C & .or.itype(j+2).eq.ntyp1
+C &) cycle
+C else
if (itype(j).eq.ntyp1 .or. itype(j+1).eq.ntyp1
& .or.itype(j+2).eq.ntyp1
& .or.itype(j-1).eq.ntyp1
&) cycle
- endif
+C endif
if (itel(j).eq.0) goto 1216
ind=ind+1
iteli=itel(i)
if (yj.lt.0) yj=yj+boxysize
zj=mod(zj,boxzsize)
if (zj.lt.0) zj=zj+boxzsize
- dist_init=(xj-xi)**2+(yj-yi)**2+(zj-zi)**2
+ dist_init=(xj-xmedi)**2+(yj-ymedi)**2+(zj-zmedi)**2
xj_safe=xj
yj_safe=yj
zj_safe=zj
xj=xj_safe+xshift*boxxsize
yj=yj_safe+yshift*boxysize
zj=zj_safe+zshift*boxzsize
- dist_temp=(xj-xi)**2+(yj-yi)**2+(zj-zi)**2
+ dist_temp=(xj-xmedi)**2+(yj-ymedi)**2+(zj-zmedi)**2
if(dist_temp.lt.dist_init) then
dist_init=dist_temp
xj_temp=xj
call openunits
call parmread
call read_control
+ write(iout,*) "afert readcontrol"
call molread
c if (refstr) call read_ref_structure(*30)
do i=1,nres
C
C Read weights of the subsequent energy terms.
call card_concat(weightcard)
+ write(iout,*) weightcard
call reada(weightcard,'WSC',wsc,1.0d0)
call reada(weightcard,'WLONG',wsc,wsc)
+ write(iout,*) "WLONG=",wsc
call reada(weightcard,'WSCP',wscp,1.0d0)
call reada(weightcard,'WELEC',welec,1.0D0)
call reada(weightcard,'WVDWPP',wvdwpp,welec)
call reada(weightcard,"V2SS",v2ss,7.61d0)
call reada(weightcard,"V3SS",v3ss,13.7d0)
call reada(weightcard,"EBR",ebr,-5.50D0)
+ write (iout,*) "atriss",atriss
call reada(weightcard,"ATRISS",atriss,0.301D0)
call reada(weightcard,"BTRISS",btriss,0.021D0)
call reada(weightcard,"CTRISS",ctriss,1.001D0)
call reada(weightcard,"DTRISS",dtriss,1.001D0)
+ write(iout,*) "after"
write (iout,*) "ATRISS=", atriss
write (iout,*) "BTRISS=", btriss
write (iout,*) "CTRISS=", ctriss
& wtor_d,wstrain,wel_loc,wcorr,wcorr5,wcorr6,wturn3,
& wturn4,wturn6,wsccor
10 format (/'Energy-term weights (unscaled):'//
- & 'WSCC= ',f10.6,' (SC-SC)'/
+ & 'WSC= ',f10.6,' (SC-SC)'/
& 'WSCP= ',f10.6,' (SC-p)'/
& 'WELEC= ',f10.6,' (p-p electr)'/
& 'WVDWPP= ',f10.6,' (p-p VDW)'/
logical lprn /.false./, lprn1 /.false./
etheta=0.0D0
do i=ithet_start,ithet_end
+ if (i.le.2) cycle
c print *,i,itype(i-1),itype(i),itype(i-2)
if ((itype(i-1).eq.ntyp1).or.itype(i-2).eq.ntyp1
& .or.itype(i).eq.ntyp1) cycle
sinkt(k)=dsin(k*theti2)
enddo
C print *,ethetai
+ if (i.eq.3) then
+ phii=0.0d0
+ ityp1=nthetyp+1
+ do k=1,nsingle
+ cosph1(k)=0.0d0
+ sinph1(k)=0.0d0
+ enddo
+ else
+
if (i.gt.3 .and. itype(i-3).ne.ntyp1) then
#ifdef OSF
phii=phi(i)
sinph1(k)=0.0d0
enddo
endif
+ endif
if (i.lt.nres .and. itype(i+1).ne.ntyp1) then
#ifdef OSF
phii1=phi(i+1)
endif
call int_from_cart1(.false.)
do j=nnt+1,nct
+ if (wliptran.gt.0d0) then
+ if (itype(j-1).ne.ntyp1 .and. itype(j).ne.ntyp1 .and.
+ & (vbld(j).lt.2.0d0 .or. vbld(j).gt.5.3d0)) then
+ if (iprint.gt.0)
+ & write (iout,*) "Bad CA-CA bond length",j," ",vbld(j),
+ & " for conformation",ii,wliptran
+ if (iprint.gt.1) then
+ write (iout,*) "The Cartesian geometry is:"
+ write (iout,'(8f10.5)') ((c(l,k),l=1,3),k=1,nres)
+ write (iout,'(8f10.5)') ((c(l,k+nres),l=1,3),k=nnt,nct)
+ write (iout,*) "The internal geometry is:"
+ write (iout,'(8f10.4)') (vbld(k),k=nnt+1,nct)
+ write (iout,'(8f10.4)') (vbld(k),k=nres+nnt,nres+nct)
+ write (iout,'(8f10.4)') (rad2deg*theta(k),k=3,nres)
+ write (iout,'(8f10.4)') (rad2deg*phi(k),k=4,nres)
+ write (iout,'(8f10.4)') (rad2deg*alph(k),k=2,nres-1)
+ write (iout,'(8f10.4)') (rad2deg*omeg(k),k=2,nres-1)
+ endif
+ if (iprint.gt.0) write (iout,*)
+ & "This conformation WILL NOT be added to the database."
+ conf_check=.false.
+ return
+ endif
+
+ else
if (itype(j-1).ne.ntyp1 .and. itype(j).ne.ntyp1 .and.
& (vbld(j).lt.2.0d0 .or. vbld(j).gt.5.0d0)) then
if (iprint.gt.0)
& write (iout,*) "Bad CA-CA bond length",j," ",vbld(j),
- & " for conformation",ii
+ & " for conformation",ii,wliptran
if (iprint.gt.1) then
write (iout,*) "The Cartesian geometry is:"
write (iout,'(8f10.5)') ((c(l,k),l=1,3),k=1,nres)
conf_check=.false.
return
endif
+ endif
enddo
do j=nnt,nct
itj=itype(j)
gcorr_loc(i)=0.0d0
enddo
do i=iatel_s,iatel_e
- write (iout,*) i,"i2",itype(i)
+C write (iout,*) i,"i2",itype(i)
if (i.eq.1) cycle
C if (itype(i).eq.ntyp1.or. itype(i+1).eq.ntyp1
C & .or. itype(i+2).eq.ntyp1) cycle
etheta=0.0D0
c write (iout,*) "ithetyp",(ithetyp(i),i=1,ntyp1)
do i=ithet_start,ithet_end
-C if (i.eq.2) cycle
+ if (i.eq.2) cycle
C if (itype(i-1).eq.ntyp1) cycle
- if (i.le.2) cycle
+C if (i.le.2) cycle
if ((itype(i-1).eq.ntyp1).or.itype(i-2).eq.ntyp1
& .or.itype(i).eq.ntyp1) cycle
if (iabs(itype(i+1)).eq.20) iblock=2