Effective potentials for protein folding and binding with applications using replica exchange simulations