X-Git-Url: http://mmka.chem.univ.gda.pl/gitweb/?a=blobdiff_plain;f=source%2Funres%2Fsrc_MD%2Freadrtns.F;h=8f70874b6f849099d7a6671df9fe624201167327;hb=fbc0f12bd8022b2c766eb8c350e7bb0451816c1d;hp=08d41250c0abee467407764576d301cf78055c84;hpb=f754eecac3c8a4547d905cca354f9a0db1531729;p=unres.git diff --git a/source/unres/src_MD/readrtns.F b/source/unres/src_MD/readrtns.F index 08d4125..8f70874 100644 --- a/source/unres/src_MD/readrtns.F +++ b/source/unres/src_MD/readrtns.F @@ -1076,11 +1076,6 @@ czscore call geom_to_var(nvar,coord_exp_zs(1,1)) enddo call contact(.true.,ncont_ref,icont_ref,co) endif -c write (iout,*) "constr_dist",constr_dist,nstart_sup,nsup - call flush(iout) - if (constr_dist.gt.0) call read_dist_constr -c write (iout,*) "After read_dist_constr nhpb",nhpb - call hpb_partition if(me.eq.king.or..not.out1file) & write (iout,*) 'Contact order:',co if (pdbref) then @@ -1097,6 +1092,13 @@ c write (iout,*) "After read_dist_constr nhpb",nhpb enddo endif endif +c write (iout,*) "constr_dist",constr_dist,nstart_sup,nsup + if (constr_dist.gt.0) then + call read_dist_constr + call hpb_partition + endif +c write (iout,*) "After read_dist_constr nhpb",nhpb + call flush(iout) if (indpdb.eq.0 .and. modecalc.ne.2 .and. modecalc.ne.4 & .and. modecalc.ne.8 .and. modecalc.ne.9 .and. & modecalc.ne.10) then @@ -2402,6 +2404,18 @@ c write (iout,*) "IPAIR" c do i=1,npair_ c write (iout,*) i,ipair_(1,i),ipair_(2,i),wpair_(i) c enddo + if (.not.refstr .and. nfrag.gt.0) then + write (iout,*) + & "ERROR: no reference structure to compute distance restraints" + write (iout,*) + & "Restraints must be specified explicitly (NDIST=number)" + stop + endif + if (nfrag.lt.2 .and. npair.gt.0) then + write (iout,*) "ERROR: Less than 2 fragments specified", + & " but distance restraints between pairs requested" + stop + endif call flush(iout) do i=1,nfrag_ if (ifrag_(1,i).lt.nstart_sup) ifrag_(1,i)=nstart_sup @@ -2491,7 +2505,7 @@ c write (iout,*) i,ifrag_(1,i),ifrag_(2,i),wfrag_(i) #ifdef MPI if (.not.out1file .or. me.eq.king) then #endif - do i=1,nhbp + do i=1,nhpb write (iout,'(a,3i5,2f8.2,i2,f10.1)') "+dist.constr ", & i,ihpb(i),jhpb(i),dhpb(i),dhpb1(i),ibecarb(i),forcon(i) enddo