Factory method for make (fanci) script #9
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What changed
Created a factory method for wfn_type in make_script and make_fanci_script. Added option for custom wave function type.
Why
Previously one had to edit the output of make_script if the wave function was not in make_script.
How
make_script gets a method for a given wfn_type from get_wfn_info. These wfn_type dependent methods return the import_line, wfn_name, and wfn_kwargs, which make_scripts uses later. The custom wave function method looks for wfn_name and import_from in wfn_kwargs. For example, wfn_kwarg for the CISD wave function would be
wfn_kwargs = "wfn_name = CISD, import_from = fanpy.wfn.ci.cisd"
Testing