A computational framework is presented for studying the mechanical response of macromolecules. The method combines a continuum mechanics (CM) model for the mechanical properties of the macromolecule with a continuum electrostatic (CE) treatment of solvation. The molecules are represented by their shape and key physicochemical characteristics such as the distribution of materials properties and charge. As a test case, we apply the model to the effect of added salt on the bending of DNA. With a simple representation of DNA, the CM/CE framework using a Debye-Hückel model leads to results that are in good agreement with both analytical theories and recent experiments, including a modified Odijk-Skolnick-Fixman theory that takes the finite length of DNA into consideration. Calculations using a more sophisticated CE model (Poisson-Boltzmann), however, suffer from convergence problems, highlighting the importance of balancing numerical accuracy in the CM and CE models when dealing with very large systems, particularly those with a high degree of symmetry. © 2009 by the Biophysical Society.