Skip to content

Commit

Permalink
Final cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
fevangelista committed Jan 1, 2025
1 parent 43713a6 commit 1b64003
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 8 deletions.
3 changes: 0 additions & 3 deletions forte/sparse_ci/bitarray.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,6 @@ template <size_t N> 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]; }

Expand Down
2 changes: 0 additions & 2 deletions forte/sparse_ci/determinant.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,6 @@ template <size_t N> class DeterminantImpl : public BitArray<N> {
using BitArray<N>::find_first_one;
using BitArray<N>::find_last_one;
using BitArray<N>::zero;
using BitArray<N>::set;
using BitArray<N>::reset;

/// the number of bits divided by two
static constexpr size_t nbits_half = N / 2;
Expand Down
1 change: 0 additions & 1 deletion forte/sparse_ci/sparse_operator_hamiltonian.cc
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ SparseOperator sparse_operator_hamiltonian(std::shared_ptr<ActiveSpaceIntegrals>
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) {
Expand Down
4 changes: 3 additions & 1 deletion forte/sparse_ci/sparse_operator_hamiltonian.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<ActiveSpaceIntegrals> as_ints,
double screen_thresh = 1e-12);
double screen_thresh = 1e-14);

} // namespace forte
2 changes: 1 addition & 1 deletion forte/sparse_ci/sq_operator_string.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<size_t> acre,
const std::initializer_list<size_t> bcre,
const std::initializer_list<size_t> aann,
Expand Down

0 comments on commit 1b64003

Please sign in to comment.