Cannot retain scratch file

I read Scratch Files and Elementary Restart section of docs.
I tried to test just same as thorium wrote. i.e.


memory 600 mb
psi4_io.set_specific_retention(33, True)

molecule h2o {
  H 1 0.96
  H 1 0.96 2 104.5

set basis cc-pVDZ

I installed Psi4 binary with miniconda to Xubuntu Focal desktop.
under /home/scratch,

~/scratch$ conda activate p4env
(p4env)~/scratch$ psi4 input.dat -m

psi4 terminated with no errors, however, no scratch files found, under /home/scratch nor under /tmp.
Only psi.xxxx.h2o.35 is given under /tmp when adding messy (-m) option.
I think, I skipped some necessary procedures.
What are those?

I can look into this, but it’ll take some time.

If I can ask, why are you trying to retain this file?

Hello @jmisiewicz

I calculate clusters of heavy elements. Preventing lost data by unexpected power failure or some kinds of that, I want goes with few iteration step by step.
The example above is what I found in the forum. Just a test.
Thus the intermediate file that I really want to is PSIF_CHKPT, file number 32.
Setting MAXITER small (say 10 or 20) and retain PSIF_CHKPT, checking convergence, I want restart calculate. This is my plan.


PSIF_CHKPT was removed some time ago, so I’ve updated the documentation to reflect that it is gone.

I can’t find any functionality in Psi4 to save the orbitals from previous SCF steps. You may want to make an issue on our GitHub page about this.

No, whether PSIF_CHKPT was removed or not, No PSIOH files created in my environment.
I install latest psi4 in new conda environment.
$ psi4 --version
“psi4 --test” passed
tried to retain PSIF_INTCO and PSIF_SO_TEI.
Nothing appear anywhere.
What did I miss?

At the very least, set keep_intcos true is supposed to work, but it is not…

There’s a bug involved here, but it’ll take some time for me to investigate.

To make sure this is clear, even if you can retain PSIF_SO_TEI, it’s not going to help you restart an HF computation.

I understand.
So far, it is out of scope what I want to do.
However, I raise this thread titled “cannot retain scratch file.”
Thus I should go to make this point clear.
Thank you for your efforts :wink:

The reason why your input doesn’t work for the PSIF_SO_TEI file is simple enough: Psi never actually creates it for the computation you requested.

As for file 12, that was an unfortunate choice of example on my part. The geometry optimizer circumvents the usual file management system for that particular file.

Would you post a input example file which successfully retain any of a PSIOH intermediate file:
Tiny, simple, clear input file: any of basic Hartree-Fock static calculation or quantum mechanics / molecular mechanics dynamic calculation or whatever.
Now, I think that “psi4_io.set_specific_path” and “psi4_io.set_specific_retention” do not work correctly.
As I referred,
@loriab replied:

I agree that all the retention(psifilenum returning the same number is strange.

File number 35 is always created when psi4 is executed with messy option (-m), even if “set_specific_retention” is not include in input file. Thus, in this case, it is not “strange” behaviour but file retention failure.

set_specific_retention has not been documented well, so you (and I) have been confused about what it is supposed to do.

There are two ways a PSIOH file can get removed. One is by psiclean, which removes all active files. One is by somebody calling close_file and marking the file as one that should be removed when they do so. If set_specific_retention is set, it will save the file from the first kind of removal, but not from the second kind of removal.

Most files are removed in the second way, so they’re gone, and set_specific_retention won’t help. If this answers the question, I can edit the documentation accordingly.

No, it does not answer to my question.
I have never talked about removal of PSIOH files.
I want to know the correct way or the correct example to keep, to create, to retain PSIOH files.

Now, it is totally out of my interest, since I got to know that I cannot use PSIF_CHKPT.
I continue this thread to keep consistently straightforward to resolve “Cannot retain scratch file.”
but I want to suspend this discussion.

Nobody join to this thread, so maybe there is no problem.

thanks a lots