Skip to content

FCI and GENCI initial core guess determinants for Davidson-Liu solver#377

Open
marink2 wants to merge 16 commits intoevangelistalab:mainfrom
marink2:pr-stage
Open

FCI and GENCI initial core guess determinants for Davidson-Liu solver#377
marink2 wants to merge 16 commits intoevangelistalab:mainfrom
marink2:pr-stage

Conversation

@marink2
Copy link
Copy Markdown
Contributor

@marink2 marink2 commented Jan 29, 2024

Description

PR incorporates the feature to run a FCI (or GENCI) calculation(s) with core-excited determinants as the initial guess space for the Davidson-Liu solver. Core-excited determinants include determinant strings with single- and none-occupation on the first position.

User Notes

  • Added default boolean parameter (bool core_guess) to StateInfo class.

  • Added protected boolean member variable (core_guess_) to ActiveSpaceMethod class.

  • ActiveSpaceSolver assigns values of DL_CORE_INITIAL_GUESS to StateInfo object, StateInfo maps this value to ActiveSpaceMethod, which passes value to GENCI or FCI solver.

  • Feature is implemented for GENCI and FCI solvers only.

  • Included two test cases, fci-core-1 and fci-core-2, for the implemented feature.

  • Added default boolean parameter (bool core_guess) to find_initial_guess_det member function of Forte.
    This feature prints the value(s) of DL_CORE_INITIAL_GUESS in an appropriate place ("Initial Guess") of the output.dat file. To avoid cluttering the parameter list of this function consider creating an instance of ActiveSpaceMethod in sparce_ci_initial_guess.cc.

Checklist

  • Added/updated tests of new features and included a reference output.ref file
  • Documented source code
  • Documented new features in the manual
  • Ready to go!

Comment thread forte/fci/fci_solver_initial_guess.cc Outdated
guess_dets.push_back(det);
}
} else {
guess_dets.push_back(det);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let us change push_back to emplace_back here, though the speed does not matter at this place. I can barely find a place where emplace_back is worse than push_back

Comment thread docs/source/options.rst Outdated

Default value: 10

**CORE_GUESS**
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need a better name for this. Core_guess does not make sense to me. Making it longer and clearer what it means.

@huangm29
Copy link
Copy Markdown
Collaborator

Please ensure your "User Notes" and "Checklist" correspond to your changes. See other PR for examples.

} else {
repr += "_" + std::to_string(0);
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

repr += "" + std::to_string(core_guess ? 1 : 0);

Copy link
Copy Markdown
Collaborator

@huangm29 huangm29 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make some changes suggested by comments and these are good to go!

@marink2 marink2 requested a review from huangm29 January 30, 2024 18:14
@huangm29 huangm29 mentioned this pull request Feb 5, 2024
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants