QMCPACK / QMCPACK/qmcpack

WFOpt NLPP derivatives status

Open
#3,789 3 comments 0 reactions 0 assignees View on GitHub
optimization
Dominant language
C++
Stars
403
Forks
154
Avg merge
1d 12h
Merged PRs (30d)
82

Description

In WFOpt, both kinetic energy and NLPP depends on WF optimizable parameters.

1. TWF::evaluateDerivatives compute both \partial_\alpha log(psi) and \partial_\alpha KE.
so this function is currently a pure virtual function, namely, Each WFC must implement it. If a given WFC doesn't carry any optimization parameter. it still needs to implement a empty function to make zero contribution.

2a. If use_nonlocalpp_deriv=yes, and NLPP algorithm=non-batched. This is a very slow code path due to repeatedly accept/reject moves.
* NLPP calls TWF::evaluateDerivativesWF which computes \partial_\alpha log(psi).
* Each WFC being part of TWF needs to implement WFC::evaluateDerivativesWF. The current base class implementation is runtime error stopper. The is intended to stop users and figure out if an zero contribution implementation is appropriate.
* We have meaningful implementation in MultiSlaterDetTableMethod (multi det), J2OrbitalSoA, J2OMPTarget, J1OrbitalSoA, J1Spin although the implmenetaiton was done quick and dirty.
* DiracDeterminantBase (single det base class) implements empty function to make tests without orbital optimization run. This is wrong when orbital optimization is enabled.

2b. If use_nonlocalpp_deriv=yes, and NLPP algorithm=batched. This is a much faster code path.
* NLPP calls TWF::evaluateDerivRatios which computes \partial_\alpha [ log(psi(Rq)) - log(psi(R)) ].
* Each WFC being part of TWF needs to implement WFC::evaluateDerivRatios. The current base class implementation is zero contribution. I'm inclinde to change the base class implementation to runtime error. Convenience vs safety, I'm favoring safety.
* We have meaningful implementation in J2OrbitalSoA, J2OMPTarget, J1OrbitalSoA. ~~For multidet, the coefficient contribution is also zero~~ (#4174). ~~Missing JeeIcontribution is zero~~(#4177) Missing J1 spin/kspace
* Both single and multi Slater determinant implementations rely on base class zero contribution implementation. This is wrong when orbital optimization is enabled.

I'm inclinded to phasing out 2a and further develop 3b.

We can change use_nonlocalpp_deriv to yes by default ~~, the only breaking feature is MSD because NLPP algorithm=batched is default and case 3 adds zero contribution~~. Having some contribution is better than nothing.

~~once 2b fully covers 2a. I even think we should remove use_nonlocalpp_deriv option.~~
use_nonlocalpp_deriv has been removed.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.