Thermodynamics of HCN-derived Polymers: A Quantum Chemical Study