We describe how to combine the variational Monte Carlo method with a spline
description of the wave function to obtain a powerful and flexible method
to optimize electronic and nuclear wave functions. A property of this metho
d is that the optimization is performed "locally": During the optimization,
the attention is focused on a region of the wave function at a certain tim
e, with little or no perturbation in far away regions. This allows a fine t
uning of the wave function even in cases where there is no experience on ho
w to choose a good functional form and a good basis set. After the optimiza
tion, the splines were fitted using more familiar analytical global functio
ns. The flexibility of the method is shown by calculating the electronic wa
ve function for some two and three electron systems, and the nuclear wave f
unction for the helium trimer. For He-4(3), using a two-body helium-helium
potential, we obtained the best variational function to date, which allows
us to estimate the exact energy with a very small variance by a diffusion M
onte Carlo simulation. (C) 1999 American Institute of Physics. [S0021-9606(
99)30537-7].