コード例 #1
0
ファイル: test_restart.py プロジェクト: pylada/pylada-light
def extract(tmpdir, distorted_diamond, pwscf):
    from pylada.espresso.tests.bdd.fixtures import copyoutput, data_path
    src = data_path("restarted", "first")
    tmpdir.join("first", "Si.pz-vbc.UPF").ensure(file=True)
    program = copyoutput(
        tmpdir.join("first_copy.py"), src, tmpdir.join("first"))
    return pwscf(distorted_diamond, tmpdir.join("first"), program=str(program))
コード例 #2
0
ファイル: test_restart.py プロジェクト: lxf-gzu/pylada-light
def extract(tmpdir, distorted_diamond, pwscf):
    from pylada.espresso.tests.bdd.fixtures import copyoutput, data_path
    src = data_path("restarted", "first")
    tmpdir.join("first", "Si.pz-vbc.UPF").ensure(file=True)
    program = copyoutput(tmpdir.join("first_copy.py"), src,
                         tmpdir.join("first"))
    return pwscf(distorted_diamond, tmpdir.join("first"), program=str(program))
コード例 #3
0
def run_second(tmpdir, extract, pwscf, distorted_diamond, passon):
    from pylada.espresso.tests.bdd.fixtures import copyoutput, data_path
    assert extract.input_path == tmpdir.join("first", "pwscf.in")
    assert extract.output_path == tmpdir.join("first", "pwscf.out")
    assert extract.success
    pwscf.control.calculation = None
    src = data_path("restarted", "second")
    tmpdir.join("second", "Si.pz-vbc.UPF").ensure(file=True)
    program = copyoutput(tmpdir.join("second_copy.py"), src, tmpdir.join("second"))
    passon.append(pwscf(distorted_diamond, tmpdir.join("second"), restart=extract,
                        program=str(program)))
コード例 #4
0
def run_second(tmpdir, extract, pwscf, distorted_diamond, passon):
    from pylada.espresso.tests.bdd.fixtures import copyoutput, data_path
    assert extract.input_path == tmpdir.join("first", "pwscf.in")
    assert extract.output_path == tmpdir.join("first", "pwscf.out")
    assert extract.success
    pwscf.control.calculation = None
    src = data_path("restarted", "second")
    tmpdir.join("second", "Si.pz-vbc.UPF").ensure(file=True)
    program = copyoutput(tmpdir.join("second_copy.py"), src,
                         tmpdir.join("second"))
    passon.append(
        pwscf(distorted_diamond,
              tmpdir.join("second"),
              restart=extract,
              program=str(program)))
コード例 #5
0
def run_nonscf(tmpdir, aluminum, pwscf, passon):
    from pylada.espresso.tests.bdd.fixtures import copyoutput, data_path
    src = data_path("nonscf")
    program = copyoutput(tmpdir, src, tmpdir)
    passon.append(pwscf(aluminum, tmpdir, program=str(program)))
コード例 #6
0
def run_nonscf(tmpdir, aluminum, pwscf, passon):
    from pylada.espresso.tests.bdd.fixtures import copyoutput, data_path
    src = data_path("nonscf")
    program = copyoutput(tmpdir, src, tmpdir)
    passon.append(pwscf(aluminum, tmpdir, program=str(program)))