AMBER: ?small bugs? - 2nd suggestion

From: Chris Moth <Chris.Moth.vanderbilt.edu>
Date: Wed, 24 Sep 2003 15:23:41 -0500

I see now that the role of k and j in the original make_crd_gh code is to
preserve the sequence of protein and ligand molecules
from the original prmtop

However, in my bug demo case, the code below may be executed with j=2, and
k=1, and that might explain everything. One extra "do
l=RSTART(2),RSTOP(2)" is being executed and NGR is being incremented that
extra time:

             if(((NGREC.gt.0).and.(RSTART(j).lt.LSTART(k))).or.
      1 (k.gt.NGLIG)) then
               do l=RSTART(j),RSTOP(j)

Perhaps changing the above original code to:

             if(((j.le.NGREC).and.(RSTART(j).lt.LSTART(k))).or.
      1 (k.gt.NGLIG)) then
               do l=RSTART(j),RSTOP(j)

will solve this, and preserve the intent of the original code and fix the
bug. The elseif piece should be similarly changed.

             elseif(((k.le.NGLIG).and.(LSTART(k).lt.RSTART(j))).or.
      1 (j.gt.NGREC)) then


Chris



-----------------------------------------------------------------------
The AMBER Mail Reflector
To post, send mail to amber.scripps.edu
To unsubscribe, send "unsubscribe amber" to majordomo.scripps.edu
Received on Tue Sep 23 2003 - 21:53:00 PDT
Custom Search