  For a bounded domain $\Omega\subset\mathbb{R}^n$ let
$H_\Omega:\Omega\times\Omega\to\mathbb{R}$ be the regular part of the Dirichlet
Green function for the Laplace operator. Given a fixed arbitrary ${\mathcal
C}^2$ function $f:{\mathcal D}\to\mathbb{R}$, defined on an open subset
${\mathcal D}\subset\mathbb{R}^{nN}$, and fixed coefficients
$\lambda_1,\dots,\lambda_N\in\mathbb{R}\setminus\{0\}$ we consider the function
$f_\Omega:{\mathcal D}\cap\Omega^N\to\mathbb{R}$ defined as \[
  f_\Omega(x_1,\dots,x_N)
  = f(x_1,\dots,x_N) - \sum_{j,k=1}^N \lambda_j\lambda_k H_\Omega(x_j,x_k). \]
We prove that $f_\Omega$ is a Morse function for most domains $\Omega$ of class
${\mathcal C}^{m+2,\alpha}$, any $m\ge0$, $0<\alpha<1$. This applies in
particular to the Robin function $h:\Omega\to\mathbb{R}$, $h(x)=H_\Omega(x,x)$,
and to the Kirchhoff-Routh path function where $\Omega\subset\mathbb{R}^2$,
${\mathcal D}=\{x\in\mathbb{R}^{2N}: \text{$x_j\ne x_k$ for $j\ne k$}\}$, and
\[
  f(x_1,\dots,x_N) = - \frac{1}{2\pi}\sum_{\genfrac{}{}{0pt}{}{j,k=1}{j\ne
k}}^N\lambda_j\lambda_k\log|x_j-x_k|. \]
