Given a three-manifold M and
a cohomology class τ ∈ H1(M,Z∕nZ), there is a naturally defined invariant of
singular knots in M with exactly one double point, Vτ. It has been known that for
some manifolds Vτ is integrable and that in these cases it defines an easily
computed and highly effective knot invariant. This paper provides necessary and
sufficient conditions on M for the integrability of Vτ. The class of manifolds for
which Vτ is integrable (regardless of the choice of τ) is shown to include
all hyperbolic manifolds, all complements of knots in irreducible homology
spheres, all irreducible Z∕2Z-homology spheres, and most Seifert-fibered
manifolds.