Functionals linear in curvature and protein folding