code: def entropy(self, t, structure=None):
          
  
          if t == 0:
              return 0
  
          freqs = self._positive_frequencies
          dens = self._positive_densities
  
          coth = lambda x: 1.0 / np.tanh(x)
  
          wd2kt = freqs / (2 * BOLTZ_THZ_PER_K * t)
          s = np.trapz((wd2kt * coth(wd2kt) - np.log(2 * np.sinh(wd2kt))) * dens, x=freqs)
  
          s *= const.Boltzmann * const.Avogadro
  
          if structure:
              formula_units = structure.composition.num_atoms / structure.composition.reduced_composition.num_atoms
              s /= formula_units
  
          return s
docs: Vibrational entropy at temperature T obtained from the integration of the DOS.
          Only positive frequencies will be used.
          Result in J/(K*mol-c). A mol-c is the abbreviation of a mole-cell, that is, the number
          of Avogadro times the atoms in a unit cell. To compare with experimental data the result
          should be divided by the number of unit formulas in the cell. If the structure is provided
          the division is performed internally and the result is in J/(K*mol)
  
          Args:
              t: a temperature in K
              structure: the structure of the system. If not None it will be used to determine the numer of
                  formula units
          Returns:
              Vibrational entropy