Thermodynamics and structure of the ordered amorphous phase in polymers