  This article contains a characterization of when certain weighted Sobolev
spaces on $\Bbb R^n$ embed compactly into $L^2(\mathbb R^n, \varphi)$. The
characterization is in terms of derivatives of the weight function $\varphi$
and involves the Wiener capacity, as it is obtained from reformulating the
problem in terms of resolvent properties of Schr\"odinger operators. This
reformulation also works for general domains.
