Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

marink2
Copy link
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!

guess_dets.push_back(det);
}
} else {
guess_dets.push_back(det);
Copy link
Contributor

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

@@ -1863,6 +1863,14 @@ Type: int

Default value: 10

**CORE_GUESS**
Copy link
Contributor

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
Contributor

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

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

Copy link
Contributor

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
Contributor

@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