Self-consistent Knowledge-Based Approach to Protein Design