예제 #1
0
def test_example_rhf_water_dense():
    required = [context.get_fn('examples/hf_dft/rhf_water_dense.py')]
    expected = [
        'water-scf.h5', 'water-scf.molden', 'water.FCIDUMP',
        'water-hamiltonian.h5'
    ]
    check_script_in_tmp('./rhf_water_dense.py', required, expected)
예제 #2
0
def test_example_rhf_n2_dense():
    required = [context.get_fn('examples/hf_dft/rhf_n2_dense.py')]
    expected = [
        'n2-scf.molden', 'n2-scf.h5', 'n2-cas8-8.FCIDUMP',
        'n2-hamiltonian-cas8-8.h5', 'n2.FCIDUMP', 'n2-hamiltonian.h5'
    ]
    check_script_in_tmp('./rhf_n2_dense.py', required, expected)
예제 #3
0
def test_example_hamiltonian_internal_ao():
    required = [context.get_fn('examples/hamiltonian/dump_internal_ao.py'),
                context.get_fn('examples/hamiltonian/load_internal_ao.py')]
    expected = ['hamiltonian_ao.h5']
    check_script_in_tmp('horton-regression-test.py ./dump_internal_ao.py; '
                        'horton-regression-test.py ./load_internal_ao.py',
                        required, expected)
예제 #4
0
def test_example_hf_compare():
    required = [context.get_fn('examples/hf_compare/compare.py'),
                context.get_fn('examples/hf_compare/compare_rt.py')]
    expected = ['compare.log']
    cmd = './compare.py %s > compare.log' % context.get_fn('test/helium_hf_sto3g.fchk')
    cmd += '; horton-regression-test.py ./compare_rt.py'
    check_script_in_tmp(cmd, required, expected)
예제 #5
0
def test_example_ap1rog_extham_n2():
    required = [context.get_fn('examples/ap1rog/external_hamiltonian_n2_dense.py'),
                context.get_fn('examples/hf_dft/rhf_n2_dense.py')]
    expected = ['checkpoint.h5', 'n2-scf.molden', 'n2-scf.h5',
                'n2-cas8-8.FCIDUMP', 'n2-hamiltonian-cas8-8.h5', 'n2.FCIDUMP',
                'n2-hamiltonian.h5']
    check_script_in_tmp('./rhf_n2_dense.py; ./external_hamiltonian_n2_dense.py', required, expected)
예제 #6
0
def test_example_hamiltonian_dump_internal_ao_fcidump():
    required = [
        context.get_fn('examples/hamiltonian/dump_internal_ao_fcidump.py')
    ]
    expected = ['hamiltonian_ao_fcidump.h5']
    check_script_in_tmp(
        'horton-regression-test.py ./dump_internal_ao_fcidump.py', required,
        expected)
예제 #7
0
def test_hamiltonian_internal_ao():
    required = [
        context.get_fn('examples/hamiltonian/dump_internal_ao.py'),
        context.get_fn('examples/hamiltonian/load_internal_ao.py')
    ]
    expected = ['hamiltonian_ao.h5']
    check_script_in_tmp('./dump_internal_ao.py; ./load_internal_ao.py',
                        required, expected)
예제 #8
0
def test_example_ap1rog_water_cholesky_321g_restart():
    required = [
        context.get_fn('examples/ap1rog/water_cholesky_3-21g.py'),
        context.get_fn('examples/ap1rog/restart_water_cholesky_3-21g.py')
    ]
    expected = ['checkpoint.h5']
    check_script_in_tmp(
        './water_cholesky_3-21g.py; ./restart_water_cholesky_3-21g.py',
        required, expected)
예제 #9
0
def test_example_hamiltonian_fcidump_ao():
    required = [
        context.get_fn('examples/hamiltonian/dump_fcidump_ao.py'),
        context.get_fn('examples/hamiltonian/load_fcidump_ao.py')
    ]
    expected = ['hamiltonian_ao.FCIDUMP']
    check_script_in_tmp(
        'horton-regression-test.py ./dump_fcidump_ao.py;'
        'horton-regression-test.py ./load_fcidump_ao.py', required, expected)
