Skip to content

Commit 410b203

Browse files
committed
Attempt fix by explicitly passing named indices along
1 parent 30f5e6b commit 410b203

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

SeQuant/domain/mbpt/spin.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -969,7 +969,13 @@ ExprPtr closed_shell_spintrace(
969969
// Index tags are cleaned prior to calling the fast canonicalizer
970970
detail::reset_idx_tags(expr); // This call is REQUIRED
971971
expand(expr); // This call is REQUIRED
972-
simplify(expr); // full simplify to combine terms before count_cycles
972+
SimplifyOptions opts = SimplifyOptions::default_options();
973+
opts.named_indices = std::vector<Index>{};
974+
for (const auto& group : ext_index_groups) {
975+
opts.named_indices->insert(opts.named_indices->end(), group.begin(),
976+
group.end());
977+
}
978+
simplify(expr, opts); // full simplify to combine terms before count_cycles
973979

974980
// Lambda for spin-tracing a product term
975981
// For closed-shell case, a spin-traced result is a product term scaled by

0 commit comments

Comments
 (0)