X-Git-Url: http://mmka.chem.univ.gda.pl/gitweb/?a=blobdiff_plain;f=source%2Funres%2Fsrc_MD-M%2Fgen_rand_conf.F;h=4b6bbc0f16b5ecee229eac23961c3b0f7ed97b6c;hb=82175e15828d8aa5385d50d1a140bc736afc90c3;hp=6caa7184b409a61ce98e9a0e045cd22f8e25d57a;hpb=a8d848a53132a158ba39f3aa1cb20cb382d18f84;p=unres.git diff --git a/source/unres/src_MD-M/gen_rand_conf.F b/source/unres/src_MD-M/gen_rand_conf.F index 6caa718..4b6bbc0 100644 --- a/source/unres/src_MD-M/gen_rand_conf.F +++ b/source/unres/src_MD-M/gen_rand_conf.F @@ -781,7 +781,7 @@ c overlapping residues left, or false otherwise (success) do ires=1,ioverlap_last i=ioverlap(ires) iti=iabs(itype(i)) - if (iti.ne.10) then + if (iti.ne.10 .and. iti.lt.ntyp1 .and.iti.gt.0) then nsi=0 fail=.true. do while (fail.and.nsi.le.maxsi) @@ -842,6 +842,7 @@ c print *,'>>overlap_sc nnt=',nnt,' nct=',nct do i=iatsc_s,iatsc_e itypi=iabs(itype(i)) itypi1=iabs(itype(i+1)) + if (itypi.gt.ntyp .or. itypi.le.0) cycle xi=c(1,nres+i) yi=c(2,nres+i) zi=c(3,nres+i) @@ -854,6 +855,7 @@ c do j=istart(i,iint),iend(i,iint) ind=ind+1 itypj=iabs(itype(j)) + if (itypj.gt.ntyp .or. itypj.le.0) cycle dscj_inv=dsc_inv(itypj) sig0ij=sigma(itypi,itypj) chi1=chi(itypi,itypj)