diff --git a/openfermionpyscf/_run_pyscf.py b/openfermionpyscf/_run_pyscf.py index 997e545..18cac37 100644 --- a/openfermionpyscf/_run_pyscf.py +++ b/openfermionpyscf/_run_pyscf.py @@ -237,7 +237,8 @@ def generate_molecular_hamiltonian( # Run electronic structure calculations molecule = run_pyscf( - MolecularData(geometry, basis, multiplicity, charge) + MolecularData(geometry, basis, multiplicity, charge), + save=False ) # Freeze core orbitals and truncate to active space diff --git a/openfermionpyscf/tests/_run_pyscf_test.py b/openfermionpyscf/tests/_run_pyscf_test.py index a7083a7..0e5cb11 100644 --- a/openfermionpyscf/tests/_run_pyscf_test.py +++ b/openfermionpyscf/tests/_run_pyscf_test.py @@ -24,13 +24,14 @@ basis = '6-31g' multiplicity = 1 charge = 0 -molecule = MolecularData(geometry, - basis, - multiplicity, - charge) -def test_run_pyscf(): +def test_run_pyscf(tmp_path): + molecule = MolecularData(geometry, + basis, + multiplicity, + charge, + data_directory=str(tmp_path)) new_mole = run_pyscf(molecule, run_scf=True, run_mp2=True, @@ -39,6 +40,7 @@ def test_run_pyscf(): run_fci=True, verbose=1) assert isinstance(new_mole, PyscfMolecularData) + assert os.path.exists(f'{new_mole.filename}.hdf5') def test_run_pyscf_without_save(tmp_path):