This bug affects CHARMM versions c35b6 and earlier releases.
In brief, use of the RANDOM command w/o the ISEED option reverts to the default seed value, giving the identical sequence of random numbers via ?RAND substitution. The workaround is to use the RANDOM command
only once in a script,
and to supply a random seed via the ISEED option.
A few simple changes to util/random.src will correct the problem, all in SUBROUTINE RANDSPEC; the changes are:
(1) addition at ca. line 80
CHARACTER*4 WRD
change to
CHARACTER*4 WRD
INTEGER IS
(2) changes at ca. line 115
IRNDSD=GTRMI(COMLYN,COMLEN,'ISEE',1380662)
change to
IS=GTRMI(COMLYN,COMLEN,'ISEE',-1)
IF (IS.NE.-1) IRNDSD = IS
With these two changes, subsequent uses of the RANDOM command will preserve the existing seed value, rather than reset it to the default.
The changes to RANDOM usage in the Fortran95 based c361/c37a1 and later essentially fix this problem for ?RAND usage in general, unless RANDOM OLDRAND is used multiple times in a CHARMM input script (don't).