Psi4 has a very nice function to write the wfn to a molden file by “molden(wfn, filename)”. I am wondering whether the reverse can be done (i.e., reading a molden file as a wfn)? Practically speaking, I would assume so since the molden file contains all the necessary information to build a wfn.
I found that one can construct a wfn with a molecule and basis set by doing:
The molden format isn’t well defined (or at least not implemented 100% the same way in various programs). If you know the Multiwfn code, the author had to do all sorts of tricks to account for how programs write molden files. Thus I see little hope of anyone wanting to program an interface for the backtransformation.
Hi @hokru, thanks for your speedy response! I am aware of the problem of molden format issues. But what I want to know is, if I have the MO coefficients, how can I set it to the wfn object? For example, something like
wfn_loaded.Ca().nph[:] = my_MO_coeff
I tried the above but it did not work. I also tried to search for the source code of the psi4.core.Wavefunction but it seems that part of the code is not open-sourced?