The role of molecular elasticity in biopolymers and protein self-assembly