Skip to content

Commit

Permalink
handle core energy in MolecularHamiltonian.from_fcidump
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinsung committed Jul 2, 2024
1 parent 5e5de38 commit d9aace0
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions tests/python/hamiltonians/molecular_hamiltonian_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

from __future__ import annotations

import dataclasses
import pathlib

import numpy as np
Expand Down Expand Up @@ -171,10 +170,9 @@ def test_from_fcidump(tmp_path: pathlib.Path):
tmp_path / "test.fcidump",
h1e=mol_data.one_body_integrals,
h2e=mol_data.two_body_integrals,
nuc=mol_data.core_energy,
nmo=mol_data.norb,
nelec=mol_data.nelec,
)
mol_ham = ffsim.MolecularHamiltonian.from_fcidump(tmp_path / "test.fcidump")
assert ffsim.approx_eq(
mol_ham, dataclasses.replace(mol_data.hamiltonian, constant=0.0)
)
assert ffsim.approx_eq(mol_ham, mol_data.hamiltonian)

0 comments on commit d9aace0

Please sign in to comment.