QMCPACK / qmcpack

Main repository for QMCPACK, an open-source production level many-body ab initio Quantum Monte Carlo code for computing the electronic structure of atoms, molecules, and solids with full performance portable GPU support
http://www.qmcpack.org
Other
283 stars 135 forks source link

Risky finite difference in eeI Jastrow evalGradSource #3928

Open ye-luo opened 2 years ago

ye-luo commented 2 years ago

Is your feature request related to a problem? Please describe. Finite difference implementation complicates the code. It may cause unexpected side effect since it naturally changes the states of the wavefunction and breaks const assumptions. It is also susceptible to numerical issues especially when a node crossing is involved. It is also not performant due to redundant calculations.

Describe the solution you'd like Implement analytic derivatives.

prckent commented 2 years ago

https://github.com/QMCPACK/qmcpack/blob/develop/src/QMCWaveFunctions/Jastrow/JeeIOrbitalSoA.h#L980

prckent commented 2 years ago

As we begin to prove what works in offload, it would be an interesting project for someone (e.g. cs student) to try using code generation, automatic differentiation etc. for all of these features.

markdewing commented 2 years ago

Some symbolic algebra deriving the constraints for the three body Jastrow is here: https://github.com/QMCPACK/qmc_algorithms/blob/master/Wavefunctions/ThreeBodyJastrowPolynomial.ipynb

There's also the gen_three_body.py script in the same directory that does some code generation.

These files could be used as a starting point for doing some code generation of derivatives.