I was running two simple calculations of He and H2 and got two wave functions (wfn & wfn1). After that, I used wfn.form_H() and wfn1.form_H(). But this will change the wfn1.H().np which does make sense to me. Is there any thing I accidentally ignored? Thank you.
mol1 = psi4.geometry("""
mol2 = psi4.geometry("""
H 1 0.7
And if you switch the order of mol1 and mol2 in the psi4.core.Wavefunction.build, it will give an error.
PSIO_ERROR: Attempt to write into next entry: 35, SO-basis Overlap Ints
PSIO_ERROR: unit = 35, errval = 18
PSIO_ERROR: 18 (Incorrect block end address)
Fatal Error: PSIO Error
Error occurred in file: /scratch/psilocaluser/conda-builds/psi4-multiout_1551855686116/work/psi4/src/psi4/libpsio/error.cc on line: 128
The most recent 5 function calls were:
psi::PSIO::write(unsigned long, char const*, char*, unsigned long, psi::psio_address, psi::psio_address*)
psi::PSIO::write_entry(unsigned long, char const*, char*, unsigned long)
The wfns shared the same namespace for some intermediates, e.g. overlap integrals, and one needs to run psi4.core.clean() to remove those. This causes the IO error you see. I assume since the overlap is lying around your command to form a new core Matrix reads the wrong overlap.
I am far from being an expert, but I assume you will need to do the form_H() calculations separately. Or change the namespace of at least the .35 file.