subroutine gen_rand_conf(nstart,*)
C Generate random conformation or chain cut and regrowth.
- implicit real*8 (a-h,o-z)
+ implicit none
include 'DIMENSIONS'
include 'COMMON.CHAIN'
include 'COMMON.LOCAL'
include 'COMMON.GEO'
include 'COMMON.CONTROL'
logical overlap,back,fail
+ integer nstart
+ integer i,j,k,it,it1,it2,nit,niter,nsi,maxsi,maxnit
+ double precision gen_theta,gen_phi,dist
cd print *,' CG Processor',me,' maxgen=',maxgen
maxsi=100
cd write (iout,*) 'Gen_Rand_conf: nstart=',nstart
end
c-------------------------------------------------------------------------
logical function overlap(i)
- implicit real*8 (a-h,o-z)
+ implicit none
include 'DIMENSIONS'
include 'COMMON.CHAIN'
include 'COMMON.INTERACT'
include 'COMMON.FFIELD'
- data redfac /0.5D0/
+ double precision redfac /0.5D0/
+ integer i,j,k,iti,itj,iteli,itelj
+ double precision rcomp
+ double precision dist
overlap=.false.
iti=iabs(itype(i))
if (iti.gt.ntyp) return
call chainbuild_extconf
call overlap_sc_list(ioverlap,ioverlap_last)
-c write (iout,*) 'Overlaping residues ',ioverlap_last,
-c & (ioverlap(j),j=1,ioverlap_last)
+ write (iout,*) 'Overlaping residues ',ioverlap_last,
+ & (ioverlap(j),j=1,ioverlap_last)
enddo
if (k.le.1000.and.ioverlap_last.eq.0) then
integer ioverlap(maxres),ioverlap_last
data redfac /0.5D0/
+c write (iout,*) "overlap_sc_list"
ioverlap_last=0
C Check for SC-SC overlaps and mark residues
c print *,'>>overlap_sc nnt=',nnt,' nct=',nct
ind=0
+c write(iout,*) "iatsc_s",iatsc_s," iatsc_e",iatsc_e
do i=iatsc_s,iatsc_e
itypi=iabs(itype(i))
itypi1=iabs(itype(i+1))
else
rcomp=sigma(itypi,itypj)
endif
-c print '(2(a3,2i3),a3,2f10.5)',
+c write (iout,'(2(a3,2i3),a3,2f10.5)'),
c & ' i=',i,iti,' j=',j,itj,' d=',dist(nres+i,nres+j)
c & ,rcomp
xj=c(1,nres+j)-xi
rrij=1.0D0/(xj*xj+yj*yj+zj*zj)
rij=dsqrt(rrij)
call sc_angular
+c write (iout,*) "dxj",dxj," dyj",dyj," dzj",dzj
+c write (iout,*) "erij",erij
+c write (iout,*) "om1",om1," om2",om2," om12",om12,
+c & " faceps1",faceps1," eps1",eps1
+c write (iout,*) "sigsq",sigsq
sigsq=1.0D0/sigsq
sig=sig0ij*dsqrt(sigsq)
rij_shift=1.0D0/rij-sig+sig0ij
-
-ct if ( 1.0/rij .lt. redfac*rcomp .or.
-ct & rij_shift.le.0.0D0 ) then
+c write (iout,*) "rij_shift",rij_shift
+c if ( 1.0/rij .lt. redfac*rcomp .or.
+c & rij_shift.le.0.0D0 ) then
+c write (iout,'(a,i3,a,i3,a,f10.5,a,3f10.5)')
+c & 'overlap SC-SC: i=',i,' j=',j,
+c & ' dist=',dist(nres+i,nres+j),' rcomp=',
+c & rcomp,1.0/rij,rij_shift
if ( rij_shift.le.0.0D0 ) then
-cd write (iout,'(a,i3,a,i3,a,f10.5,a,3f10.5)')
-cd & 'overlap SC-SC: i=',i,' j=',j,
-cd & ' dist=',dist(nres+i,nres+j),' rcomp=',
-cd & rcomp,1.0/rij,rij_shift
+c write (iout,*) "overlap",i,j
ioverlap_last=ioverlap_last+1
ioverlap(ioverlap_last)=i
do k=1,ioverlap_last-1