Identification of a pattern in protein structure based on statistical and energetical considerations