A generalization of the Potts model is often used in statistical inference and biophysics, particularly for modelling proteins through direct coupling analysis. This generalized Potts model consists of 'spins' that each may take on q states: s i ∈ ∈ { 1 , … … , q } (with no particular ordering). The Hamiltonian is,