The thermodynamic cycle perturbation approach, in conjunction with molecular dynamics simulations, has been used to calculate relative binding free energies for the closely related inhibitors 10-propargyl-5,8-dideazafolic acid (PDDF) and 10-formyl-5,8-dideazafolic acid (FDDF) to the binary complex consisting of the enzyme E. coli thymidylate synthase and 5-fluoro-2'-deoxyuridylate (FdUMP). The calculated difference in binding free energy (2.9 kcal/mol) is in good agreement with the experimentally observed preference for PDDF (3.75 kcal/mol). Energetically, PDDF is more difficult to desolvate than FDDF, but it more than compensates with favorable interactions in the complex. Entropic effects favor FDDF binding but are smaller in magnitude than energetic ones. The PDDF propargyl group makes several good hydrophobic contacts with protein and FdUMP atoms and terminates in a hydrogen bond to a protein carbonyl group. The FDDF formyl group makes a single hydrogen bond to a bound water molecule and has an electrostatically and sterically unfavorable contact with FdUMP. PDDF is predicted to have a more negative solvation free energy than FDDF, a trend opposite that found computationally and experimentally for but-1-yne and acetaldehyde, which are simple molecular analogues of the different functional groups which distinguish these two dideazafolic acid inhibitors. This result can be rationalized in terms of charge distribution shifts, steric blocking of water, and solvent polarization by the charged species.