Skip to content

Commit

Permalink
Fixed GCC 13.2 compilation errors (#357)
Browse files Browse the repository at this point in the history
Co-authored-by: marink2 <[email protected]>
  • Loading branch information
marink2 and marink2 authored Nov 17, 2023
1 parent b833258 commit fa1d21c
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 5 deletions.
1 change: 1 addition & 0 deletions forte/base_classes/state_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#ifndef _state_info_h_
#define _state_info_h_

#include <memory>
#include <string>
#include <vector>

Expand Down
2 changes: 2 additions & 0 deletions forte/fci/fci_vector.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@

#pragma once

#include <memory>
#include <vector>
#include <cmath>

#include "psi4/libmints/dimension.h"
#include "ambit/tensor.h"
Expand Down
4 changes: 2 additions & 2 deletions forte/genci/genci_string_address.cc
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ StringClass::StringClass(size_t symmetry, const std::vector<int>& mopi,
for (const auto& [aocc_idx, bocc_idx] : occupations) {
for (size_t h_Ia = 0; h_Ia < nirrep_; h_Ia++) {
auto h_Ib = h_Ia ^ symmetry;
auto aocc_h_Ia = alfa_string_classes_map_.at(std::make_tuple(aocc_idx, h_Ia));
auto bocc_h_Ib = beta_string_classes_map_.at(std::make_tuple(bocc_idx, h_Ib));
auto aocc_h_Ia = alfa_string_classes_map_.at(std::make_pair(aocc_idx, h_Ia));
auto bocc_h_Ib = beta_string_classes_map_.at(std::make_pair(bocc_idx, h_Ib));
block_index_[std::make_pair(aocc_h_Ia, bocc_h_Ib)] = determinant_classes_.size();
determinant_classes_.emplace_back(determinant_classes_.size(), aocc_h_Ia, bocc_h_Ib);
}
Expand Down
1 change: 1 addition & 0 deletions forte/genci/genci_vector.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@

#include <functional>
#include <vector>
#include <cmath>

#include "psi4/libmints/dimension.h"
#include "ambit/tensor.h"
Expand Down
4 changes: 2 additions & 2 deletions forte/genci/string_lists_makers.cc
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ void make_vo(const StringList& strings, const std::shared_ptr<StringAddress>& I_
J[p] = true;
if (auto it = J_addresser->find(J); it != J_addresser->end()) {
const auto& [add_J, class_J] = it->second;
auto& list_IJ = list[std::make_tuple(class_I, class_J)];
auto& list_IJ = list[std::make_pair(class_I, class_J)];
list_IJ[std::make_tuple(p, q)].push_back(
StringSubstitution(sign, add_I, add_J));
}
Expand Down Expand Up @@ -252,7 +252,7 @@ void make_vvoo(const StringList& strings, std::shared_ptr<StringAddress> address
if (auto it = addresser->find(J); it != addresser->end()) {
const auto& [add_I, class_I] = addresser->address_and_class(I);
const auto& [add_J, class_J] = it->second;
auto& list_IJ = list[std::make_tuple(class_I, class_J)];
auto& list_IJ = list[std::make_pair(class_I, class_J)];
list_IJ[std::make_tuple(p, q, r, s)].push_back(
StringSubstitution(sign, add_I, add_J));
}
Expand Down
1 change: 1 addition & 0 deletions forte/sparse_ci/ci_spin_adaptation.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#ifndef _spin_adaptation_h_
#define _spin_adaptation_h_

#include <memory>
#include <vector>

namespace psi {
Expand Down
2 changes: 1 addition & 1 deletion tests/pytest/determinant/test_string.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def test_str_address():
for s,a in zip(test_strings,symmetry):
assert str_add.sym(s) == a
for h, nh in zip([0,3],[3,4]):
assert str_add.strpi(h) == nh
assert str_add.strpcls(h) == nh

if __name__ == "__main__":
test_str_constructors()
Expand Down

0 comments on commit fa1d21c

Please sign in to comment.