Thermal and optical properties of two molecular potentials