Protein structure prediction is a challenging field strongly associated with protein function and evolution determination, which is crucial for biologists. Despite significant process made in recent years, protein structure prediction maintains its status as one of the prime unsolved problems in computational biology. In this study, we have developed a method for protein structure prediction based on 7-state HMM which can reduce the number of states using secondary structure information about proteins for each fold. The QPSO is an efficient optimization algorithm which is used to train profile HMM. Experiment results show that the proposed method is reasonable.