Thermal and optical properties of multiblock macrocycles with hysteretic polymorphic transition