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

Build a wfn object from a qcengine results wavefunction dict #2884

Open
hadim opened this issue Feb 23, 2023 · 4 comments
Open

Build a wfn object from a qcengine results wavefunction dict #2884

hadim opened this issue Feb 23, 2023 · 4 comments

Comments

@hadim
Copy link

hadim commented Feb 23, 2023

I am trying to generate .cube files using the output of qcengine.compute():

results = qcengine.compute(...)

wfn_dict = results.wavefunction.dict()

The issue is that wfn_dict is incompatible with the psi4 wfn dict I could reload with psi4.core.Wavefunction.from_file(wfn_dict).

Then I could simply do:

psi4.cubeprop(wfn)

See also MolSSI/QCElemental#248

@JonathonMisiewicz
Copy link
Contributor

What exactly is the issue here? I'm not familiar with QCEngine, but as I understand it, your complaint is that qcengine.AtomicResult.wavefunction doesn't contain all the information that Psi4 needs for cubeprop. This sounds like something for the QCEngine developers to work on, not the Psi4 developers.

@hadim
Copy link
Author

hadim commented Feb 23, 2023

I am actually more looking for advice than complaining or reporting a bug here. It's indeed more of a qcengine thing, but I was wondering whether psi4 had a way to perform the conversion.

I spotted psi4.schema_wrapper.driver._convert_wavefunction() (

"Using `psi4.schema_wrapper.run_json` or `psi4.json_wrapper.run_json` instead of `psi4.schema_wrapper.run_qcschema` is deprecated, and as soon as 1.5 it will stop working\n",
) that can convert a psi4_wfn to a qcschema_wfn and I was wondering whether a function to perform the inverse operation exists somewhere (doing the qcschema_wfn to psi4_wfn conversion).

I totally understand this is not strictly a psi4 issue here so I'll close if you think it's irrelevant.

@loriab
Copy link
Member

loriab commented Feb 23, 2023

"Round-tripping" of wfn (psi4.core.Wavefunction -> AtomicResult.wavefunction -> psi4.core.Wavefunction) is a definite goal, but you concluded rightly that it does not work now. A needed step is simple round-tripping of BasisSet, and my last bout of working on that got to this stage: #2861 . I'd like to work on this again, but I don't know when.

It's fine to leave this open, in my opinion, since this is a question others may have.

@loriab
Copy link
Member

loriab commented Feb 24, 2023

Sorry, that #2861 link was an error. MolSSI/QCElemental#230 was what I meant.

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

No branches or pull requests

3 participants