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

Create radial Jastrow functors from symbolic expressions #1557

Merged
merged 20 commits into from Jun 26, 2019

Conversation

@markdewing
Copy link
Contributor

commented Apr 19, 2019

Generate code for a radial Jastrow functor from a symbolic expression.
The template is UserFunctor.h.in and the user_jastrow.py script fills it in.

The output of the script also includes sample XML input.

This commit removed a number of Jastrow forms.
df44e6b

The script is a way to easily recreate various forms without needing to store much code.

An existing UserFunctor.h is already present (corresponding to a simple Pade form) for compilation.

Create radial Jastrow functors easily
Code generate a radial Jastrow functor from a symbolic expression.
The template is UserFunctor.h.in and the user_jastrow.py script fills it in.

@ghost ghost assigned markdewing Apr 19, 2019

@ghost ghost added the in progress label Apr 19, 2019

@markdewing markdewing changed the title [WIP] Create radial Jastrow functors from symbolic expressions Create radial Jastrow functors from symbolic expressions Jun 18, 2019

@PDoakORNL
Copy link
Contributor

left a comment

So this is very cool, but where are unit tests?

@markdewing

This comment has been minimized.

Copy link
Contributor Author

commented Jun 19, 2019

I'm uncertain how to create a reliable unit test. The test will need to assign some values to the parameters. One option is require users to assign some reasonable values or specify ranges in the script.

markdewing added some commits Jun 20, 2019

Use Python's string Template mechanism
Replace custom templating with standard Python string Template.
Collect the script steps into one function
Make a single function for performing the jastrow derivations and codegen.
Rather than having these steps scattered through the file.
Add unit test for user jastrow
The unit test will need to be changed for different functional forms.
@markdewing

This comment has been minimized.

Copy link
Contributor Author

commented Jun 21, 2019

Updates include a unit test. It will require changes to test new functional forms, but at least the basic test is there - it should not be too hard to modify. In the future, the code generation step output some of the changes needed for the unit test.

@prckent

This comment has been minimized.

Copy link
Contributor

commented Jun 24, 2019

Test this please

@PDoakORNL

This comment has been minimized.

Copy link
Contributor

commented Jun 24, 2019

It is excellent to have a C++ unit test.
But I was also thinking about the python itself:
i.e. https://docs.python.org/2/library/unittest.html
Looking around the project we don't actually do any testing of python code itself.
So this is probably a discussion to have after this is merged.
But since this python code produces output that is pretty crucial this wouldn't be a bad place to start.

PDoakORNL and others added some commits Jun 24, 2019

@ye-luo ye-luo merged commit ad91499 into QMCPACK:develop Jun 26, 2019

3 checks passed

rhea-cpu
Details
rhea-cuda-experimental
Details
rhea-gpu
Details

@markdewing markdewing deleted the markdewing:user_jastrow1 branch Aug 19, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.