Пример #1
0
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)
    print("WTF", src)
    program = copyoutput(tmpdir.join("first_copy.py"), src, tmpdir.join("first"))
    return pwscf(distorted_diamond, tmpdir.join("first"), program=str(program))
Пример #2
0
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)
    print("WTF", src)
    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 pwscf(text):
    from pylada.espresso.tests.bdd.test_single_run import pwscf
    return pwscf(text)
Пример #6
0
def pwscf(text):
    from pylada.espresso.tests.bdd.test_single_run import pwscf
    return pwscf(text)