Thermal denaturation of collagen in solutions and fibrils