Elastic properties related energy conversions of coordination polymers and metal–organic frameworks