Derivation of the nonrigid rotation-large-amplitude internal motion Hamiltonian of the general molecule