---
name: "sc_PsiWavefunction"
section: "3"
platform: "linux"
package: "libsc-doc"
version: "2.3.1-22"
release: "Debian 12 (Bookworm)"
platforms: ["linux"]
url: "https://new.carta.tech/sc_PsiWavefunction"
---

# sc\_PsiWavefunction(3)

PsiWavefunction is an abstract base for all Psi wave functions.

## NAME

sc::PsiWavefunction - **PsiWavefunction** is an abstract base for all Psi wave functions.

## SYNOPSIS

`#include <psiwfn.h>`

Inherits **sc::Wavefunction**.

Inherited by **sc::PsiCCSD**, **sc::PsiCCSD\_T**, and **sc::PsiSCF**.

### Public Member Functions

**PsiWavefunction** (const **Ref**\< **KeyVal** \> &)\
 The **KeyVal** constructor.  **PsiWavefunction** (**StateIn** &)\
 void **save\_data\_state** (**StateOut** &)\
 Save the base classes (with save\_data\_state) and the members in the same order that the **StateIn** CTOR initializes them.  virtual void **write\_basic\_input** (int conv)\
 Writes out Psi input file entries specific to this **PsiWavefunction**.  void **compute** ()\
 Recompute at least the results that have compute true and are not already computed.  void **print** (std::ostream &o=**ExEnv::out0**()) const\
 Print information about the object.  **RefSymmSCMatrix** **density** ()\
 Returns the **SO** density.  int **nelectron** ()\
 Returns the number of electrons.  **Ref**\< **PsiExEnv** \> **get\_psi\_exenv** () const\
 Return an associated **PsiExEnv** object.  **Ref**\< **PsiInput** \> **get\_psi\_input** () const\
 Return an associated **PsiInput** object.

### Protected Member Functions

virtual void **write\_input** (int conv)=0\
 Prepares a complete Psi input file. The input file is assumed to have been opened.

### Protected Attributes

int **nirrep\_**\
 int \* **docc\_**\
 int \* **socc\_**\
 int \* **frozen\_docc\_**\
 int \* **frozen\_uocc\_**\
 int **multp\_**\
 int **charge\_**\
 char \* **memory\_**\

### Additional Inherited Members

## Detailed Description

**PsiWavefunction** is an abstract base for all Psi wave functions.

Its **KeyVal** constructor is invoked by all **KeyVal** constructors of concrete implementations of **PsiWavefunction**.

## Constructor & Destructor Documentation

### sc::PsiWavefunction::PsiWavefunction (const Ref\< KeyVal \> &)

The **KeyVal** constructor.

- `psienv`

  Specifies a **PsiExEnv** object. There is no default.

- `memory`

  This integer specifies the amount of memory (in bytes) for Psi to use. The default is 2000000.

- `debug`

  This integer can be used to produce output for debugging. The default is 0.

## Member Function Documentation

### void sc::PsiWavefunction::compute ()` [virtual]`

Recompute at least the results that have compute true and are not already computed. This should only be called by **Result**'s members.

Implements **sc::Compute**.

### RefSymmSCMatrix sc::PsiWavefunction::density ()` [virtual]`

Returns the **SO** density.

Implements **sc::Wavefunction**.

### int sc::PsiWavefunction::nelectron ()` [virtual]`

Returns the number of electrons.

Implements **sc::Wavefunction**.

### void sc::PsiWavefunction::print (std::ostream & = ExEnv::out0`()`) const` [virtual]`

Print information about the object.

Reimplemented from **sc::MolecularEnergy**.

### void sc::PsiWavefunction::save\_data\_state (StateOut &)` [virtual]`

Save the base classes (with save\_data\_state) and the members in the same order that the **StateIn** CTOR initializes them. This must be implemented by the derived class if the class has data.

Reimplemented from **sc::MolecularEnergy**.

Reimplemented in **sc::PsiSCF**, **sc::PsiCCSD**, and **sc::PsiCCSD\_T**.

### virtual void sc::PsiWavefunction::write\_basic\_input (int conv)` [virtual]`

Writes out Psi input file entries specific to this **PsiWavefunction**. The input file is assumed to have been opened.

Reimplemented in **sc::PsiCLHF**, **sc::PsiHSOSHF**, and **sc::PsiUHF**.

### virtual void sc::PsiWavefunction::write\_input (int conv)` [protected]`, ` [pure virtual]`

Prepares a complete Psi input file. The input file is assumed to have been opened.

Implemented in **sc::PsiCLHF**, **sc::PsiHSOSHF**, **sc::PsiUHF**, **sc::PsiCCSD**, and **sc::PsiCCSD\_T**.

## Author

Generated automatically by Doxygen for MPQC from the source code.
