!el allocate(icont(2,12*nres),isec(nres,4),nsec(nres))
!el allocate(icont(2,12*nres),isec(nres,4),nsec(nres))
if(.not.allocated(hfrag)) allocate(hfrag(2,nres/3)) !(2,maxres/3)
!d call write_pdb(99,'sec structure',0d0)
ncont=0
if(.not.allocated(hfrag)) allocate(hfrag(2,nres/3)) !(2,maxres/3)
!d call write_pdb(99,'sec structure',0d0)
ncont=0
real(kind=8),dimension(3) :: xpi,xpj
integer :: i,k,j,i1,j1,nbeta,nstrand,ii1,jj1,ij,iii1,jjj1,&
nhelix
real(kind=8),dimension(3) :: xpi,xpj
integer :: i,k,j,i1,j1,nbeta,nstrand,ii1,jj1,ij,iii1,jjj1,&
nhelix