Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion openfermionpyscf/_run_pyscf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 7 additions & 5 deletions openfermionpyscf/tests/_run_pyscf_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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):
Expand Down
Loading