iodata.test.test_wfx module

Test iodata.formats.wfn module.

check_load_dump_consistency(fn, tmpdir)[source]

Check if data is preserved after dumping and loading a Wfx file.

Parameters:
  • fn (str) – The Molekel filename to load

  • tmpdir (str) – The temporary directory to dump and load the file.

compare_mulliken_charges(fname, tmpdir, rtol=1e-07, atol=0.0, match=None, allow_changes=False)[source]

Check if charges are computed correctly after dumping and loading WFX file format.

Parameters:
  • fname (str) – The filename to be load.

  • tmpdir (str) – The temporary directory to dump and load the file.

  • rtol (float) – Relative tolerance when comparing charges. (optional)

  • atol (float) – Absolute tolerance when comparing charges. (optional)

  • match (Optional[str]) – When given, loading the file is expected to raise a warning whose message string contains match.

helper_load_data_wfx(fn_wfx)[source]

Load a testing WFX file with iodata.formats.wfx.load_data_wfx.

test_dump_one(path, tmpdir)[source]
test_dump_one_from_molden_neon(tmpdir)[source]
test_dump_one_match(tmpdir, path, match)[source]
test_dump_one_pure_functions(tmpdir)[source]
test_generalized_orbitals()[source]
test_load_data_wfx_h2()[source]

Test load_data_wfx with h2_ub3lyp_ccpvtz.wfx.

test_load_data_wfx_h2o_error()[source]

Check that sections without a closing tag result in an exception.

test_load_data_wfx_water()[source]

Test load_data_wfx with water_sto3g_hf.wfx.

test_load_dump_consistency_h2(tmpdir)[source]
test_load_dump_consistency_lih_cation_cisd(tmpdir)[source]
test_load_dump_consistency_lih_cation_rohf(tmpdir)[source]
test_load_dump_consistency_lih_cation_uhf(tmpdir)[source]
test_load_dump_consistency_water(tmpdir)[source]
test_load_one_h2()[source]

Test load_one with h2 ub3lyp_ccpvtz WFX input.

test_load_one_h2o()[source]

Test load_one with h2o sto-3g WFX input.

test_load_one_lih_cation_cisd()[source]
test_load_one_lih_cation_rohf()[source]
test_load_one_lih_cation_uhf()[source]
test_load_truncated_h2o(tmpdir)[source]

Check that a truncated file raises an exception.

test_parse_wfx_missing_tag_h2o()[source]

Check that missing sections result in an exception.