X-Git-Url: http://mmka.chem.univ.gda.pl/gitweb/?a=blobdiff_plain;f=source%2Fcluster%2Fwham%2Fsrc-HCD%2Fgeomout.F;h=be436869bee24768aee4a207e0bfc23adee0b37e;hb=df61eb1a0ad598d7c6c5b4037dee4bec200d5bc2;hp=4ef656f6e769b4e83c3d756ba85e2af282899996;hpb=5aac27f7c6317fa0975184363614b42716034716;p=unres.git diff --git a/source/cluster/wham/src-HCD/geomout.F b/source/cluster/wham/src-HCD/geomout.F index 4ef656f..be43686 100644 --- a/source/cluster/wham/src-HCD/geomout.F +++ b/source/cluster/wham/src-HCD/geomout.F @@ -17,12 +17,15 @@ iatom=0 ichain=1 ires=0 + iti_prev=0 do i=nnt,nct iti=itype(i) if (iti.eq.ntyp1) then - ichain=ichain+1 ires=0 - write (ipdb,'(a)') 'TER' + if (iti_prev.ne.ntyp1) then + write (ipdb,'(a)') 'TER' + ichain=ichain+1 + endif else ires=ires+1 iatom=iatom+1 @@ -35,6 +38,7 @@ & ires,(c(j,nres+i),j=1,3),1.0d0,tempfac(2,i) endif endif + iti_prev=iti enddo write (ipdb,'(a)') 'TER' do i=nnt,nct-1