Stability of gas clouds in Galactic Nuclei : an extended virial theorem