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

Add example He wavefunction. #1621

Merged
merged 10 commits into from
Jun 13, 2019
Merged

Conversation

markdewing
Copy link
Contributor

Add an example of creating a new WaveFunctionComponent.
Add documentation to the manual.

Wavefunction is a simple: STO orbitals with Pade Jastrow.
Includes a unit test that compares the different evaluation functions for consistency.

Add an example of creating a new WaveFunctionComponent.
Add documentation to the manual.
@ye-luo ye-luo self-requested a review May 31, 2019 03:14
@prckent prckent self-requested a review June 4, 2019 19:32
Copy link
Contributor

@prckent prckent left a comment

Choose a reason for hiding this comment

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

Thanks Mark. I think it will be very helpful to have these steps documented and to have an example.

My requests are to do with improving the discoverability and making the example comprehensive:

  • At the beginning of the manual section, mention the He example (search optimization).
  • \subsection{Example} -> \subsection{Helium Wavefunction Example}
  • In the new manual section include the formula for the new wavefunction component that is added
  • In the He example source files mention that they exist to be an example of adding wavefunction components and that there is a section in the manual.
  • Perhaps add the formulae for what is being computed as comments to evaluate, evaluateDerivatives etc.?
  • Can you add a test of evaluateDerivatives to the unit test? A check of checkin/checkout would also be good practice.
  • Add a recommendation that, to add a new wavefunction component, people clone your example and then work on a passing unit test, function by function?

Copy link
Contributor

@PDoakORNL PDoakORNL left a comment

Choose a reason for hiding this comment

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

Since this is an example I think its doubly important to follow our coding conventions.
Also copyright dates.

src/QMCWaveFunctions/ExampleHeComponent.h Outdated Show resolved Hide resolved
src/QMCWaveFunctions/ExampleHeComponent.h Outdated Show resolved Hide resolved
src/QMCWaveFunctions/ExampleHeComponent.h Outdated Show resolved Hide resolved
Use a type alias with 'using' instead of a typedef.
Change type name to camel case.
The parameter derivatives are compared to a finite difference approximation.

The unit test needs access to the ExampleHeComponent class for some validation
of parameter values.  Without this, the test would only need to use the WaveFunctionComponent
base class.
The value is an index into an array.
Add recommendation on starting from the example code to add a new wavefunction component.
Adjust the h value so the single precision build passes the unit test.
@prckent
Copy link
Contributor

prckent commented Jun 13, 2019

@PDoakORNL Are you OK with these updates?

@PDoakORNL
Copy link
Contributor

test this please

@ye-luo ye-luo merged commit 08966eb into QMCPACK:develop Jun 13, 2019
@markdewing markdewing deleted the add_wf_example branch August 19, 2019 16:58
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.

4 participants