The efficiency of replica exchange simulations depends greatly on the temperature states used, as well as the frequency at which exchange attempts are made. It is now generally accepted that exchange attempts should be made as often as possible, but this should be balanced with the computational overhead of the exchange moves. Logarithmically spaced replica temperatures have been shown to provide roughly equal acceptance ratios in parallel tempering simulations of systems which have constant heat capacity. However, in systems which undergo structural changes with a significant free energy barrier (such as folding/unfolding), a bottleneck for the migration of replicas can occur near the transition when logarithmic spacing is used. A number of solutions for improving sampling near the folding transition have been proposed. One strategy, which we have adopted in this work, is to optimize the spacing of temperatures such that the entropy change between all adjacent states is equal. If heat capacity data as a function of temperature is available (i.e., estimated from a preliminary simulation with logarithmic spacing), temperatures can be selected such that all adjacent pairs T i and T i+1 satisfy the following integral equation: