I am using Psi4 as a module. Is there a way to get the wavefunction parameters after a ground-state calculation? In particular, I would like the CC amplitudes, but I am also interested in the CI amplitudes and Hamiltonian matrix (for small systems).

Thanks in advance!

Simen.

For CC amplitudes, right now you can get a few of the largest T1 and T2 amplitudes printed in the output. Default is 10, but you can modify that by setting the `num_amps_print`

option. Ex.

```
set ccenergy{
num_amps_print 20
}
```

I am going to add an option soon so that one can print all the T1 and T2 amplitudes.

For 1 electron core hamiltonian (ao basis), you can do something like,

```
.....
Escf, scf_wfn = energy('SCF', molecule=h2o, return_wfn=True)
scf_wfn.H().print_out()
```

Also, if you use `set qc_module detci`

in your module while doing CI calculations, detci would give you the 20 most important determinants by default. Let me know if this answers your question.

Thanks!

I a sense it does answer the question. If you could print all the CC amplitudes to a file that is easily readable by a text parser in Python, so that I can reconstruct the cluster operator in my script, it would be great. The best is of course to be able to access the amplitudes using a Python call to Psi4 without going via a text file.

Context: in our research, we study CC theory from an abstract mathematical point of view, and we really need the cluster amplitudes post-calculation – all of them. For this research, the CI matrix would also be great, say CISD or FCI. (Often we need to compute quantities like <HF| T^\dag H T|HF>.)

Best,

Simen.

We are currently working on exposing the coupled cluster functionalities to the python side, but this might take a while. In the short term, I am going to add a function inside the CC modules to accomplish this. @robertodr has already added a similar function in his pull request which is pending right now. I will keep you informed. Maybe Dr. @sherrill can shed some light on printing the full CI matrix.

See here to get the CI matrix https://github.com/psi4/psi4numpy/blob/master/Configuration-Interaction/CI_DL.py

This goes a fairly deep, but you can grab blocks of the CI matrix through the “Hamiltonian” attribute on the ciwfn. Use -1 in the arg to grab the whole matrix.