We derive the effective Hamiltonian for a quantomechanical system constrained to move on a submanifold M of its configuration space R(n) by a confining potential V. Besides potential terms proportional to the intrinsic and mean curvature of M the restriction to the constraint produce the minimal interaction with a geometry-induced Yang-Mills field.