Glass transition and chain flexibility of linear polymers