Skip to content
This repository has been archived by the owner on Jul 25, 2024. It is now read-only.

Save wavefunction array variables and scalar variables #36

Draft
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

max-radin
Copy link
Contributor

@max-radin max-radin commented Sep 24, 2021

This PR updates run_psi4 to also return the array and scalar variables generated by psi4, such as dipole moment. Also black formatting has been applied to _psi4_test.py.

@max-radin max-radin requested a review from a team September 24, 2021 15:34
Copy link
Contributor

@alexjuda alexjuda left a comment

Choose a reason for hiding this comment

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

Added suggestions. Is there there a reason why this PR has a draft status?

@@ -140,6 +140,12 @@ def run_psi4(
"n_frozen_valence": wavefunction.frzvpi().sum(),
}

results["scalar_variables"] = wavefunction.scalar_variables()
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason not to add this key together with others in the dict literal (lines 134-140)?

results["array_variables"] = {}
for variable_name, value in wavefunction.array_variables().items():
results["array_variables"][variable_name] = value.to_array().tolist()

Copy link
Contributor

Choose a reason for hiding this comment

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

Should the contents of the results dictionary be documented in this function's docstring?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants