Problems that involve minimizing a function of a single parameter are less common in themselves than as subproblems within other optimization problems. This is because many optimization methods generate a search direction and then need to find the “best” step to take along that direction. There are, however, problems that require a single parameter to be optimized, and it is important that we have suitable tools to solve these.
R has a built-in function to find the minimum of a function of a single parameter in a given interval . This is
optimize(). It requires a function or expression to be supplied, along with an interval specified as a two-element vector, as in the following example. The method is based on the work by Brent (1973).
A well-known function in molecular dynamics is the Lennard–Jones 6–12 potential (http://en.wikipedia.org/wiki/Lennard-Jones_potential). Here we have chosen a particular form as the function is extremely sensitive to its parameters
sig. Moreover, the limits for the
curve() have been chosen so that the graph is usable because the function has extreme scale changes (Figure ...