Machine Learning Coarse-Grained Potentials of Protein Thermodynamics