An Inverse Equilibrium Maximum Entropy Algorithm Applied to Proteins