A general computational approach for repeat protein design