12.1. Quick Guide: RCIS/RCID/RCISD
This is a concise step-by-step guide to different CI calculations available in PyBEST. An example input file for the water molecule can be found in the section Examples.
12.1.1. Preliminaries
Before proceeding, it’s imperative to review the general introduction outlined in General Remarks concerning Post-Hartree-Fock Calculations. This part of the Documentation builds upon it. PyBEST allows you also to perform Restricted Configuration Interaction calculations on top of any single-reference wave function. Similar to the previous modules, we will assume the following names for all PyBEST objects
- lf:
A
LinalgFactory
instance (see Preliminaries).- occ_model:
An Aufbau occupation model of the
AufbauOccModel
class- kin:
The kinetic energy integrals
- ne:
The nucleus-electron attraction integrals
- eri:
The two-electron repulsion integrals
Currently, PyBEST supports the following variants of CI calculations
restricted Configuration Interaction Singles (RCIS)
restricted Configuration Interaction Doubles (RCID)
restricted Configuration Interaction Singles and Doubles (RCISD)
For all methods with an RHF reference function, PyBEST supports two calculation techniques that introduce the wave function as a Slater determinant (SD) or configuration state function (CSF). The CSF is the default.
12.1.2. RCI on top of RHF
We assume that you have performed a restricted Hartree-Fock calculation, whose
results are stored in the IOData
container hf_out
(see The Self-Consistent Field Module).
The code snippet below demonstrates how to perform default RCIS/RCID/RCISD calculations with
an RHF reference function in PyBEST,
rcis = RCIS(lf, occ_model)
rcis_out = rcis(kin, ne, eri, hf_out)
rcid = RCID(lf, occ_model)
rcid_out = rcid(kin, ne, eri, hf_out)
rcisd = RCISD(lf, occ_model)
rcisd_out = rcisd(kin, ne, eri, hf_out)
Note
By default, only one root is calculated. That is, for RCIS
only the lowest-lying excited state is determined, while for RCID
and RCISD
only the ground-state root is optimized.
See Summary of keyword arguments for more details.
The results are returned as an IOData
container
and can be found in the ./pybest-results
directory, where all data is stored in the checkpoint_CIS.h5
, checkpoint_CID.h5
, and
checkpoint_CISD.h5
files, respectively.
Specifically, the IOData
container contains
the following attributes
- e_corr:
The RCIS/RCID/RCISD correlation energy
- civ:
The eigenvectors of the RCIS/RCID/RCISD Hamiltonian
- e_ref:
The energy of the reference determinant (here, the Hartree-Fock determinant)
12.1.3. RCI on top of pCCD
If you use this module, please cite [nowak2023].
We assume that you have performed a restricted pCCD calculation, whose
results are stored in the IOData
container pccd_out
(see The pCCD module).
The code snippet below demonstrates how to perform default pCCD-CID/pCCD-CISD calculations with
a pCCD reference function in PyBEST,
rcid = RpCCDCID(lf, occ_model)
rcid_out = rcid(kin, ne, er, pccd_out)
rcisd = RpCCDCISD(lf, occ_model)
rcisd_out = rcisd(kin, ne, er, pccd_out)
Note
By default, only one root is calculated. That is, only the ground-state root is optimized. See Summary of keyword arguments for more details.
Note
By default, electron-pair excitations are excluded. Thus, all CID-type corrections do not consider electron-pair excitations in their ansatz.
The results are returned as an IOData
container
and can be found in the ./pybest-results
directory, where all data is stored in the checkpoint_pCCD-CID.h5
and checkpoint_pCCD-CISD.h5
files, respectively.
Specifically, the IOData
container contains
the following attributes
- e_ci:
The RCID/RCISD correlation energy
- civ:
The eigenvectors of the RCID/RCISD Hamiltonian
- e_ref:
The energy of the reference pCCD wave function