- 11 continue
- do jk=6,1,-1
- write (*,'(i4,a3,10i4)') jk,'A',(bstrand(i,jk),i=1,nbstrand)
- enddo
-
-
- enddo
-
- do i=1,nres
- if (betasheet(i).ne.0) write(*,*) i,betasheet(i),ibetasheet(i)
- enddo
- write(*,*)
- do j=6,1,-1
- write (*,'(i4,a3,10i4)') j,':',(bstrand(i,j),i=1,nbstrand)
- enddo
-
-c------------------------
- nifb=0
- do i=1,nbstrand
- do j=i+1,nbstrand
- if(iabs(bstrand(i,5)-bstrand(j,5)).le.5 .or.
- & iabs(bstrand(i,6)-bstrand(j,6)).le.5 ) then
- nifb=nifb+1
- ifb(nifb,1)=bstrand(i,4)
- ifb(nifb,2)=bstrand(j,4)
- endif
- enddo
- enddo
-
- write(*,*)
- do i=1,nifb
- write (*,'(a3,20i4)') "ifb",i,ifb(i,1),ifb(i,2)
- enddo
-
- do i=1,nbstrand
- ifa(i)=bstrand(i,4)
- enddo
- write (*,'(a3,20i4)') "ifa",(ifa(i),i=1,nbstrand)
-
- nif=iabs(bstrand(1,6)-bstrand(1,5))+1
- do j=2,nbstrand
- if (iabs(bstrand(j,6)-bstrand(j,5))+1.gt.nif)
- & nif=iabs(bstrand(j,6)-bstrand(j,5))+1
- enddo
-
- write(*,*) nif
- do i=1,nif
- do j=1,nbstrand
- if(j,i)=bstrand(j,6)+(i-1)*sign(1,bstrand(j,5)-bstrand(j,6))
- if (if(j,i).gt.0) then
- if(betasheet(if(j,i)).eq.0 .or.
- & ibetasheet(if(j,i)).ne.iabs(bstrand(j,4))) if(j,i)=0
- else
- if(j,i)=0
- endif
- enddo
- write(*,'(a3,10i4)') 'if ',(if(j,i),j=1,nbstrand)
- enddo
-
-c read (inp,*) (ifa(i),i=1,4)
-c do i=1,nres
-c read (inp,*,err=20,end=20) (if(j,i),j=1,4)
-c enddo
-c 20 nif=i-1
- stop
-c------------------------
-
- isa=4
- is=2*isa-1
- iconf=0
-cccccccccccccccccccccccccccccccccc
- DO ig=1,is**isa-1
-cccccccccccccccccccccccccccccccccc
-
- ii=ig
- do j=1,is
- istrand(is-j+1)=int(ii/is**(is-j))
- ii=ii-istrand(is-j+1)*is**(is-j)
- enddo
- ltest=.true.
- do k=1,isa
- istrand(k)=istrand(k)+1
- if(istrand(k).gt.isa) istrand(k)=istrand(k)-2*isa-1
- enddo
- do k=1,isa
- do l=1,isa
- if(istrand(k).eq.istrand(l).and.k.ne.l.or.
- & istrand(k).eq.-istrand(l).and.k.ne.l) ltest=.false.
- enddo
- enddo
-
- lifb0=1
- do m=1,nifb
- lifb(m)=0
- do k=1,isa-1
- if(
- & ifb(m,1).eq.istrand(k).and.ifb(m,2).eq.istrand(k+1).or.
- & ifb(m,2).eq.istrand(k).and.ifb(m,1).eq.istrand(k+1).or.
- & -ifb(m,1).eq.istrand(k).and.-ifb(m,2).eq.istrand(k+1).or.
- & -ifb(m,2).eq.istrand(k).and.-ifb(m,1).eq.istrand(k+1))
- & lifb(m)=1
- enddo
- lifb0=lifb0*lifb(m)
- enddo
-
- if (mod(isa,2).eq.0) then
- do k=isa/2+1,isa
- if (istrand(k).eq.1) ltest=.false.
- enddo
- else
- do k=(isa+1)/2+1,isa
- if (istrand(k).eq.1) ltest=.false.
- enddo
- endif
-
- IF (ltest.and.lifb0.eq.1) THEN
- iconf=iconf+1
-
- call var_to_geom(nvar,vorg)
-
- write (*,'(i5,i10,10i3)') iconf,ig,(istrand(k),k=1,isa)
- write (iout,'(i5,i10,10i3)') iconf,ig,(istrand(k),k=1,isa)
- write (linia,'(10i3)') (istrand(k),k=1,isa)
-
- do i=1,nres
- do j=1,nres
- ibc(i,j)=0
- enddo
- enddo
-
-
- do i=1,4
- if ( sign(1,istrand(i)).eq.sign(1,ifa(iabs(istrand(i)))) ) then
- do j=1,nif
- itmp(iabs(istrand(i)),j)=if(iabs(ifa(iabs(istrand(i)))),j)
- enddo
- else
- do j=1,nif
- itmp(iabs(istrand(i)),j)=if(iabs(ifa(iabs(istrand(i)))),nif-j+1)
- enddo
- endif
- enddo
-
- do i=1,nif
- write(*,*) (itmp(j,i),j=1,4)
- enddo
-
- do i=1,nif
-c ifa(1),ifa(2),ifa(3),ifa(4)
-c if(1,i),if(2,i),if(3,i),if(4,i)
- do k=1,isa-1
- ltest=.false.
- do m=1,nifb
- if(
- & ifb(m,1).eq.istrand(k).and.ifb(m,2).eq.istrand(k+1).or.
- & ifb(m,2).eq.istrand(k).and.ifb(m,1).eq.istrand(k+1).or.
- & -ifb(m,1).eq.istrand(k).and.-ifb(m,2).eq.istrand(k+1).or.
- & -ifb(m,2).eq.istrand(k).and.-ifb(m,1).eq.istrand(k+1))
- & then
- ltest=.true.
- goto 110
- endif
- enddo
- 110 continue
- if (ltest) then
- ibc(itmp(iabs(istrand(k)),i),itmp(iabs(istrand(k+1)),i))=-1
- else
- ibc(itmp(iabs(istrand(k)),i),itmp(iabs(istrand(k+1)),i))=-2
- endif
-c
- if (k.lt.3)
- & ibc(itmp(iabs(istrand(k)),i),itmp(iabs(istrand(k+2)),i))=-3
- if (k.lt.2)
- & ibc(itmp(iabs(istrand(k)),i),itmp(iabs(istrand(k+3)),i))=-4
- enddo
- enddo
-c------------------------
-
-c
-c freeze sec.elements
-c
- do i=1,nres
- mask(i)=1
- mask_phi(i)=1
- mask_theta(i)=1
- mask_side(i)=1
- enddo
-
- do j=1,nbfrag
- do i=bfrag(1,j),bfrag(2,j)
- mask(i)=0
- mask_phi(i)=0
- mask_theta(i)=0
- enddo
- if (bfrag(3,j).le.bfrag(4,j)) then
- do i=bfrag(3,j),bfrag(4,j)
- mask(i)=0
- mask_phi(i)=0
- mask_theta(i)=0
- enddo
- else
- do i=bfrag(4,j),bfrag(3,j)
- mask(i)=0
- mask_phi(i)=0
- mask_theta(i)=0
- enddo
- endif
- enddo
- do j=1,nhfrag
- do i=hfrag(1,j),hfrag(2,j)
- mask(i)=0
- mask_phi(i)=0
- mask_theta(i)=0
- enddo
- enddo
- mask_r=.true.
-
-c------------------------
-c generate constrains
-c
- nhpb0=nhpb
- call chainbuild
- ind=0
- do i=1,nres-3
- do j=i+3,nres
- ind=ind+1
- if ( ibc(i,j).eq.-1 .or. ibc(j,i).eq.-1) then
- d0(ind)=DIST(i,j)
- w(ind)=10.0
- nhpb=nhpb+1
- ihpb(nhpb)=i
- jhpb(nhpb)=j
- forcon(nhpb)=10.0
- dhpb(nhpb)=d0(ind)
- else if ( ibc(i,j).eq.-2 .or. ibc(j,i).eq.-2) then
- d0(ind)=5.0
- w(ind)=10.0
- nhpb=nhpb+1
- ihpb(nhpb)=i
- jhpb(nhpb)=j
- forcon(nhpb)=10.0
- dhpb(nhpb)=d0(ind)
- else if ( ibc(i,j).eq.-3 .or. ibc(j,i).eq.-3) then
- d0(ind)=11.0
- w(ind)=10.0
- nhpb=nhpb+1
- ihpb(nhpb)=i
- jhpb(nhpb)=j
- forcon(nhpb)=10.0
- dhpb(nhpb)=d0(ind)
- else if ( ibc(i,j).eq.-4 .or. ibc(j,i).eq.-4) then
- d0(ind)=16.0
- w(ind)=10.0
- nhpb=nhpb+1
- ihpb(nhpb)=i
- jhpb(nhpb)=j
- forcon(nhpb)=10.0
- dhpb(nhpb)=d0(ind)
- else if ( ibc(i,j).gt.0 ) then
- d0(ind)=DIST(i,ibc(i,j))
- w(ind)=10.0
- nhpb=nhpb+1
- ihpb(nhpb)=i
- jhpb(nhpb)=j
- forcon(nhpb)=10.0
- dhpb(nhpb)=d0(ind)
- else if ( ibc(j,i).gt.0 ) then
- d0(ind)=DIST(ibc(j,i),j)
- w(ind)=10.0
- nhpb=nhpb+1
- ihpb(nhpb)=i
- jhpb(nhpb)=j
- forcon(nhpb)=10.0
- dhpb(nhpb)=d0(ind)
- else
- w(ind)=0.0
- endif
- dd(ind)=d0(ind)
- enddo
- enddo
- call hpb_partition
-cd--------------------------
-
- write(iout,'(i3,2i4,a3,2i4,f7.2)') (i,ibc(ihpb(i),jhpb(i)),
- & ibc(jhpb(i),ihpb(i)),' --',
- & ihpb(i),jhpb(i),dhpb(i),i=1,nhpb)
-
-cd nhpb=0
-cd goto 901
-c
-c
- call contact_cp_min(varia,ifun,iconf,linia,debug)
- if (minim) then
-#ifdef MPI
- time0=MPI_WTIME()
-#else
- time0=tcpu()
-#endif
- call minimize(etot,varia,iretcode,nfun)
- write(iout,*)'------------------------------------------------'
- write(iout,*)'SUMSL return code is',iretcode,' eval ',nfun,
- & '+ DIST eval',ifun
-#ifdef MPI
- time1=MPI_WTIME()
-#else
- time0=tcpu()
-#endif
- write (iout,'(a,f6.2,f8.2,a)')' Time for full min.',time1-time0,
- & nfun/(time1-time0),' eval/s'
-
- write (linia,'(a10,10i3)') 'full_min',(istrand(k),k=1,isa)
- call var_to_geom(nvar,varia)
- call chainbuild
- call write_pdb(900+iconf,linia,etot)
- endif
-
- call etotal(energy(0))
- etot=energy(0)
- call enerprint(energy(0))
-cd call intout
-cd call briefout(0,etot)
-cd call secondary2(.true.)
-
- 901 CONTINUE
-ctest return
-cccccccccccccccccccccccccccccccccccc
- ENDIF
- ENDDO
-cccccccccccccccccccccccccccccccccccc
-
- return
- 10 write (iout,'(a)') 'Error reading test structure.'
- return
- end
-c--------------------------------------------------------
-
- subroutine test3
- implicit real*8 (a-h,o-z)
- include 'DIMENSIONS'
-#ifdef MPI
- include 'mpif.h'
-#endif
- include 'COMMON.GEO'
- include 'COMMON.CHAIN'
- include 'COMMON.IOUNITS'
- include 'COMMON.VAR'
- include 'COMMON.CONTROL'
- include 'COMMON.SBRIDGE'
- include 'COMMON.FFIELD'
- include 'COMMON.MINIM'
-c
- include 'COMMON.DISTFIT'
- integer if(3,maxres),nif
- integer ibc(maxres,maxres),istrand(20)
- integer ibd(maxres),ifb(10,2),nifb,lifb(10),lifb0
- double precision time0,time1
- double precision energy(0:n_ene),ee
- double precision varia(maxvar)
-c
- logical debug,ltest
- character*50 linia
-c
- do i=1,nres
- read (inp,*,err=20,end=20) if(1,i),if(2,i),if(3,i)
- enddo
- 20 nif=i-1
- write (*,'(a4,3i5)') ('if =',if(1,i),if(2,i),if(3,i),
- & i=1,nif)
-
-
-c------------------------
- call secondary2(debug)
-c------------------------
- do i=1,nres
- do j=1,nres
- ibc(i,j)=0
- enddo
- enddo
-
-c
-c freeze sec.elements and store indexes for beta constrains
-c
- do i=1,nres
- mask(i)=1
- mask_phi(i)=1
- mask_theta(i)=1
- mask_side(i)=1
- enddo
-
- do j=1,nbfrag
- do i=bfrag(1,j),bfrag(2,j)
- mask(i)=0
- mask_phi(i)=0
- mask_theta(i)=0
- enddo
- if (bfrag(3,j).le.bfrag(4,j)) then
- do i=bfrag(3,j),bfrag(4,j)
- mask(i)=0
- mask_phi(i)=0
- mask_theta(i)=0
- ibc(bfrag(1,j)+i-bfrag(3,j),i)=-1
- enddo
- else
- do i=bfrag(4,j),bfrag(3,j)
- mask(i)=0
- mask_phi(i)=0
- mask_theta(i)=0
- ibc(bfrag(2,j)-i+bfrag(4,j),i)=-1
- enddo
- endif
- enddo
- do j=1,nhfrag
- do i=hfrag(1,j),hfrag(2,j)
- mask(i)=0
- mask_phi(i)=0
- mask_theta(i)=0
- enddo
- enddo
- mask_r=.true.
-
-
-c ---------------- test --------------
- do i=1,nif
- if (ibc(if(1,i),if(2,i)).eq.-1) then
- ibc(if(1,i),if(2,i))=if(3,i)
- ibc(if(1,i),if(3,i))=if(2,i)
- else if (ibc(if(2,i),if(1,i)).eq.-1) then
- ibc(if(2,i),if(1,i))=0
- ibc(if(1,i),if(2,i))=if(3,i)
- ibc(if(1,i),if(3,i))=if(2,i)
- else
- ibc(if(1,i),if(2,i))=if(3,i)
- ibc(if(1,i),if(3,i))=if(2,i)
- endif
- enddo
-
- do i=1,nres
- do j=1,nres
- if (ibc(i,j).ne.0) write(*,'(3i5)') i,j,ibc(i,j)
- enddo
- enddo
-c------------------------
- call chainbuild
- ind=0
- do i=1,nres-3
- do j=i+3,nres
- ind=ind+1
- if ( ibc(i,j).eq.-1 ) then
- d0(ind)=DIST(i,j)
- w(ind)=10.0
- nhpb=nhpb+1
- ihpb(nhpb)=i
- jhpb(nhpb)=j
- forcon(nhpb)=10.0
- dhpb(nhpb)=d0(ind)
- else if ( ibc(i,j).gt.0 ) then
- d0(ind)=DIST(i,ibc(i,j))
- w(ind)=10.0
- nhpb=nhpb+1
- ihpb(nhpb)=i
- jhpb(nhpb)=j
- forcon(nhpb)=10.0
- dhpb(nhpb)=d0(ind)
- else if ( ibc(j,i).gt.0 ) then
- d0(ind)=DIST(ibc(j,i),j)
- w(ind)=10.0
- nhpb=nhpb+1
- ihpb(nhpb)=i
- jhpb(nhpb)=j
- forcon(nhpb)=10.0
- dhpb(nhpb)=d0(ind)
- else
- w(ind)=0.0
- endif
- enddo
- enddo
- call hpb_partition
-
-cd--------------------------
- write(*,'(i3,2i4,a3,2i4,f7.2)') (i,ibc(ihpb(i),jhpb(i)),
- & ibc(jhpb(i),ihpb(i)),' --',
- & ihpb(i),jhpb(i),dhpb(i),i=1,nhpb)
-
-
- linia='dist'
- debug=.true.
- in_pdb=7
-c
- call contact_cp_min(varia,ieval,in_pdb,linia,debug)
- if (minim) then
-#ifdef MPI
- time0=MPI_WTIME()
-#else
- time0=tcpu()
-#endif
- call minimize(etot,varia,iretcode,nfun)
- write(iout,*)'------------------------------------------------'
- write(iout,*)'SUMSL return code is',iretcode,' eval ',nfun,
- & '+ DIST eval',ieval
-#ifdef MPI
- time1=MPI_WTIME()
-#else
- time0=tcpu()
-#endif
- write (iout,'(a,f6.2,f8.2,a)')' Time for full min.',time1-time0,
- & nfun/(time1-time0),' eval/s'
-
-
- call var_to_geom(nvar,varia)
- call chainbuild
- call write_pdb(999,'full min',etot)
- endif
-
- call etotal(energy(0))
- etot=energy(0)
- call enerprint(energy(0))
- call intout
- call briefout(0,etot)
- call secondary2(.true.)
-
- return
- 10 write (iout,'(a)') 'Error reading test structure.'
- return
- end
-
-
-
-
- subroutine test__
- implicit real*8 (a-h,o-z)
- include 'DIMENSIONS'
-#ifdef MPI
- include 'mpif.h'
-#endif
- include 'COMMON.GEO'
- include 'COMMON.CHAIN'
- include 'COMMON.IOUNITS'
- include 'COMMON.VAR'
- include 'COMMON.CONTROL'
- include 'COMMON.SBRIDGE'
- include 'COMMON.FFIELD'
- include 'COMMON.MINIM'
-c
- include 'COMMON.DISTFIT'
- integer if(2,2),ind
- integer iff(maxres)
- double precision time0,time1
- double precision energy(0:n_ene),ee
- double precision theta2(maxres),phi2(maxres),alph2(maxres),
- & omeg2(maxres),
- & theta1(maxres),phi1(maxres),alph1(maxres),
- & omeg1(maxres)
- double precision varia(maxvar),varia2(maxvar)
-c
-
-
- read (inp,*,err=10,end=10) if(1,1),if(1,2),if(2,1),if(2,2)
- write (iout,'(a4,4i5)') 'if =',if(1,1),if(1,2),if(2,1),if(2,2)
- read (inp,*,err=10,end=10) (theta2(i),i=3,nres)
- read (inp,*,err=10,end=10) (phi2(i),i=4,nres)
- read (inp,*,err=10,end=10) (alph2(i),i=2,nres-1)
- read (inp,*,err=10,end=10) (omeg2(i),i=2,nres-1)
- do i=1,nres
- theta2(i)=deg2rad*theta2(i)
- phi2(i)=deg2rad*phi2(i)
- alph2(i)=deg2rad*alph2(i)
- omeg2(i)=deg2rad*omeg2(i)
- enddo
- do i=1,nres
- theta1(i)=theta(i)
- phi1(i)=phi(i)
- alph1(i)=alph(i)
- omeg1(i)=omeg(i)
- enddo
-
- do i=1,nres
- mask(i)=1
- enddo
-
-
-c------------------------
- do i=1,nres
- iff(i)=0
- enddo
- do j=1,2
- do i=if(j,1),if(j,2)
- iff(i)=1
- enddo
- enddo
-
- call chainbuild
- call geom_to_var(nvar,varia)
- call write_pdb(1,'first structure',0d0)
-
- call secondary(.true.)
-
- call secondary2(.true.)
-
- do j=1,nbfrag
- if ( (bfrag(3,j).lt.bfrag(4,j) .or.
- & bfrag(4,j)-bfrag(2,j).gt.4) .and.
- & bfrag(2,j)-bfrag(1,j).gt.3 ) then
- nn=nn+1
-
- if (bfrag(3,j).lt.bfrag(4,j)) then
- write(iout,'(a6,i3,a1,i3,a1,i3,a1,i3)')
- & "select",bfrag(1,j)-1,"-",bfrag(2,j)-1
- & ,",",bfrag(3,j)-1,"-",bfrag(4,j)-1
- else
- write(iout,'(a6,i3,a1,i3,a1,i3,a1,i3)')
- & "select",bfrag(1,j)-1,"-",bfrag(2,j)-1
- & ,",",bfrag(4,j)-1,"-",bfrag(3,j)-1
- endif
- endif
- enddo
-
- do i=1,nres
- theta(i)=theta2(i)
- phi(i)=phi2(i)
- alph(i)=alph2(i)
- omeg(i)=omeg2(i)
- enddo
-
- call chainbuild
- call geom_to_var(nvar,varia2)
- call write_pdb(2,'second structure',0d0)
-
-
-
-c-------------------------------------------------------
-
- ifun=-1
- call contact_cp(varia,varia2,iff,ifun,7)
- if (minim) then
-#ifdef MPI
- time0=MPI_WTIME()
-#else
- time0=tcpu()
-#endif
- call minimize(etot,varia,iretcode,nfun)
- write(iout,*)'------------------------------------------------'
- write(iout,*)'SUMSL return code is',iretcode,' eval ',nfun,
- & '+ DIST eval',ifun
-#ifdef MPI
- time1=MPI_WTIME()
-#else
- time1=tcpu()
-#endif
- write (iout,'(a,f6.2,f8.2,a)')' Time for full min.',time1-time0,
- & nfun/(time1-time0),' eval/s'
-
-
- call var_to_geom(nvar,varia)
- call chainbuild
- call write_pdb(999,'full min',etot)
- endif
-
- call etotal(energy(0))
- etot=energy(0)
- call enerprint(energy(0))
- call intout
- call briefout(0,etot)
-
- return
- 10 write (iout,'(a)') 'Error reading test structure.'
- return
- end
-
-c-------------------------------------------------
-c-------------------------------------------------
-
- subroutine secondary(lprint)
- implicit real*8 (a-h,o-z)
- include 'DIMENSIONS'
- include 'COMMON.CHAIN'
- include 'COMMON.IOUNITS'
- include 'COMMON.DISTFIT'
-
- integer ncont,icont(2,maxres*maxres/2),isec(maxres,3)
- logical lprint,not_done
- real dcont(maxres*maxres/2),d
- real rcomp /7.0/
- real rbeta /5.2/
- real ralfa /5.2/
- real r310 /6.6/
- double precision xpi(3),xpj(3)
-
-
-
- call chainbuild
-cd call write_pdb(99,'sec structure',0d0)
- ncont=0
- nbfrag=0
- nhfrag=0
- do i=1,nres
- isec(i,1)=0
- isec(i,2)=0
- isec(i,3)=0
- enddo
-
- do i=2,nres-3
- do k=1,3
- xpi(k)=0.5d0*(c(k,i-1)+c(k,i))
- enddo
- do j=i+2,nres
- do k=1,3
- xpj(k)=0.5d0*(c(k,j-1)+c(k,j))
- enddo
-cd d = (c(1,i)-c(1,j))*(c(1,i)-c(1,j)) +
-cd & (c(2,i)-c(2,j))*(c(2,i)-c(2,j)) +
-cd & (c(3,i)-c(3,j))*(c(3,i)-c(3,j))
-cd print *,'CA',i,j,d
- d = (xpi(1)-xpj(1))*(xpi(1)-xpj(1)) +
- & (xpi(2)-xpj(2))*(xpi(2)-xpj(2)) +
- & (xpi(3)-xpj(3))*(xpi(3)-xpj(3))
- if ( d.lt.rcomp*rcomp) then
- ncont=ncont+1
- icont(1,ncont)=i
- icont(2,ncont)=j
- dcont(ncont)=sqrt(d)
- endif
- enddo
- enddo
- if (lprint) then
- write (iout,*)
- write (iout,'(a)') '#PP contact map distances:'
- do i=1,ncont
- write (iout,'(3i4,f10.5)')
- & i,icont(1,i),icont(2,i),dcont(i)
- enddo
- endif
-
-c finding parallel beta
-cd write (iout,*) '------- looking for parallel beta -----------'
- nbeta=0
- nstrand=0
- do i=1,ncont
- i1=icont(1,i)
- j1=icont(2,i)
- if(dcont(i).le.rbeta .and. j1-i1.gt.4 .and.
- & isec(i1,1).le.1.and.isec(j1,1).le.1.and.
- & (isec(i1,2).ne.isec(j1,2).or.isec(i1,2)*isec(j1,2).eq.0).and.
- & (isec(i1,3).ne.isec(j1,3).or.isec(i1,3)*isec(j1,3).eq.0).and.
- & (isec(i1,2).ne.isec(j1,3).or.isec(i1,2)*isec(j1,3).eq.0).and.
- & (isec(i1,3).ne.isec(j1,2).or.isec(i1,3)*isec(j1,2).eq.0)
- & ) then
- ii1=i1
- jj1=j1
-cd write (iout,*) i1,j1,dcont(i)
- not_done=.true.
- do while (not_done)
- i1=i1+1
- j1=j1+1
- do j=1,ncont
- if (i1.eq.icont(1,j) .and. j1.eq.icont(2,j)
- & .and. dcont(j).le.rbeta .and.
- & isec(i1,1).le.1.and.isec(j1,1).le.1.and.
- & (isec(i1,2).ne.isec(j1,2).or.isec(i1,2)*isec(j1,2).eq.0).and.
- & (isec(i1,3).ne.isec(j1,3).or.isec(i1,3)*isec(j1,3).eq.0).and.
- & (isec(i1,2).ne.isec(j1,3).or.isec(i1,2)*isec(j1,3).eq.0).and.
- & (isec(i1,3).ne.isec(j1,2).or.isec(i1,3)*isec(j1,2).eq.0)
- & ) goto 5
- enddo
- not_done=.false.
- 5 continue
-cd write (iout,*) i1,j1,dcont(j),not_done
- enddo
- j1=j1-1
- i1=i1-1
- if (i1-ii1.gt.1) then
- ii1=max0(ii1-1,1)
- jj1=max0(jj1-1,1)
- nbeta=nbeta+1
- if(lprint)write(iout,*)'parallel beta',nbeta,ii1,i1,jj1,j1
-
- nbfrag=nbfrag+1
- bfrag(1,nbfrag)=ii1
- bfrag(2,nbfrag)=i1
- bfrag(3,nbfrag)=jj1
- bfrag(4,nbfrag)=j1
-
- do ij=ii1,i1
- isec(ij,1)=isec(ij,1)+1
- isec(ij,1+isec(ij,1))=nbeta
- enddo
- do ij=jj1,j1
- isec(ij,1)=isec(ij,1)+1
- isec(ij,1+isec(ij,1))=nbeta
- enddo
-
- if(lprint) then
- nstrand=nstrand+1
- if (nbeta.le.9) then
- write(12,'(a18,i1,a9,i3,a2,i3,a1)')
- & "DefPropRes 'strand",nstrand,
- & "' 'num = ",ii1-1,"..",i1-1,"'"
- else
- write(12,'(a18,i2,a9,i3,a2,i3,a1)')
- & "DefPropRes 'strand",nstrand,
- & "' 'num = ",ii1-1,"..",i1-1,"'"
- endif
- nstrand=nstrand+1
- if (nbeta.le.9) then
- write(12,'(a18,i1,a9,i3,a2,i3,a1)')
- & "DefPropRes 'strand",nstrand,
- & "' 'num = ",jj1-1,"..",j1-1,"'"
- else
- write(12,'(a18,i2,a9,i3,a2,i3,a1)')
- & "DefPropRes 'strand",nstrand,
- & "' 'num = ",jj1-1,"..",j1-1,"'"
- endif
- write(12,'(a8,4i4)')
- & "SetNeigh",ii1-1,i1-1,jj1-1,j1-1
- endif
- endif
- endif
- enddo
-
-c finding antiparallel beta
-cd write (iout,*) '--------- looking for antiparallel beta ---------'
-
- do i=1,ncont
- i1=icont(1,i)
- j1=icont(2,i)
- if (dcont(i).le.rbeta.and.
- & isec(i1,1).le.1.and.isec(j1,1).le.1.and.
- & (isec(i1,2).ne.isec(j1,2).or.isec(i1,2)*isec(j1,2).eq.0).and.
- & (isec(i1,3).ne.isec(j1,3).or.isec(i1,3)*isec(j1,3).eq.0).and.
- & (isec(i1,2).ne.isec(j1,3).or.isec(i1,2)*isec(j1,3).eq.0).and.
- & (isec(i1,3).ne.isec(j1,2).or.isec(i1,3)*isec(j1,2).eq.0)
- & ) then
- ii1=i1
- jj1=j1
-cd write (iout,*) i1,j1,dcont(i)