Closed-shell orbitals for open-shell CCSD(T)

Not sure whether this is a bug or my incompetence to find the “right” example in the manual. (Both 1.3.2 and 1.2.1 do the same thing on two very different machines.)

As an example consider scf-guess-read1 from the share/psi4/samples directory:

molecule h2o {
O
H 1 0.96
H 1 0.96 2 104.5
}
set basis cc-pVDZ
energy(‘scf’)

clean()

h2o.set_multiplicity(2)
h2o.set_molecular_charge(1)
set scf reference uhf
set scf guess read
energy(‘scf’) <== 2nd energy call

This works fine. However, if I replace the second energy call by ‘ccsd’ or ‘ccsd(t)’ I get fails with
munmap_chunk(): invalid pointer
forrtl: error (76): Abort trap signal

Now, the manual claims all energy methods support restarts, so this should work, right?

The alternative would be to explicitly write/keep a checkpoint file and read it again. According to the manual this is done by either

psi4_io.set_specific_path(PSIF_CHKPT, ‘./’)
psi4_io.set_specific_retention(PSIF_CHKPT, True)
or
psi4_io.set_specific_path(32, ‘./’)
psi4_io.set_specific_retention(32, True)

I suspect this is outdated, that is, it does not work.
The two files psi4 -m leaves are the .35 file and a .180.npy file.
Unfortunately, neither can be used in a
energy(‘ccsd(t)’, restart_file=’./…’)
call.

Cutting to the chase, an explicit example of how to use closed-shell orbitals in an open-shell ccsd or ccsd(t) calculation would be very much appreciated.

Maybe a feature request. The .fchk write works fine. What about a restart using the .fchk file?

Looks like those docs are quite out of date, can you provide a link so that we can edit them?

I think what you want is the following:

molecule h2o {
O
H 1 0.96
H 1 0.96 2 104.5
}
set basis cc-pVDZ
scf_e, scf_wfn = energy('scf', return_wfn=True)

set reference uhf
energy('ccsd', reference_wfn=scf_wfn)

No need for restarts or messing around with files.

Close, but unfortunately not quite what I want: Your input performs a ccsd for the close-shell neutral admittedly using a uhf wavefunction.

In your notation I would like:

molecule h2o {
O
H 1 0.96
H 1 0.96 2 104.5
}
set basis cc-pVDZ
scf_e, scf_wfn = energy(‘scf’, return_wfn=True)

h2o.set_multiplicity(2)
h2o.set_molecular_charge(1)
set scf reference uhf
energy(‘ccsd(t)’, reference_wfn=scf_wfn)

and this still has the same issues: seg fault, core dump.

OK, found my problem.

In one of the samples is

set scf reference uhf

while you use

set reference uhf

Your version works. The one from the sample does not.

Thanks a lot, this still needs
h2o.set_multiplicity(2)
h2o.set_molecular_charge(1)
but then it works.

I should think that some of the samples are outdated, too:
scf5 and scf-guess-read1 have
set scf reference uhf
this definitely does not work with ccsd(t) (segmentation fault), while it runs for energy(‘scf’). Using
set reference uhf
however, works also for energy(‘ccsd(t)’). Very subtle.

==================================================
Where I found my information:

There are plenty of “samples” that use “set guess read”, unfortunately in all cases the calculations using the closed-shell orbitals as a start are either scf or dft (no ccsd or ccsd(t)). Also, as mentioned above some may need updating.

The scf part of the manual http://www.psicode.org/psi4manual/1.2/scf.html discusses “guess read”, but it does not give an example input of how to do so explicitly.

The page http://www.psicode.org/psi4manual/1.2/external.html talks about using the checkpoint file (file 32 or PSIF_CHKPT)

Thanks for the information and we will see if we can patch up the docs.

set scf reference uhf sets the “local” SCF options to UHF and does not effect the CCSD code. This is subtle and we seem to slowly be deprecating the local options over time.