Retaining and reading specific scratch files

I am trying to retain specific scratch files - specifically the ones that contain various integrals (33, 35, 61).
I have tried this with both PSI_SCRATCH set to /tmp and ~/Desktop. Currently, I’m only running water so memory is not an issue.

Per the documentation, I modified input.dat to include:

memory 600mb
psi4_io.set_specific_retention(33, True)

molecule h2o {
O
H 1 0.96
H 1 0.96 2 104.5
}

set basis cc-pVDZ
energy(‘scf’)

I do see a corresponding file in /tmp or ~/Desktop which is named psi.<pid>.h2o.35. However, this file is not readable, and regardless of what scratch file (33/35/61/etc) I try to save, it saves in the same manner (.35).

So how can I save and read this scratch file?
Thank you for all your time and patience with answering all my questions!!

I agree that all the retention(psifilenum returning the same number is strange. But all those files are binary and so indeed are unreadable. If you’re wanting to get ahold of integrals and other goodies, what you want is a mintshelper instance. See if this (and the psi4numpy repo in general) helps.

1 Like