Note that ABINIT produces lots of out_TIM1_DEN files for each step.
        Here we list all TIM*_DEN files, we select the last one and we rename it in out_DEN

        This change is needed so that we can specify dependencies with the syntax {node: "DEN"}
        without having to know the number of iterations needed to converge the run in node!

def fix_ofiles(self):
        """
        Note that ABINIT produces lots of out_TIM1_DEN files for each step.
        Here we list all TIM*_DEN files, we select the last one and we rename it in out_DEN

        This change is needed so that we can specify dependencies with the syntax {node: "DEN"}
        without having to know the number of iterations needed to converge the run in node!
        """
        super().fix_ofiles()

        # Find the last TIM?_DEN file.
        last_timden = self.outdir.find_last_timden_file()
        if last_timden is None:
            logger.warning("Cannot find TIM?_DEN files")
            return

        # Rename last TIMDEN with out_DEN.
        ofile = self.outdir.path_in("out_DEN")
        if last_timden.path.endswith(".nc"): ofile += ".nc"
        self.history.info("Renaming last_denfile %s --> %s" % (last_timden.path, ofile))
        os.rename(last_timden.path, ofile)