예제 #10
0
def test_example_oe_water():
    required = [context.get_fn('examples/orbital_entanglement/water.py')]
    expected = [
        'i12.dat', 'checkpoint.h5', 's1.dat', 'orbital_entanglement.png'
    ]
    check_script_in_tmp(
        './water.py; horton-entanglement.py 0.001; '
        'horton-entanglement.py 0.001 1 3;'
        'horton-entanglement.py 0.0001 10', required, expected)
예제 #11
0
def test_example_hf_compare():
    required = [
        context.get_fn('examples/hf_compare/compare.py'),
        context.get_fn('examples/hf_compare/compare_rt.py')
    ]
    expected = ['compare.log']
    cmd = './compare.py %s > compare.log' % context.get_fn(
        'test/helium_hf_sto3g.fchk')
    cmd += '; horton-regression-test.py ./compare_rt.py'
    check_script_in_tmp(cmd, required, expected)
예제 #12
0
def test_example_ap1rog_extham_h2():
    required = [
        context.get_fn('examples/ap1rog/external_hamiltonian_h2_cholesky.py'),
        context.get_fn('examples/hf_dft/rhf_h2_cholesky.py')
    ]
    expected = [
        'checkpoint.h5', 'h2-scf.molden', 'h2-scf.h5', 'h2-hamiltonian.h5'
    ]
    check_script_in_tmp(
        './rhf_h2_cholesky.py; ./external_hamiltonian_h2_cholesky.py',
        required, expected)
예제 #13
0
def test_example_ap1rog_extham_n2():
    required = [
        context.get_fn('examples/ap1rog/external_hamiltonian_n2_dense.py'),
        context.get_fn('examples/hf_dft/rhf_n2_dense.py')
    ]
    expected = [
        'checkpoint.h5', 'n2-scf.molden', 'n2-scf.h5', 'n2-cas8-8.FCIDUMP',
        'n2-hamiltonian-cas8-8.h5', 'n2.FCIDUMP', 'n2-hamiltonian.h5'
    ]
    check_script_in_tmp(
        './rhf_n2_dense.py; ./external_hamiltonian_n2_dense.py', required,
        expected)
예제 #14
0
def test_example_uhf_methyl_dense():
    required = [context.get_fn('examples/hf_dft/uhf_methyl_dense.py')]
    expected = ['methyl.h5', 'methyl.molden']
    check_script_in_tmp('./uhf_methyl_dense.py', required, expected)
예제 #15
0
def test_example_wpart():
    required = [context.get_fn('examples/wpart/becke.py')]
    expected = ['charges.txt']
    check_script_in_tmp('./becke.py', required, expected)
예제 #16
0
def test_example_wpart_becke():
    required = [context.get_fn('examples/wpart/becke.py')]
    expected = ['charges.txt']
    check_script_in_tmp('horton-regression-test.py ./becke.py', required,
                        expected)
예제 #17
0
def test_example_hf_dft_uks_methyl_numlda():
    required = [context.get_fn('examples/hf_dft/uks_methyl_numlda.py')]
    expected = ['methyl.h5']
    check_script_in_tmp('horton-regression-test.py ./uks_methyl_numlda.py',
                        required, expected)
예제 #18
0
def test_example_hydrogen_ring():
    required = [context.get_fn('examples/hamiltonian/hydrogen_ring.py')]
    expected = ['ring.xyz']
    check_script_in_tmp('./hydrogen_ring.py', required, expected)
예제 #19
0
def test_check_script_in_tmp():
    check_script_in_tmp('echo foo > bar', [], ['bar'])
    with assert_raises(AssertionError):
        check_script_in_tmp('echo foo > bar', [], ['egg'])
    check_script_in_tmp('echo', [context.get_fn('test/h2.xyz')], ['h2.xyz'])
예제 #20
0
def test_example_ap1rog_water_dense_cc_pvdz():
    required = [context.get_fn('examples/ap1rog/water_dense_cc-pvdz.py')]
    expected = ['checkpoint.h5']
    check_script_in_tmp('./water_dense_cc-pvdz.py', required, expected)
