Dynamics-driven design of functional biological and bio-inspired macromolecules