Wave function testing utilities¶
-
pyqmc.testwf.test_updateinternals(wf, configs)[source]¶ Parameters: - wf – a wave function object to be tested
- configs ((nconf, nelec, 3) array) – electron positions
Returns: max abs errors
Return type: dictionary
-
pyqmc.testwf.test_wf_gradient(wf, configs, delta=1e-05)[source]¶ Tests wf.gradient(e,configs) against numerical derivatives of wf.testvalue(e,configs)
Parameters: - wf – a wavefunction object with functions wf.recompute(configs), wf.testvalue(e,configs) and wf.gradient(e,configs)
- configs ((nconf, nelec, 3) array) – positions to set the wf object
- delta (float) – the finite difference step; 1e-5 to 1e-6 seem to be the best compromise between accuracy and machine precision
- For gradient and testvalue:
- e is the electron index epos is nconf x 3 positions of electron e
wf.testvalue(e,epos) should return a ratio: the wf value at the position where electron e is moved to epos divided by the current value wf.gradient(e,epos) should return grad ln Psi(epos), while keeping all the other electrons at current position. epos may be different from the current position of electron e
Returns: max abs errors Return type: dictionary
-
pyqmc.testwf.test_wf_laplacian(wf, configs, delta=1e-05)[source]¶ Tests wf.laplacian(e,epos) against numerical derivatives of wf.gradient(e,epos)
Parameters: - wf – a wavefunction object with functions wf.recompute(configs), wf.gradient(e,configs) and wf.laplacian(e,configs)
- configs ((nconf, nelec, 3) array) – positions to set the wf object
- delta (float) – the finite difference step; 1e-5 to 1e-6 seem to be the best compromise between accuracy and machine precision
- For gradient and laplacian:
- e is the electron index epos is nconf x 3 positions of electron e
wf.gradient(e,epos) should return grad ln Psi(epos), while keeping all the other electrons at current position. epos may be different from the current position of electron e wf.laplacian(e,epos) should behave the same as gradient, except lap(Psi(epos))/Psi(epos)
Returns: max abs errors Return type: dictionary