The objective function contribution was computed as a weighted sum of squared differences between QM and MM energies. During the fitting process, each structure along the QM torsional profile was partially relaxed using the empirical force field being optimized. These MM optimizations were started from the QM constrained optimized structure, the four atoms defining the torsion were fixed at the QM coordinates, and all other atoms were held near the QM coordinates by applying harmonic energy restraints with force constant 1 kcal/mol/A 2 . These added harmonic restraints avoid the possibility of large structural changes of the MM structures away from the QM structures, which could make the torsional profile differences less meaningful. The restraint term is applied only in the MM energy minimization, and the MM energy at the energy-minimized geometry without the restraint term is used in subsequent steps. The QM and MM energies being compared were calculated as: