AMBER Archive (2002)

Subject: Potential bug in gbsa.h of sander-7

From: Vlad (vvv900_at_anusf.anu.edu.au)
Date: Mon Oct 14 2002 - 19:35:58 CDT


Hi All,

gbsa.h in sander (AMBER 7) contains potential bug in the code:

c
c --- loop over k ---
c
              do kk=count2,999999999
                if(ineighbor(kk).eq.0)then
                  count2_fin=kk-1
                  goto 81
                endif
              enddo
 81 continue

which can be activated in some cases (empirical fact), which
leads, in turn, to drastic increase of computer time.

It can be simply fixed by introducing a new integer variable and
chanching upper limit of the loop.

+++++++++++++++++++++++++++++++++++++++++++++++++++++

c
c ---LCPO code: to be included in egb.f
c
        call timer_start(TIME_gbsa)
        max_count = count ! new integer variable
        count=1

+++++++++++++++++++++++++++++++++++++++++++++++++++++

c
c --- loop over k ---
c
c do kk=count2,999999999
              do kk=count2,max_count
                if(ineighbor(kk).eq.0)then
                  count2_fin=kk-1
                  goto 81
                endif
              enddo
 81 continue
++++++++++++++++++++++++++++++++++++++++++++++++++++

Dr. V. Vassiliev
ANU, Canberra