Protein aggregation in cell membrane is vital for the majority of biological functions. Recent experimental results suggest that transmembrane domains of proteins such as α-helices and β-sheets have different structural rigidities. We use molecular dynamics simulation of a coarse-grained model of protein-embedded lipid membranes to investigate the mechanisms of protein clustering. For a variety of protein concentrations, our simulations under thermal equilibrium conditions reveal that the structural rigidity of transmembrane domains dramatically affects interactions and changes the shape of the cluster. We have observed stable large aggregates even in the absence of hydrophobic mismatch, which has been previously proposed as the mechanism of protein aggregation. According to our results, semi-flexible proteins aggregate to form two-dimensional clusters, while rigid proteins, by contrast, form one-dimensional string-like structures. By assuming two probable scenarios for the formation of a two-dimensional triangular structure, we calculate the lipid density around protein clusters and find that the difference in lipid distribution around rigid and semiflexible proteins determines the one-or two-dimensional nature of aggregates. It is found that lipids move faster around semiflexible proteins than rigid ones. The aggregation mechanism suggested in this paper can be tested by current state-of-the-art experimental facilities.