def get_explanation_dict(self, entry):
        """
        Provides an explanation dict of the corrections that are being applied
        for a given compatibility scheme. Inspired by the "explain" methods
        in many database methodologies.

        Args:
            entry: A ComputedEntry.

        Returns:
            (dict) of the form
            {"Compatibility": "string",
            "Uncorrected_energy": float,
            "Corrected_energy": float,
            "Corrections": [{"Name of Correction": {
            "Value": float, "Explanation": "string"}]}
        """
        centry = self.process_entry(entry)
        if centry is None:
            uncorrected_energy = entry.uncorrected_energy
            corrected_energy = None
        else:
            uncorrected_energy = centry.uncorrected_energy
            corrected_energy = centry.energy
        d = {"compatibility": self.__class__.__name__,
             "uncorrected_energy": uncorrected_energy,
             "corrected_energy": corrected_energy}
        corrections = []
        corr_dict = self.get_corrections_dict(entry)
        for c in self.corrections:
            cd = {"name": str(c),
                  "description": c.__doc__.split("Args")[0].strip(),
                  "value": corr_dict.get(str(c), 0)}
            corrections.append(cd)
        d["corrections"] = corrections
        return d
def get_explanation_dict ( self , entry ) : centry = self . process_entry ( entry ) if centry is None : uncorrected_energy = entry . uncorrected_energy corrected_energy = None else : uncorrected_energy = centry . uncorrected_energy corrected_energy = centry . energy d = { "compatibility" : self . __class__ . __name__ , "uncorrected_energy" : uncorrected_energy , "corrected_energy" : corrected_energy } corrections = [ ] corr_dict = self . get_corrections_dict ( entry ) for c in self . corrections : cd = { "name" : str ( c ) , "description" : c . __doc__ . split ( "Args" ) [ 0 ] . strip ( ) , "value" : corr_dict . get ( str ( c ) , 0 ) } corrections . append ( cd ) d [ "corrections" ] = corrections return d
Provides an explanation dict of the corrections that are being applied
        for a given compatibility scheme. Inspired by the "explain" methods
        in many database methodologies.

        Args:
            entry: A ComputedEntry.

        Returns:
            (dict) of the form
            {"Compatibility": "string",
            "Uncorrected_energy": float,
            "Corrected_energy": float,
            "Corrections": [{"Name of Correction": {
            "Value": float, "Explanation": "string"}]}