From ae5a5e84c2fec3ecede5d67646267423b24b3054 Mon Sep 17 00:00:00 2001 From: Zhentao Wang Date: Fri, 1 Dec 2017 15:36:29 -0500 Subject: [PATCH] bug fix. --- src/model.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/model.cc b/src/model.cc index 2259782..f55f95f 100644 --- a/src/model.cc +++ b/src/model.cc @@ -1850,7 +1850,7 @@ namespace qbasis { std::vector> values; T value_gs = static_cast(0.0); for (auto it = Bq.mats.begin(); it != Bq.mats.end(); it++) { - if (Bq.q_diagonal()) { // only momentum changes + if (it->q_diagonal()) { // only momentum changes values.push_back(std::pair(j, sj * basis_vrnl[sec_old][j].diagonal_operator(props,*it))); } else { intermediate_states[tid].copy(basis_vrnl[sec_old][j]);