예제 #21
0
def test_example_ap1rog_water_cholesky_sto3g():
    required = [context.get_fn('examples/ap1rog/water_cholesky_sto-3g.py')]
    expected = ['checkpoint.h5']
    check_script_in_tmp('./water_cholesky_sto-3g.py', required, expected)
예제 #22
0
def test_example_ap1rog_h2_cholesky_cc_pvdz():
    required = [context.get_fn('examples/ap1rog/h2_cholesky_cc-pvdz.py')]
    expected = ['checkpoint.h5']
    check_script_in_tmp('./h2_cholesky_cc-pvdz.py', required, expected)
예제 #23
0
def test_example_ap1rog_h2_cholesky_cc_pvdz():
    required = [context.get_fn('examples/ap1rog/h2_cholesky_cc-pvdz.py')]
    expected = ['checkpoint.h5']
    check_script_in_tmp('./h2_cholesky_cc-pvdz.py', required, expected)
예제 #24
0
def test_example_ap1rog_h2_dense_321g():
    required = [context.get_fn('examples/ap1rog/h2_dense_3-21g.py')]
    expected = ['checkpoint.h5']
    check_script_in_tmp('./h2_dense_3-21g.py', required, expected)
예제 #25
0
def test_hamiltonian_internal_ao_fcidump():
    required = [context.get_fn('examples/hamiltonian/dump_internal_ao_fcidump.py')]
    expected = ['hamiltonian_ao_fcidump.h5']
    check_script_in_tmp('./dump_internal_ao_fcidump.py', required, expected)
예제 #26
0
def test_example_wpart_becke():
    required = [context.get_fn('examples/wpart/becke.py')]
    expected = ['charges.txt']
    check_script_in_tmp('horton-regression-test.py ./becke.py',
                        required, expected)
예제 #27
0
def test_check_script_in_tmp():
    check_script_in_tmp('echo foo > bar', [], ['bar'])
    with assert_raises(AssertionError):
        check_script_in_tmp('echo foo > bar', [], ['egg'])
    check_script_in_tmp('echo', [context.get_fn('test/h2.xyz')], ['h2.xyz'])
예제 #28
0
def test_example_first():
    required = [context.get_fn('examples/getting_started/first.py')]
    expected = ['water.h5']
    check_script_in_tmp('./first.py', required, expected)
예제 #29
0
def test_example_ap1rog_water_dense_cc_pvdz():
    required = [context.get_fn('examples/ap1rog/water_dense_cc-pvdz.py')]
    expected = ['checkpoint.h5']
    check_script_in_tmp('./water_dense_cc-pvdz.py', required, expected)
예제 #30
0
def test_example_ap1rog_water_cholesky_321g_restart():
    required = [context.get_fn('examples/ap1rog/water_cholesky_3-21g.py'),
                context.get_fn('examples/ap1rog/restart_water_cholesky_3-21g.py')]
    expected = ['checkpoint.h5']
    check_script_in_tmp('./water_cholesky_3-21g.py; ./restart_water_cholesky_3-21g.py', required, expected)
예제 #31
0
def test_hamiltonian_fcidump_ao():
    required = [context.get_fn('examples/hamiltonian/dump_fcidump_ao.py'),
                context.get_fn('examples/hamiltonian/load_fcidump_ao.py')]
    expected = ['hamiltonian_ao.FCIDUMP']
    check_script_in_tmp('./dump_fcidump_ao.py; ./load_fcidump_ao.py', required, expected)
예제 #32
0
def test_example_ap1rog_water_minimal():
    required = [context.get_fn('examples/ap1rog/water_minimal.py')]
    expected = ['checkpoint.h5']
    check_script_in_tmp('./water_minimal.py', required, expected)
예제 #33
0
def test_example_ap1rog_hubbard():
    required = [context.get_fn('examples/ap1rog/hubbard.py')]
    expected = ['checkpoint.h5']
    check_script_in_tmp('./hubbard.py', required, expected)
