# Interface to programs through FCHK files — `fchk()`

Code author: Andrew C. Simmonett

Section author: Andrew C. Simmonett

Many post-processing tools can read information from Gaussian’s formatted checkpoint (FCHK) files. To allow interoperability with such tools, PSI4 includes a utility to generate FCHK files. Wavefunction information, such as orbitals, densities, orbital energies and basis set information is currently supported, but geometry optimization and vibrational frequency information are not supported at this time. To generate a FCHK file, simply store the wavefunction from the energy calculation, and use it to create an FCHK writer:

    1
    2
    3

    energy, wfn = energy('scf', return_wfn=True)
    fchk_writer = psi4.core.FCHKWriter(wfn)
    fchk_writer.write('output.fchk')

The file will be written to the name passed to the FCHK writer’s write() method. Note that for MP2 and CCSD methods, the energy can be computed without the expensive steps required to compute the density, so energy calls for these methods will return a wavefunction that has the Hartree–Fock density. If a density is required for these methods, the user should instead request a gradient computation, to ensure that the density is updated appropriately:

    1
    2
    3

    grad, wfn = gradient('mp2', return_wfn=True)
    fchk_writer = psi4.core.FCHKWriter(wfn)
    fchk_writer.write('output.fchk')

`psi4.``fchk`(wfn, filename)

  Function to write wavefunction information in wfn to filename in Gaussian FCHK format.

  New in version 0.6.

  Returns: | None

  Parameters:

  - filename (string) – destination file name for FCHK file
  - wfn (`Wavefunction`) – set of molecule, basis, orbitals from which to generate fchk file

  Notes

  - A description of the FCHK format is http://wild.life.nctu.edu.tw/~jsyu/compchem/g09/g09ur/f_formchk.htm
  - The allowed headers for methods are general and limited, i.e., “Total SCF|MP2|CI|CC Density”, so “CC” is always used for the post-HF case.

  Examples: |

      >>> # [1] FCHK file for DFT calculation
      >>> E, wfn = energy('b3lyp', return_wfn=True)
      >>> fchk(wfn, 'mycalc.fchk')