The statistical mechanics of the Zimm–Bragg model may be solved exactly using the transfer-matrix method. The two parameters of the Zimm–Bragg model are σ, the statistical weight for nucleating a helix and "s", the statistical weight for propagating a helix. These parameters may depend on the residue "j"; for example, a proline residue may easily nucleate a helix but not propagate one; a leucine residue may nucleate and propagate a helix easily; whereas glycine may disfavor both the nucleation and propagation of a helix. Since only nearest-neighbour interactions are considered in the Zimm–Bragg model, the full partition function for a chain of "N" residues can be written as follows