Calculates the energy of a composition.
        
        Args:
            composition (Composition): input composition
            strict (bool): Whether all potentials must be specified

def get_energy(self, composition, strict=True):
        """
        Calculates the energy of a composition.
        
        Args:
            composition (Composition): input composition
            strict (bool): Whether all potentials must be specified
        """
        if strict and set(composition.keys()) > set(self.keys()):
            s = set(composition.keys()) - set(self.keys())
            raise ValueError("Potentials not specified for {}".format(s))
        return sum(self.get(k, 0) * v for k, v in composition.items())