def S(self, T):
result = self.Sref<EOL>for Tmax in sorted([float(TT) for TT in self._Cp_records.keys()]):<EOL><INDENT>result += self._Cp_records[str(Tmax)].S(T)<EOL>if T <= Tmax:<EOL><INDENT>return result + self.S_mag(T)<EOL><DEDENT><DEDENT>Tmax = max([float(TT) for TT in self._Cp_records.keys()])<EOL>result += self.Cp(Tmax)*math.log(T / Tmax)<EOL>return result + self.S_mag(T)<EOL>
Calculate the entropy of the compound phase at the specified
temperature.

:param T: [K] temperature

:returns: [J/mol/K] The entropy of the compound phase.