Skip to content

Commit

Permalink
Removed the IntegralSolverFCIDUMP class.
Browse files Browse the repository at this point in the history
  • Loading branch information
alexfleury-sb committed Aug 20, 2024
1 parent 8309b13 commit c3f4f76
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 152 deletions.
1 change: 0 additions & 1 deletion tangelo/toolboxes/molecular_computation/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,5 @@
# limitations under the License.

from tangelo.toolboxes.molecular_computation.integral_solver import IntegralSolver, IntegralSolverEmpty
from tangelo.toolboxes.molecular_computation.integral_solver_fcidump import IntegralSolverFCIDUMP
from tangelo.toolboxes.molecular_computation.integral_solver_psi4 import IntegralSolverPsi4, IntegralSolverPsi4QMMM
from tangelo.toolboxes.molecular_computation.integral_solver_pyscf import IntegralSolverPySCF, IntegralSolverPySCFQMMM
140 changes: 0 additions & 140 deletions tangelo/toolboxes/molecular_computation/integral_solver_fcidump.py

This file was deleted.

12 changes: 1 addition & 11 deletions tangelo/toolboxes/molecular_computation/tests/test_fcidump.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,8 @@

from openfermion.utils import load_operator

from tangelo import SecondQuantizedMolecule
from tangelo.molecule_library import mol_H2_sto3g
from tangelo.toolboxes.operators import FermionOperator
from tangelo.toolboxes.molecular_computation import IntegralSolverFCIDUMP
from tangelo.toolboxes.molecular_computation.fcidump import fermop_from_fcidump

# For openfermion.load_operator function.
Expand All @@ -34,22 +32,14 @@

class FCIDUMPUtilitiesTest(unittest.TestCase):

def test_read_fcidump_without_integralsolver(self):
def test_read_fcidump_to_fermionoperator(self):
"""Generating fermionic operator from a FCIDUMP file without passing
through an IntegralSolver.
"""

ferm_op = fermop_from_fcidump(os.path.abspath(pwd_this_test + "/data/H2_sto3g.fcidump"))
self.assertTrue(ferm_op_ref.isclose(ferm_op))

def test_read_fcidump_with_integralsolver(self):
"""Generating fermionic operator from a FCIDUMP file by passing through
an IntegralSolver.
"""

secmol = SecondQuantizedMolecule(mol_H2_sto3g.xyz, solver=IntegralSolverFCIDUMP(pwd_this_test + "/data/H2_sto3g.fcidump"))
self.assertTrue(ferm_op_ref.isclose(secmol.fermionic_hamiltonian))

def test_write_fcidump(self):
"""Writing a FCIDUMP file from a SecondQuantizedMolecule. The test
checks if the fermionic operator can be generated from the newly
Expand Down

0 comments on commit c3f4f76

Please sign in to comment.