Factors that are related to thermostability of proteins have been extensively studied in recent years, especially by comparing thermophiles and mesophiles. However, most of them are global characters. It is still not clear how to identify specific residues or fragments which may be more relevant to protein thermostability. Moreover, some of the differences among the thermophiles and mesophiles may be due to phylogenetic differences instead of thermal adaptation. To resolve these problems, I adopted a strategy to identify residue substitutions evolved convergently in thermophiles or mesophiles. These residues may therefore be responsible for thermal adaptation. Four classes of genomes were utilized in this study, including thermophilic archaea, mesophilic archaea, thermophilic bacteria, and mesophilic bacteria. For most clusters of orthologous groups (COGs) with sequences from all of these four classes of genomes, I can identify specific residues or fragments that may potentially be responsible for thermal adaptation. Functional or structural constraints (represented as sequence conservation) were suggested to have higher impact on thermal adaption than secondary structure or solvent accessibility does. I further compared thermophilic archaea and mesophilic bacteria, and found that the most diverged fragments may not necessarily correspond to the thermostability-determining ones. The usual approach to compare thermophiles and mesophiles without considering phylogenetic relationships may roughly identify sequence features contributing to thermostability; however, to specifically identify residue substitutions responsible for thermal adaptation, one should take sequence evolution into consideration. Proteins 2008. © 2008 Wiley-Liss, Inc.