This article combines the principal component analysis (PCA) with persistent homology for applications in biomolecular data analysis. We extend the technique of persistent homology to localized weighted persistent homology to fit the properties of molecules. We introduce this novel PCA in the study of the folding process of residues 1 to 28 of amyloid beta peptide in solution. We are able to determine seven metastable states of amyloid beta 1 to 28 using homology of dimension 2, corresponding to seven local minimums in the free energy landscape. We also give the transition information between the seven types and the disconnectivity graph. Our result is very robust under change of parameters. Furthermore persistent homology of dimension 1 also give consistent results. This method can be applied to different peptides and molecules.