code: def final_energy(self):
          
          try:
              final_istep = self.ionic_steps[-1]
              if final_istep["e_wo_entrp"] != final_istep[
                  'electronic_steps'][-1]["e_0_energy"]:
                  warnings.warn("Final e_wo_entrp differs from the final "
                                "electronic step. VASP may have included some "
                                "corrections, e.g., vdw. Vasprun will return "
                                "the final e_wo_entrp, i.e., including "
                                "corrections in such instances.")
                  return final_istep["e_wo_entrp"]
              return final_istep['electronic_steps'][-1]["e_0_energy"]
          except (IndexError, KeyError):
              warnings.warn("Calculation does not have a total energy. "
                            "Possibly a GW or similar kind of run. A value of "
                            "infinity is returned.")
              return float('inf')
docs: Final energy from the vasp run.