A method to constrain vibrational energy in quasiclassical trajectory calculations