Phylogenetic trees inferred from protein sequences are strongly affected by amino acid evolutionary models. Choosing proper models are needed to account for the heterogeneity in evolutionary patterns across sites, especially when analyzing multiple genes or whole genome datasets. Partitioning is a prominent approach to combine sites undergone similar evolutionary processes into separated groups with proper models. The partitioning scheme can be defined by using structural features of the sequences, however, determining structural features of protein sequences is not always practical. Recently, methods have been proposed to automatically cluster sites into groups based on the rates of sites. The rate of sites is a good indicator; however, it is unable to properly reflex the complex evolutionary processes of sites along the protein sequence. In this paper, we present a new algorithm to automatically determine a partitioning scheme based on the best-fit model of sites, i.e., sites belong to the same model will be classified into the same group. Comparing our proposed method with current methods on a set of empirical protein datasets showed that our method helped to build better trees than other methods tested. Our method will significantly improve protein phylogenetic inference from multiple gene or whole genome datasets.