  We present a statistical approach to protein structure by introducing a
representation of protein folds based on simple observables defined as
frequencies of oriented cycles in contact graphs. Motivated by the idea that
these cycles may form a code of the entire protein structure we investigate its
Shannon entropy. The latter shows a characteristic transitory behavior when
traced over different values of the geometric threshold $t$ which defines
protein residues in contact. To account for this observation, we propose a
non-linear mechanical model-- formulated as a Hamiltonian system in which $t$
is regarded as a continuous parameter-- that allows to identify the behavior of
the Shannon entropy as a first-order phase transition between a disordered and
an ordered phase of the proposed mechanical system. The transition itself
reflects the formation of protein structure when represented in terms of
contact graph cycles, and it is identified as an example of a fragmentation
transition known from several other statistical systems without a proper
thermodynamic limit. Some interesting implications follow from our model
including chirality, broken $t$-symmetry and one-dimensionality. Although
defined from purely structural considerations, we further show that for native
protein structures these observables follow some of the quantitative rules that
are typically valid for amino acid types in protein sequences. Moreover, this
relation between polypeptide structures and their amino acid sequences suggests
a specific protein design alphabet.
