Create a `NonlinearFlow` for second order susceptibility calculations from
        an `AbinitInput` defining a ground-state run.

        Args:
            workdir: Working directory of the flow.
            scf_input: :class:`AbinitInput` object with the parameters for the GS-SCF run.
            manager: :class:`TaskManager` object. Read from `manager.yml` if None.
            allocate: True if the flow should be allocated before returning.

        Return:
            :class:`NonlinearFlow` object.

def from_scf_input(cls, workdir, scf_input, manager=None, allocate=True):
        """
        Create a `NonlinearFlow` for second order susceptibility calculations from
        an `AbinitInput` defining a ground-state run.

        Args:
            workdir: Working directory of the flow.
            scf_input: :class:`AbinitInput` object with the parameters for the GS-SCF run.
            manager: :class:`TaskManager` object. Read from `manager.yml` if None.
            allocate: True if the flow should be allocated before returning.

        Return:
            :class:`NonlinearFlow` object.
        """
        flow = cls(workdir, manager=manager)

        flow.register_scf_task(scf_input)
        scf_task = flow[0][0]

        nl_work = DteWork.from_scf_task(scf_task)

        flow.register_work(nl_work)

        if allocate: flow.allocate()

        return flow