docs: def calculate_energy(self, energies):
          """
          Calculates the energy of the reaction.
  
          Args:
              energies ({Composition: float}): Energy for each composition.
                  E.g ., {comp1: energy1, comp2: energy2}.
  
          Returns:
              reaction energy as a float.
          """
          return sum([amt * energies[c] for amt, c in zip(self._coeffs,
                                                          self._all_comp)])