  Computational codes based on the Diffusion Monte Carlo method can be used to
determine the quantum state of two-electron systems confined by external
potentials of various nature and geometry. In this work, we show how the
application of this technique in its simplest form, that does not employ
complex analytic guess functions, allows to obtain satisfactory results and, at
the same time, to write programs that are readily adaptable from one type of
confinement to another. This adaptability allows an easy exploration of the
many possibilities in terms of both geometry and structure of the system. To
illustrate these results, we present calculations in the case of two-electron
hydrogen-based species (H$_2$ and H$_3^+$) and two different types of
confinement, nanotube-like and octahedral crystal-field.
