Function sequant::closed_shell_spintrace

Function Documentation

ExprPtr sequant::closed_shell_spintrace(const ExprPtr &expr, const container::svector<container::svector<Index>> &ext_index_groups = {})

Transforms an expression from spin orbital to spatial orbitals.

This functions is designed for integrating spin out of expression with Coupled Cluster equations in mind.

Attention

This function may fail on arbitrarily created expressions that lacks proper index attributes.

Parameters:
  • exprExprPtr with spin orbital indices

  • ext_index_groups – groups of external indices

Returns:

an expression with spin integrated/adapted