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

Move NonLocalTOperator objects from Hamiltonian to Drivers #5137

Merged
merged 13 commits into from
Aug 22, 2024

Conversation

ye-luo
Copy link
Contributor

@ye-luo ye-luo commented Aug 21, 2024

Review after #5135

Proposed changes

  1. NonLocalTOperator object is no longer one per Hamiltonian but per QMCUpdateBase or crowd.
  2. Hamiltonian no longer needs to keep track of nlpp_ptr which only works when there is only one NLPP.
  3. Make makeNonLocalMovesPbyP virtual and SO NLPP can implement it later
  4. NonLocalTOperator class still needs some cleanup around constructor which I keep it intact.
  5. DMCContextForSteps inherited from ContextForSteps to include a NonLocalTOperator object.

What type(s) of changes does this code introduce?

  • New feature

Does this introduce a breaking change?

  • No

What systems has this change been tested on?

laptop

Checklist

  • Yes. This PR is up to date with current the current state of 'develop'
  • Yes. Code added or changed in the PR has been clang-formatted

@ye-luo ye-luo marked this pull request as draft August 21, 2024 14:45
@ye-luo ye-luo force-pushed the refactor-ContextForSteps branch 2 times, most recently from 4d87314 to f8dadb6 Compare August 21, 2024 21:39
@ye-luo ye-luo marked this pull request as ready for review August 22, 2024 16:07
@@ -112,6 +111,16 @@ class QMCDriverNew : public QMCDriverInterface, public MPIObjectBase
//xmlNodePtr walker_logs_xml;

protected:
class ContextForSteps
{
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you add a description?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

will do.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed.

{}

///non local operator
NonLocalTOperator non_local_ops;
Copy link
Contributor

Choose a reason for hiding this comment

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

Can this be protected or private?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ContextForSteps and its derived class are intended to be just a struct. Marking it private and adding an access function are unnecessary.

@ye-luo
Copy link
Contributor Author

ye-luo commented Aug 22, 2024

Test this please

@prckent prckent merged commit bca6887 into QMCPACK:develop Aug 22, 2024
40 of 41 checks passed
@ye-luo ye-luo deleted the refactor-ContextForSteps branch August 22, 2024 23:53
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