@classmethod
def from_scf_task(cls, scf_task, ddk_ngkpt, ddk_shiftk, ddk_nband, manager=None
    ):
    """
        Build NscfDdksWork from a scf_task.
        Args:
            scf_task: GS task. Must produce the DEN file required for the NSCF run.
            ddk_ngkpt: k-mesh used for the NSCF run and the non self-consistent DDK tasks.
            ddk_shiftk: k-mesh shifts
            ddk_nband: Number of bands (occupied + empty) used in the NSCF task and the DDKs tasks.
            manager: TaskManager instance. Use default if None.
        Return: NscfDdksWork instance
        """
    new = cls(manager=manager)
    nscf_inp0 = scf_task.input.deepcopy()
    nscf_inp0.set_vars(nband=ddk_nband, prtwf=1)
    nscf_inp0.set_kmesh(ddk_ngkpt, ddk_shiftk, kptopt=1)
    nscf_task0 = new.register_nscf_task(nscf_inp0, deps={scf_task: 'DEN'})
    new.task_with_ks_energies = nscf_task0
    ddk_inputs = nscf_inp0.make_ddk_inputs(kptopt=2)
    new.ddk_tasks = []
    for ddk_inp in ddk_inputs:
        ddk_inp.set_vars(nstep=1, nline=0, prtwf=1)
        t = new.register_task(ddk_inp, deps={nscf_task0: 'WFK'})
        new.ddk_tasks.append(t)
    return new
