Binding energy calculations for complexes of mutant and wild-type human dihydrofolate reductases with 2,4-diaminopteridine and 2,4-diaminoquinazoline inhibitors are reported. Quantitative insight into binding energetics of these molecules is obtained from calculations based on force field energy evaluation and thermal sampling by molecular dynamics simulations. The calculated affinity of methotrexate for wild-type and mutant enzymes is reasonably well reproduced. Truncation of the methotrexate glutamate tail results in a loss of affinity by several orders of magnitude. No major difference in binding strength is predicted between the pteridines and the quinazolines, while the N-methyl group present in methotrexate appears to confer significantly stronger binding. The recent improvement, which is used here, of our linear interaction energy method for binding affinity prediction, as well as problems with treating charged and flexible ligands are discussed. This approach should be suitable in a drug discovery context for prediction of binding energies of new inhibitors prior to their synthesis, when some information about the binding mode is available.