- Proteins in cells are not linear. They are folded into complicated 3D structures.
Models of real proteins
Presumably, the way they fold is dictated by attractions and repulsions among the amino acids. For the model linkage "protein" shown before:
This would be the folding if yellow attracted each other and blue and red repelled each other:
This would be the folding if red attracted each other and yellow repelled each other: