示例#1
0
def build_flow(options):
    structure = abilab.Structure.from_file(abidata.cif_file("si.cif"))
    pseudos = abidata.pseudos("14si.pspnc")

    # Working directory (default is the name of the script with '.py' removed and "run_" replaced by "flow_")
    workdir = options.workdir
    if not options.workdir:
        workdir = os.path.basename(__file__).replace(".py", "").replace("run_","flow_") 

    # Initialize the flow.
    flow = abilab.Flow(workdir, manager=options.manager) 

    scf_kppa = 10
    nscf_nband = 10
    #nscf_ngkpt = [4,4,4]
    #nscf_shiftk = [0.0, 0.0, 0.0]
    ecut, ecuteps, ecutsigx = 4, 2, 3
    #scr_nband = 50
    #sigma_nband = 50

    extra_abivars = dict(
        ecut=ecut, 
        istwfk="*1",
    )

    work = g0w0_with_ppmodel_work(structure, pseudos, scf_kppa, nscf_nband, ecuteps, ecutsigx,
                                  accuracy="normal", spin_mode="unpolarized", smearing=None, 
                                  ppmodel="godby", charge=0.0, inclvkb=2, sigma_nband=None, gw_qprange=1,
                                  scr_nband=None, **extra_abivars)
    
    flow.register_work(work)
    return flow
示例#2
0
def itest_htc_g0w0(fwp, tvars):
    """G0W0 corrections with the HT interface."""
    structure = abilab.Structure.from_file(abidata.cif_file("si.cif"))
    pseudos = abidata.pseudos("14si.pspnc")

    flow = abilab.Flow(fwp.workdir, manager=fwp.manager)

    scf_kppa = 10
    nscf_nband = 10
    #nscf_ngkpt = [4,4,4]
    #nscf_shiftk = [0.0, 0.0, 0.0]
    ecut, ecuteps, ecutsigx = 4, 2, 3
    #scr_nband = 50
    #sigma_nband = 50

    extra_abivars = dict(
        ecut=ecut,
        istwfk="*1",
        paral_kgb=tvars.paral_kgb,
    )

    work = g0w0_with_ppmodel_work(structure,
                                  pseudos,
                                  scf_kppa,
                                  nscf_nband,
                                  ecuteps,
                                  ecutsigx,
                                  accuracy="normal",
                                  spin_mode="unpolarized",
                                  smearing=None,
                                  ppmodel="godby",
                                  charge=0.0,
                                  inclvkb=2,
                                  sigma_nband=None,
                                  gw_qprange=1,
                                  scr_nband=None,
                                  **extra_abivars)

    flow.register_work(work)
    flow.allocate()
    flow.connect_signals()

    #flow.build_and_pickle_dump()
    fwp.scheduler.add_flow(flow)
    assert fwp.scheduler.start() == 0
    assert not fwp.scheduler.exceptions
    assert fwp.scheduler.nlaunch == 4

    # The sigma task should produce a SCR file.
    assert len(work[2].outdir.list_filepaths(wildcard="*SCR")) == 1

    flow.show_status()
    assert flow.all_ok
    assert all(work.finalized for work in flow)
示例#3
0
文件: itest_gw.py 项目: gmrigna/abipy
def itest_htc_g0w0(fwp, tvars):
    """G0W0 corrections with the HT interface."""
    structure = abilab.Structure.from_file(abidata.cif_file("si.cif"))
    pseudos = abidata.pseudos("14si.pspnc")

    flow = abilab.Flow(fwp.workdir, manager=fwp.manager)

    scf_kppa = 10
    nscf_nband = 10
    #nscf_ngkpt = [4,4,4]
    #nscf_shiftk = [0.0, 0.0, 0.0]
    ecut, ecuteps, ecutsigx = 4, 2, 3
    #scr_nband = 50
    #sigma_nband = 50

    extra_abivars = dict(
        ecut=ecut,
        istwfk="*1",
        paral_kgb=tvars.paral_kgb,
    )

    work = g0w0_with_ppmodel_work(structure, pseudos, scf_kppa, nscf_nband, ecuteps, ecutsigx,
                                  accuracy="normal", spin_mode="unpolarized", smearing=None,
                                  ppmodel="godby", charge=0.0, inclvkb=2, sigma_nband=None, gw_qprange=1,
                                  scr_nband=None, **extra_abivars)

    flow.register_work(work)
    flow.allocate()
    flow.connect_signals()

    #flow.build_and_pickle_dump()
    fwp.scheduler.add_flow(flow)
    assert fwp.scheduler.start() == 0
    assert not fwp.scheduler.exceptions
    assert fwp.scheduler.nlaunch == 4

    # The sigma task should produce a SCR file.
    assert len(work[2].outdir.list_filepaths(wildcard="*SCR")) == 1

    flow.show_status()
    assert flow.all_ok
    assert all(work.finalized for work in flow)