The attention for membrane proteins has been increasing as they work as an essential factor for life. However, the information for their structures is increasing only gradually. Thus, more effective methods are needed to obtain their three-dimensional structures. At the same time, there is a question about the cause of transmembrane helix kinks from determined structures. We develop a method for predicting structures by computer simulations starting only from their amino-acid sequence information. Our methods employ the replica-exchange method and our restricted implicit membrane model which mimics the restriction during folding in nature, and are focused on the flexibility of helix structures in transmembrane regions. For the prediction from the trajectories, we use the clustering method to the structures by principal component analysis and a calculation of free energy. We have tested our method on the system of bacteriorhodopsin without a retinal molecule as a co-molecule to confirm the reproduction of experimental structures. As a result, we obtained the native-like structure and the equilibrium structure before inserting a retinal molecule. These structures imply that structures make transitions among each other before insertion of retinal molecule and retinal seems to stabilize the native structure by the insertion. The latter structure is our prediction due to the lack of an experimental structure of the state. Moreover, from the comparison of local-minimum free-energy structures, we propose the division of the helix distortions in the membrane environment into two factors.