Warning message when writing a Molden file + Molden file from MPx calculations

Dear Psi4 Developers,

When creating a Molden file as suggested in the manual (Interface to Molden — molden()) I get the following warning message:

Constructing a MoldenWriter and then calling write instead of using wfn.write_molden(name)
is both buggy and deprecated, and as soon as 1.5 it will stop working.

I am using Psi4 1.9.1 release, my input file is shown below, and my output is attached

memory 110 GB

molecule C {
0 3
C 0. 0. 0.
}

set {
basis ugbs
reference rohf
maxiter 200
ints_tolerance 1.e-12
scf_type pk
guess SAD
#damping_convergence 1.e-6
#diis false
#molden_with_virtual false
relativistic x2c
#dkh_order 3
#onepdm true
}

E, wfn = properties(‘ccsd’, return_wfn=True)
Da_so = wfn.Da()
Db_so = wfn.Db()
SCa = core.doublet(wfn.S(), wfn.Ca(), False, False)
SCb = core.doublet(wfn.S(), wfn.Cb(), False, False)
Da_mo = core.triplet(SCa, Da_so, SCa, True, False, False)
Db_mo = core.triplet(SCb, Db_so, SCb, True, False, False)

molden(wfn, ‘C_0.molden’, density_a=Da_mo, density_b=Db_mo)

  1. What would be the correct syntax for the “wfn.write_molden(name)” command to include the densities of alpha and beta electons? I found a call in the source code ( psi4.driver.driver ) but do not quite understand how to force writing the two densities.

  2. What would be correct set of instructions to write out Molden file from an MP perturbation theory calculation (i.e., mp2, mp3, mp4(sdq), mp4, omp2, omp2.5, omp3) ? Since natural orbitals of the 1-particle desnsity matrix are required, would instructions be the same as those for CCSD?

Many thanks in advance for your help!

Best Regards,
Anatoliy

C_0.out.txt (30.1 KB)