********> bugfix.58 Author: Kevin Bryson Date: 6/9/93 Program: Sander Severity: minor Problem : Sanders intermediate calculation of RMS is incorrect. Reports the RMS value for step N-1 against step N. Fix: make the following changes to sander/runmin.f *** NEW runmin.f --- OLD runmin.f *************** *** 163,168 **** --- 165,172 ---- CALL FORCE(xx,ix,ih,X,FG,ENE,VIR,IMES) F = ENE(1) NTNB = 0 + SUM = DDOTP(N,FG,FG) + RMS = SQRT(SUM)/FNQ C C ----- PRINT THE INTERMEDIATE RESULTS ----- C *************** *** 171,177 **** call grdmax(n,fg,iatmax,fdmax) iatmax = (iatmax-1)/3 + 1 labmax = igraph(iatmax) - IF(NCALLS.EQ.1) RMS = SQRT(DDOTP(N,FG,FG))/FNQ call opinfo(7) CALL PRINTE(NCALLS,RMS,FDMAX,ENE,iatmax,labmax) IF (INMR.GT.0) THEN --- 175,180 ---- *************** *** 191,198 **** NSTCYC = NSTCYC+1 IF(NSTCYC.GT.MSTCYC) GO TO 380 C - SUM = DDOTP(N,FG,FG) - RMS = SQRT(SUM)/FNQ IF(DXST.LE.CRITS) DXST = DXSTM DXST = DXST/2.0D0 IF(F.LT.FOLD) DXST = DXST*2.4D0 --- 197,202 ---- *************** *** 240,249 **** IF(ITERC.GT.0) GO TO 80 C 20 GNEW = 0.0D0 - SUM = 0.0D0 GNEW = DDOTP(N,W,FG) - SUM = DDOTP(N,FG,FG) - RMS = SQRT(SUM)/FNQ IF(NEWSTR .OR. NCALLS.EQ.1) GO TO 35 FCH = F-FMIN C --- 244,250 ---- *************** Workaround: correct the step number when evaluating RMS reports. ---