projects
/
unres.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
out-of-bounds stdfsc from Adam
[unres.git]
/
source
/
unres
/
src_MD-M
/
gen_rand_conf.F
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
(file)
--- 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))
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)
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))
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)
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))
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)
dscj_inv=dsc_inv(itypj)
sig0ij=sigma(itypi,itypj)
chi1=chi(itypi,itypj)