Bug Fixes

md/Commons/common_ch.inc
  1. Declared all variables.
  2. Added a new common block for the torsional potential cut-off smoothing. (See pibond.f below)
md/Commons/common_lj_new.inc
  1. Declared all variables.
md/Commons/common_md.inc
  1. Declared all variables.
  2. Variable KEND was not in common due to a too long line. This caused the code to fail on those compilers that compile Fortran correctly. Line broken.
md/Commons/common_tb.inc
  1. Declared all variables.
  2. Removed the declaration of unused logical variable CONT to keep compilers from bugging me.
  3. Moved the TBPAR data statement to tight_bind.f since some compilers, correctly, complain it is improper to initialize the same data in countless subroutines.
  4. Moved XDOS to the start of the common, to avoid possible performance degradation and especially compilers complaining about it.
md/Include/close.inc:
  1. Removed duplicated (but commented out) closing of unit 14.
md/Include/open.inc:
  1. Unit 51 was misspelled 'unkown' instead of 'unknown'
  2. Unit 85 was assigned to both pair_energy.d and eigenvectors.d; second set to 84
md/Include/parameters.inc
  1. Declared all variables.
  2. Corrected typo NSMAS for NSMAX in the comments.
md/Include/subroutines.inc
  1. Corrected directory of vscale.f
md/InOut/input.d
  1. Rewrote comments.
md/Subroutines/Bond_Order/caguts.f:
  1. Put the limits check on NLMAX in the right place, not after the violation.
md/Subroutines/Bond_Order/param.f
  1. Initialized the torsional potential cut-off smoothing parameters. (See pibond.f below)
md/Subroutines/Bond_Order/pibond.f
  1. Removed unused RK(3) and RL(3) arrays to keep compilers from complaining about it.
  2. This subroutine contains nonsensical IF(ACOS(COSTH).GT.PI) SINK(NK)=-SINK(NK) statements. However, they do no harm. Due to round-off, disabling them could make tiny changes in program results, so I left them.
  3. The dihedral terms (torsional potential) are not conservative due to a cut-off when three atoms are almost along the same line. A smoothing of the cut-off to remove the problem has been put in, but is disabled by default. To fix the problem, set parameters SINLO and SINHI to the values 0.0 and 0.2 instead of to 1.0D-01
  4. Variables DBTOR* are never used. I left them.
md/Subroutines/General/main.f:
  1. Removed ./Include/ from the includes since it is inconsistent with the suggested usage of this code.
  2. Added (0.d0) to the minimize call, since it has an (unused) argument, causing g77 to crash.
md/Subroutines/General/minimize.f:
  1. Renotated the reserved symbol "min" used for a common block name to minmin.
  2. Trivially rewrote the return statements since the Open Watcom compiler gave an (unjustified) warning on the END statement of CONMIN.
md/Subroutines/General/overwr.f:
  1. Defined undefined local variable IDUM to be 0 to keep compilers from complaining about it. This is what many compilers (improperly) set it to anyway.
md/Subroutines/General/read_write.f:
  1. Defined undefined local variable IDUM to be 0 to keep compilers from complaining about it.This is what many compilers (improperly) set it to anyway.
md/Subroutines/General/thermostats.f:
  1. GLEQ failed to find a random force for the last atom if the number of thermostated atoms (itr=1) was odd. I added the force.
  2. BERE would crash on zero temperature due to an invalid test for it. I fixed the test.
md/Subroutines/Lennard_Jones/ljparam.f
  1. The Lennard-Jones potentials have a jump at the cut-off. This causes energy not to be conserved adiabatically. I substracted the jump to eliminate this problem. This does not affect the force computation, just the total energy. The changes can be undone by simply setting the variable IJUMP to 1 in this subroutine and in ljguts below.
  2. Forces between non C-H or Si-G pairs were skipped if they came within distance RLL of each other due to a problem in XMMS. Fixed.
md/Subroutines/Lennard_Jones/ljguts.f
  1. Because of the fix mentioned under ljparam above, the LJ potential is nonzero in the bond order range (though the LJ forces are zero.) That requires some changes such as including the atoms within bond-order range in the neighbors list. The changes can be undone by simply setting the variable IJUMP to 1 in this subroutine and in ljparam above.
  2. Put the bounds test on NMABIG before the violation.
md/Subroutines/Tight_Binding/dos.f
  1. Changed duplicated unit number from 85 to 84.
md/Subroutines/Tight_Binding/force_tb.f
  1. Declared do-loop index O as integer.

Return