Build a DteWork from a ground-state task.

        Args:
            scf_task: ScfTask object.
            ddk_tolerance: tolerance used in the DDK run if with_becs. None to use AbiPy default.
            manager: :class:`TaskManager` object.

def from_scf_task(cls, scf_task, ddk_tolerance=None, manager=None):
        """
	Build a DteWork from a ground-state task.

        Args:
            scf_task: ScfTask object.
            ddk_tolerance: tolerance used in the DDK run if with_becs. None to use AbiPy default.
            manager: :class:`TaskManager` object.
	"""
        if not isinstance(scf_task, ScfTask):
            raise TypeError("task `%s` does not inherit from ScfTask" % scf_task)

        new = cls(manager=manager)

        # DDK calculations
        multi_ddk = scf_task.input.make_ddk_inputs(tolerance=ddk_tolerance)

        ddk_tasks = []
        for ddk_inp in multi_ddk:
            ddk_task = new.register_ddk_task(ddk_inp, deps={scf_task: "WFK"})
            ddk_tasks.append(ddk_task)

        # Build the list of inputs for electric field perturbation
        # Each task is connected to all the previous DDK, DDE task and to the scf_task.
        multi_dde = scf_task.input.make_dde_inputs(use_symmetries=False)

        # To compute the nonlinear coefficients all the directions of the perturbation
        # have to be taken in consideration
        # DDE calculations
        dde_tasks = []
        dde_deps = {ddk_task: "DDK" for ddk_task in ddk_tasks}
        dde_deps.update({scf_task: "WFK"})
        for dde_inp in multi_dde:
            dde_task = new.register_dde_task(dde_inp, deps=dde_deps)
            dde_tasks.append(dde_task)

        # DTE calculations
        dte_deps = {scf_task: "WFK DEN"}
        dte_deps.update({dde_task: "1WF 1DEN" for dde_task in dde_tasks})

        multi_dte = scf_task.input.make_dte_inputs()
        dte_tasks = []
        for dte_inp in multi_dte:
             dte_task = new.register_dte_task(dte_inp, deps=dte_deps)
             dte_tasks.append(dte_task)

        return new