# fci

CIPSI algorithm in the full configuration interaction space.

## The user point of view

- `fci()` performs CIPSI calculations using a stochastic scheme for both the selection and the PT2 contribution,
- `pt2()` computes the PT2 contribution using the wave function stored in the EZFIO database.

The main keywords/options for this module are:

- `determinants n_det_max` : maximum number of Slater determinants in the CIPSI wave function. The fci program will stop when the size of the CIPSI wave function will exceed `determinants n_det_max`.
- `perturbation pt2_max` : absolute value of the PT2 to stop the CIPSI calculation. Once the PT2 \(<\) `perturbation pt2_max`, the CIPSI calculation stops.
- `determinants n_states` : number of states to consider in the CIPSI calculation.
- `determinants read_wf` : if False, starts with a ROHF-like determinant, if True, starts with the current wave function(s) stored in the EZFIO folder.

Note

For a multi-state calculation, it is recommended to start with `cis()` or `cisd()` wave functions as a guess.

- `determinants s2_eig` : if True, systematically add all the determinants needed to have a pure value of \(S^2\). Also, if True, it tracks only the states having the good `determinants expected_s2`.

Note

For a multi-state calculation, it is recommended to start with `cis()` or `cisd()` wave functions as a guess.

- `determinants expected_s2` : expected value of \(S^2\) for the desired spin multiplicity.

## The programmer point of view

This module have been created with the cipsi module.

See also

The documentation of the cipsi module.

## EZFIO parameters

`energy```

  Calculated Selected FCI energy

`energy_pt2```

  Calculated FCI energy + PT2

## Programs

> - fci
> - pt2

## Providers

`do_ddci`

  File : `fci/class.irp.f`

      logical :: do_only_1h1p
      logical :: do_ddci

  In the FCI case, all those are always false

`do_only_1h1p`

  File : `fci/class.irp.f`

      logical :: do_only_1h1p
      logical :: do_ddci

  In the FCI case, all those are always false

## Subroutines / functions

`save_energy:`()

  File : `fci/save_energy.irp.f`

      subroutine save_energy(E,pt2)

  Saves the energy in EZFIO.

  Needs:

  `n_states` |  |

  Called by:

  `run_cipsi()` | `run_stochastic_cipsi()` |

  Calls:

  `ezfio_set_fci_energy()` | `ezfio_set_fci_energy_pt2()` |