コード例 #1
0
ファイル: run_ht_si_g0w0ppm.py プロジェクト: srirampr/abipy
def htg0w0_flow(workdir="ht_si_g0w0ppm"):
    structure = AbiStructure.asabistructure(data.cif_file("si.cif"))

    pseudos = data.pseudos("14si.pspnc")

    manager = abilab.TaskManager.from_user_config()

    # Initialize the flow.
    # FIXME
    # Don't know why protocol=-1 does not work here.
    flow = abilab.AbinitFlow(workdir, manager, pickle_protocol=0)

    scf_kppa = 40
    nscf_nband = 100
    #nscf_ngkpt = [4,4,4]
    #nscf_shiftk = [0.0, 0.0, 0.0]
    ecuteps, ecutsigx = 6, 8
    #scr_nband = 50
    #sigma_nband = 50

    extra_abivars = dict(
        ecut=8, 
        istwfk="*1",
        timopt=-1,
    )

    work = g0w0_with_ppmodel(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, scr_nband=None,
                             **extra_abivars)
    
    flow.register_work(work)
    return flow.allocate()
コード例 #2
0
ファイル: itest_gw.py プロジェクト: GkAntonius/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.AbinitFlow(fwp.workdir, 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(
        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)
    fwp.scheduler.start()
    assert fwp.scheduler.num_excs == 0
    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
ファイル: run_ht_si_g0w0ppm.py プロジェクト: GkAntonius/abipy
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_") 

    # Instantiate the TaskManager.
    manager = abilab.TaskManager.from_user_config() if not options.manager else \
              abilab.TaskManager.from_file(options.manager)

    # Initialize the flow.
    # FIXME
    # Don't know why protocol=-1 does not work here.
    flow = abilab.AbinitFlow(workdir, manager) #, pickle_protocol=0)

    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(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.allocate()