An entropy criterion to detect minimally frustrated intermediates in native proteins