From 1b64003547c3d6237201aa2488649b0687adc5d4 Mon Sep 17 00:00:00 2001 From: fevangelista Date: Wed, 1 Jan 2025 18:30:34 -0500 Subject: [PATCH] Final cleanup --- forte/sparse_ci/bitarray.hpp | 3 --- forte/sparse_ci/determinant.hpp | 2 -- forte/sparse_ci/sparse_operator_hamiltonian.cc | 1 - forte/sparse_ci/sparse_operator_hamiltonian.h | 4 +++- forte/sparse_ci/sq_operator_string.h | 2 +- 5 files changed, 4 insertions(+), 8 deletions(-) diff --git a/forte/sparse_ci/bitarray.hpp b/forte/sparse_ci/bitarray.hpp index 58bdb0765..93f9ded6b 100644 --- a/forte/sparse_ci/bitarray.hpp +++ b/forte/sparse_ci/bitarray.hpp @@ -202,9 +202,6 @@ template class BitArray { getword(pos) ^= (-val ^ getword(pos)) & maskbit(pos); // if-free implementation } - void set(size_t pos) { set_bit(pos, true); } - void reset(size_t pos) { set_bit(pos, false); } - /// get a word in position pos word_t get_word(size_t pos) const { return words_[pos]; } diff --git a/forte/sparse_ci/determinant.hpp b/forte/sparse_ci/determinant.hpp index 2595f86be..fe0ba5cbb 100644 --- a/forte/sparse_ci/determinant.hpp +++ b/forte/sparse_ci/determinant.hpp @@ -76,8 +76,6 @@ template class DeterminantImpl : public BitArray { using BitArray::find_first_one; using BitArray::find_last_one; using BitArray::zero; - using BitArray::set; - using BitArray::reset; /// the number of bits divided by two static constexpr size_t nbits_half = N / 2; diff --git a/forte/sparse_ci/sparse_operator_hamiltonian.cc b/forte/sparse_ci/sparse_operator_hamiltonian.cc index ad6abc766..7cce8e4d9 100644 --- a/forte/sparse_ci/sparse_operator_hamiltonian.cc +++ b/forte/sparse_ci/sparse_operator_hamiltonian.cc @@ -40,7 +40,6 @@ SparseOperator sparse_operator_hamiltonian(std::shared_ptr size_t nmo = as_ints->nmo(); H.add_term_from_str("[]", as_ints->nuclear_repulsion_energy() + as_ints->scalar_energy() + as_ints->frozen_core_energy()); - Determinant cre, ann; for (size_t p = 0; p < nmo; p++) { for (size_t q = 0; q < nmo; q++) { if (std::fabs(as_ints->oei_a(p, q)) > screen_thresh) { diff --git a/forte/sparse_ci/sparse_operator_hamiltonian.h b/forte/sparse_ci/sparse_operator_hamiltonian.h index 366833d8e..072e61e53 100644 --- a/forte/sparse_ci/sparse_operator_hamiltonian.h +++ b/forte/sparse_ci/sparse_operator_hamiltonian.h @@ -38,7 +38,9 @@ class ActiveSpaceIntegrals; /// @brief Generate the a SparseOperator representation of the Hamiltonian using integrals from an /// ActiveSpaceIntegrals object +/// @param as_ints the ActiveSpaceIntegrals object containing the integrals +/// @param screen_thresh the threshold to screen the integrals SparseOperator sparse_operator_hamiltonian(std::shared_ptr as_ints, - double screen_thresh = 1e-12); + double screen_thresh = 1e-14); } // namespace forte diff --git a/forte/sparse_ci/sq_operator_string.h b/forte/sparse_ci/sq_operator_string.h index 2a8fff6e4..ce152ce0b 100644 --- a/forte/sparse_ci/sq_operator_string.h +++ b/forte/sparse_ci/sq_operator_string.h @@ -90,7 +90,7 @@ class SQOperatorString { SQOperatorString(); /// constructor from a pair of Determinant objects SQOperatorString(const Determinant& cre, const Determinant& ann); - /// constructor from a pair of Determinant objects + /// constructor from initializer lists of creation and annihilation operators SQOperatorString(const std::initializer_list acre, const std::initializer_list bcre, const std::initializer_list aann,