Example #1
0
def check_load_dump_consistency(fn):
    mol1 = IOData.from_file(context.get_fn(os.path.join('test', fn)))
    with tmpdir('horton.io.test.test_molden.check_load_dump_consistency.%s' % fn) as dn:
        fn_tmp = os.path.join(dn, 'foo.molden')
        mol1.to_file(fn_tmp)
        mol2 = IOData.from_file(fn_tmp)
    compare_mols(mol1, mol2)
Example #2
0
def test_consistency_core():
    with h5.File('horton.io.test.test_chk.test_consistency_core', driver='core', backing_store=False) as f:
        fn_fchk = context.get_fn('test/water_sto3g_hf_g03.fchk')
        fn_log = context.get_fn('test/water_sto3g_hf_g03.log')
        mol1 = IOData.from_file(fn_fchk, fn_log)
        mol1.to_file(f)
        mol2 = IOData.from_file(f)
        compare_mols(mol1, mol2)
Example #3
0
def check_load_dump_consistency(fn):
    mol1 = IOData.from_file(context.get_fn(os.path.join('test', fn)))
    with tmpdir('horton.io.test.test_molden.check_load_dump_consistency.%s' %
                fn) as dn:
        fn_tmp = os.path.join(dn, 'foo.molden')
        mol1.to_file(fn_tmp)
        mol2 = IOData.from_file(fn_tmp)
    compare_mols(mol1, mol2)
Example #4
0
def test_consistency_file():
    with tmpdir('horton.io.test.test_chk.test_consistency_file') as dn:
        fn_h5 = '%s/foo.h5' % dn
        fn_fchk = context.get_fn('test/water_sto3g_hf_g03.fchk')
        fn_log = context.get_fn('test/water_sto3g_hf_g03.log')
        mol1 = IOData.from_file(fn_fchk, fn_log)
        mol1.to_file(fn_h5)
        mol2 = IOData.from_file(fn_h5)
        compare_mols(mol1, mol2)