We derive an effective Hamiltonian for a quantum system constrained to a su
bmanifold (the constraint manifold) of configuration space (the ambient spa
ce) by an infinite restoring force. We pay special attention to how this Ha
miltonian depends on quantities which are external to the constraint manifo
ld, such as the extrinsic curvature of the constraint manifold, the curvatu
re of the ambient space, and the constraining potential. In particular, we
find the remarkable fact that the twisting of the constraining potential ap
pears as a gauge potential in the constrained Hamiltonian. This gauge poten
tial is closely related to the geometric phase originally discussed by Berr
y. The constrained Hamiltonian also contains an effective potential dependi
ng an the extrinsic curvature of the constraint manifold, the curvature of
the ambient space, and the twisting of the constraining potential. The gene
ral nature of our analysis allows applications to a wide variety of problem
s, such as rigid molecules, the evolution of molecular systems along reacti
on paths, and quantum strip waveguides.