Thermodynamic stability in polypeptides is described using a novel Distance Constraint Model (DCM). Here, microscopic interactions are represented as constraints. A topological arrangement of constraints define a mechanical framework. Each constraint in the framework is associated with an enthalpic and entropic contribution. All accessible topological arrangements of distance constraints form an ensemble of mechanical frameworks, each representing a microstate of the polypeptide. A partition function is calculated exactly using a transfer matrix approach, where in many respects the DCM is similar to the Lifson-Roig model. The crucial difference is that the effect of network rigidity is explicitly calculated for each mechanical framework in the ensemble. Network rigidity is a mechanical interaction that provides a mechanism for long-range molecular cooperativity and enables a proper treatment of the nonadditivity of a microscopic free energy decomposition. Accounting for (1) helix ↔ coil conformation changes along the backbone similar to the Lifson-Roig model, (2) i to i + 4 hydrogen-bond formation ↔ breaking similar to the Zimm-Bragg model, and (3) structured ↔ unstructured solvent interaction (hydration effects), a six-parameter DCM describes normal and inverted helix-coil transitions in polypeptides. Under suitable mixed solvent conditions heat and cold denaturation is predicted. Model parameters are fitted to experimental data showing different degrees of cold denaturation in monomeric polypeptides in aqueous hexafluoroisopropanol (HFIP) solution at various HFIP concentrations. By assuming a linear HFIP concentration dependence (up to 6% by mole fraction) on model parameters, all essential experimentally observed features are captured.