Protein structure prediction (PSP) is one of the most important problems in computational biology. And it also is a very difficult optimization task, especially for long sequence instances. This paper proposes a novel clustering based niching EDA for HP model folding problem. The EDA individuals are clustered by the affinity propagation clustering method before submitting them to niching clearing. A cluster can be seen as a niche in clearing procedure. The niche clearing radius can be adaptively determined by clustering. And an approach based on Boltzmann scheme is proposed to determine the niche capacity according to the adaptive clearing radius and niche fitness. Experimental results demonstrate that the proposed method outperforms the basic EDAs method. At the same time, it is very competitive with other existing algorithms for the PSP problem on lattice HP models.