Computation of the protein structure entropy and its applications to protein folding processes