The problem of predicting the three-dimensional structure of a protein starting from its amino acid sequence is regarded as one of the most important open problems in biology. Here, we solve aspects of this problem for the so-called sandwich proteins that constitute a large class of proteins consisting of only β-strands arranged in two sheets. A breakthrough for this class of proteins was announced in Kister
et al
. (Kister
et al.
2002
Proc. Natl Acad. Sci. USA
99
, 14 137–14 141), in which it was shown that sandwich proteins contain a certain invariant substructure called
interlock
. It was later noted that approximately 90% of the observed sandwich proteins are
canonical
, namely they are generated by certain
geometrical structures
. Here, employing a topological investigation, we prove that interlocks and geometrical structures are the direct consequence of certain biologically motivated fundamental principles. Furthermore, we construct all possible canonical motifs involving 6–10 strands. This construction limits dramatically the number of possible motifs. For example, for sandwich proteins with nine strands, the
a priori
number of possible canonical motifs exceeds 360 000, whereas our construction yields only 49 geometrical structures and 625 canonical motifs.