Added gradient evaluation for protein folding