The deformation of the energy-level spectra of quantum systems as a function of a control parameter governing the strength of a nonintegrable perturbation can be determined by standard molecular-dynamics techniques. The integration of Newton's equations of motion provides detailed information on the spectral deformation when the classical system undergoes a transition from mostly regular to mostly chaotic motion. This method is used to study the changes in the energy-level statistics and allows the direct determination of the Brody parameter in the predominantly chaotic regime.