Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions utilities/external-interface/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,10 @@ target_link_libraries(external_interface
)

target_set_warning_flags(external_interface)

foreach(DRIVER IN ITEMS "ccsd" "nevpt2")
add_test(
NAME "sequant/external_interface/${DRIVER}"
COMMAND external_interface --driver "${CMAKE_CURRENT_LIST_DIR}/examples/${DRIVER}.json"
)
endforeach()
11 changes: 9 additions & 2 deletions utilities/external-interface/external_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -422,8 +422,15 @@ void generalSetup() {

int main(int argc, char **argv) {
set_locale();
set_default_context({.index_space_registry = IndexSpaceRegistry(),
.vacuum = Vacuum::SingleProduct});
Context ctx({.index_space_registry = IndexSpaceRegistry(),
.vacuum = Vacuum::SingleProduct});
// TODO: This only hides a bug/issue in the processing code where SeQuant
// assumes that it is okay to freely rename external indices while
// canonicalizing an expression. However, this breaks down as soon as those
// indices are tracked externally (e.g. ResultExpr) as those won't get updated
// to use the new names.
ctx.set(CanonicalizeOptions{.method = CanonicalizationMethod::Complete});
set_default_context(ctx);
generalSetup();

CLI::App app(
Expand Down