예제 #34
0
def test_example_ptb_h2_cc_pvdz():
    required = [context.get_fn('examples/perturbation_theory/ptb_h2_cc-pvdz.py')]
    expected = ['checkpoint.h5']
    check_script_in_tmp('./ptb_h2_cc-pvdz.py', required, expected)
예제 #35
0
def test_example_ap1rog_extham_h2():
    required = [context.get_fn('examples/ap1rog/external_hamiltonian_h2_cholesky.py'),
                context.get_fn('examples/hf_dft/rhf_h2_cholesky.py')]
    expected = ['checkpoint.h5', 'h2-scf.molden', 'h2-scf.h5',
                'h2-hamiltonian.h5']
    check_script_in_tmp('./rhf_h2_cholesky.py; ./external_hamiltonian_h2_cholesky.py', required, expected)
예제 #36
0
def test_example_first():
    required = [context.get_fn('examples/getting_started/first.py')]
    expected = ['water.h5']
    check_script_in_tmp('./first.py', required, expected)
예제 #37
0
def test_example_ap1rog_h2_dense_321g():
    required = [context.get_fn('examples/ap1rog/h2_dense_3-21g.py')]
    expected = ['checkpoint.h5']
    check_script_in_tmp('./h2_dense_3-21g.py', required, expected)
예제 #38
0
def test_example_ptb_water_def2_svpd():
    required = [context.get_fn('examples/perturbation_theory/ptb_water_def2-svpd.py')]
    expected = ['checkpoint.h5']
    check_script_in_tmp('./ptb_water_def2-svpd.py', required, expected)
예제 #39
0
def test_example_ap1rog_water_cholesky_sto3g():
    required = [context.get_fn('examples/ap1rog/water_cholesky_sto-3g.py')]
    expected = ['checkpoint.h5']
    check_script_in_tmp('./water_cholesky_sto-3g.py', required, expected)
예제 #40
0
def test_example_oe_water():
    required = [context.get_fn('examples/orbital_entanglement/water.py')]
    expected = ['i12.dat', 'checkpoint.h5', 's1.dat', 'orbital_entanglement.png']
    check_script_in_tmp('./water.py; horton-entanglement.py 0.001; '
                        'horton-entanglement.py 0.001 1 3;'
                        'horton-entanglement.py 0.0001 10', required, expected)
예제 #41
0
def test_example_ap1rog_water_minimal():
    required = [context.get_fn('examples/ap1rog/water_minimal.py')]
    expected = ['checkpoint.h5']
    check_script_in_tmp('./water_minimal.py', required, expected)
예제 #42
0
def test_example_rhf_water_cholesky():
    required = [context.get_fn('examples/hf_dft/rhf_water_cholesky.py')]
    expected = ['water.h5', 'water.molden']
    check_script_in_tmp('./rhf_water_cholesky.py', required, expected)
예제 #43
0
def test_example_ptb_h2_cc_pvdz():
    required = [
        context.get_fn('examples/perturbation_theory/ptb_h2_cc-pvdz.py')
    ]
    expected = ['checkpoint.h5']
    check_script_in_tmp('./ptb_h2_cc-pvdz.py', required, expected)
예제 #44
0
def test_example_rhf_n2_dense():
    required = [context.get_fn('examples/hf_dft/rhf_n2_dense.py')]
    expected = ['n2-scf.molden', 'n2-scf.h5', 'n2-cas8-8.FCIDUMP',
                'n2-hamiltonian-cas8-8.h5', 'n2.FCIDUMP', 'n2-hamiltonian.h5']
    check_script_in_tmp('./rhf_n2_dense.py', required, expected)
예제 #45
0
def test_example_ptb_water_def2_svpd():
    required = [
        context.get_fn('examples/perturbation_theory/ptb_water_def2-svpd.py')
    ]
    expected = ['checkpoint.h5']
    check_script_in_tmp('./ptb_water_def2-svpd.py', required, expected)
