Bug hunting tips for group code
Some things from the Borg collective intelligence that *might* be useful when bug-hunting or dealing with strange output:
(See also the note on the front page about consulting DJW to learn how to interpret the output from GMIN/OPTIM/PATHSAMPLE)
1. Local minimization persistently can't find a step that lowers the energy. First port of call is to see if there's some confusion with gradients vs. forces: an array grad[ient] in our programs should mean the gradient, i.e. first derivative of the energy w.r.t. coordinates. This has certainly not always been the case in other codes I've worked with...! Also consider whether your potential has discontinuities in the energy, e.g. from the use of cut-offs in non-bonded interactions or look-up tables, which will cause trouble in a gradient-based geometry optimization. --jmc49 11:33, 2 August 2009 (BST)