Efficient calculation of the free energy for protein partitioning using restraining potentials.