예제 #46
0
def test_example_rhf_h2_cholesky():
    required = [context.get_fn('examples/hf_dft/rhf_h2_cholesky.py')]
    expected = ['h2-scf.molden', 'h2-scf.h5', 'h2-hamiltonian.h5']
    check_script_in_tmp('./rhf_h2_cholesky.py', required, expected)
예제 #47
0
def test_example_rhf_water_cholesky():
    required = [context.get_fn('examples/hf_dft/rhf_water_cholesky.py')]
    expected = ['water.h5', 'water.molden']
    check_script_in_tmp('./rhf_water_cholesky.py', required, expected)
예제 #48
0
def test_example_hydrogen_ring():
    required = [context.get_fn('examples/hamiltonian/hydrogen_ring.py')]
    expected = ['ring.xyz']
    check_script_in_tmp('./hydrogen_ring.py', required, expected)
예제 #49
0
def test_example_rhf_h2_cholesky():
    required = [context.get_fn('examples/hf_dft/rhf_h2_cholesky.py')]
    expected = ['h2-scf.molden', 'h2-scf.h5', 'h2-hamiltonian.h5']
    check_script_in_tmp('./rhf_h2_cholesky.py', required, expected)
예제 #50
0
def test_example_rhf_water_dense():
    required = [context.get_fn('examples/hf_dft/rhf_water_dense.py')]
    expected = ['water-scf.h5', 'water-scf.molden', 'water.FCIDUMP',
                'water-hamiltonian.h5']
    check_script_in_tmp('./rhf_water_dense.py', required, expected)
예제 #51
0
def test_example_rks_water_numgga():
    required = [context.get_fn('examples/hf_dft/rks_water_numgga.py')]
    expected = ['water.h5']
    check_script_in_tmp('./rks_water_numgga.py', required, expected)
예제 #52
0
def test_example_rks_water_numgga():
    required = [context.get_fn('examples/hf_dft/rks_water_numgga.py')]
    expected = ['water.h5']
    check_script_in_tmp('./rks_water_numgga.py', required, expected)
예제 #53
0
def test_example_uks_methyl_numgga():
    required = [context.get_fn('examples/hf_dft/uks_methyl_numgga.py')]
    expected = ['methyl.h5']
    check_script_in_tmp('./uks_methyl_numgga.py', required, expected)
예제 #54
0
def test_example_uhf_methyl_dense():
    required = [context.get_fn('examples/hf_dft/uhf_methyl_dense.py')]
    expected = ['methyl.h5', 'methyl.molden']
    check_script_in_tmp('./uhf_methyl_dense.py', required, expected)
예제 #55
0
def test_example_hf_compare():
    required = [context.get_fn('examples/hf_compare/compare.py')]
    expected = []
    check_script_in_tmp(
        './compare.py %s' % context.get_fn('test/helium_hf_sto3g.fchk'),
        required, expected)
예제 #56
0
def test_example_uks_methyl_numgga():
    required = [context.get_fn('examples/hf_dft/uks_methyl_numgga.py')]
    expected = ['methyl.h5']
    check_script_in_tmp('./uks_methyl_numgga.py', required, expected)
예제 #57
0
def test_example_ap1rog_hubbard():
    required = [context.get_fn('examples/ap1rog/hubbard.py')]
    expected = ['checkpoint.h5']
    check_script_in_tmp('./hubbard.py', required, expected)
예제 #58
0
def test_example_wpart():
    required = [context.get_fn('examples/wpart/becke.py')]
    expected = ['charges.txt']
    check_script_in_tmp('./becke.py', required, expected)
예제 #59
0
def test_example_hf_compare():
    required = [context.get_fn('examples/hf_compare/compare.py')]
    expected = []
    check_script_in_tmp('./compare.py %s' % context.get_fn('test/helium_hf_sto3g.fchk'), required, expected)
예제 #60
0
def test_example_hf_dft_uks_methyl_numlda():
    required = [context.get_fn('examples/hf_dft/uks_methyl_numlda.py')]
    expected = ['methyl.h5']
    check_script_in_tmp('horton-regression-test.py ./uks_methyl_numlda.py',
                        required, expected)