Spectra, graphs, and proteins. Towards understanding of protein folding