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

VMC/DMC Force Transition to Batched Code #5093

Open
2 tasks
rcclay opened this issue Jul 18, 2024 · 0 comments
Open
2 tasks

VMC/DMC Force Transition to Batched Code #5093

rcclay opened this issue Jul 18, 2024 · 0 comments

Comments

@rcclay
Copy link
Contributor

rcclay commented Jul 18, 2024

This is a very brief summary of what is needed to get VMC forces into the batched code, and what DMC forces beyond Reynolds approximation would look like.

VMC Forces

Main strategy for putting VMC Assaraf-Caffarel forces into the batched code was to:

  1. Create an "ACForce" estimator, derived from OperatorEstBase object, with helper classes for input.
  2. On the crowd objects, iterate through and call the single-walker API's to accumulate forces. ACForce would be responsible for calling QMCHamiltonian force routines and space warp related routines.
  3. Superficially, performance and output would be nearly identical to existing legacy code.

Main hurdles uncovered:

  1. Ion particle sets are passed in as arguments to all force related routines. This either requires some cloning of ion particle over crowds to get it to work correctly with batched implementation, or eliminating them as arguments. I pursued the latter strategy, since short of finite-differences (see rcclay/clean_force_apis and rcclay/batched_deriv_eval, there is actually virtually no interaction with the ion particle set. However, to maintain full functionality (i.e. single determinant + 1,2,3 body jastrows, space warp), the following dependencies needed to be resolved. Resolution of these dependencies also hits the major performance bottlenecks in the current code.
  • Implement analytic ion derivatives of three-body Jastrow factor. (Performance and Batched Transition)

    1. Need $\frac{d}{dR} J$, as well as $\frac{d}{dR} \nabla J$ and $\frac{d}{dR}\nabla^2 J$.
    2. Currently calculated with finite differences, but this is slow.
    3. Support for finite difference really complicates the transition to the batched code.
  • Implement analytic electron gradients of $E_L$ (Performance and Batched Transition)

    1. Need $\nabla_i \nabla^2 \ln \Psi$, $\nabla_i v(r)$, and non local pseudopotential.
    2. Currently calculated with finite differences, but this is slow.
    3. Support for finite difference really complicates the transition to the batched code.
  1. An alternate strategy is to confer with Ye to pursue the ion particle set cloning strategy, which would allow us to be able to do finite differences.

Performance Bottlenecks:

  • Finite difference J3 evaluation.
  • Finite difference space warp.
  • Current LCAO MO evaluation is $O(N)$. This NEEDS to be brought down to $O(1)$ for forces to scale like $O(N^3)$, otherwise they scale $O(N^4)$.

DMC Forces

Unchanged from Issue #4603 . To summarize though,

  1. For variational drift-diffusion approximation, walker histories need to be implemented, and derivatives of branching term need to be computed (trivial, already needed for VMC). Need major bullet point 1, and bullet point 3.1.
  2. For the rigorous DMC force estimator, we need major bullet points 1, 3, and 4. Major bullet point 2 is a validation step. Bullet points 3.2 and 3.3 are a major pain.
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

No branches or pull requests

1 participant