4.2.58. WFA


This program requires a submodule.

The WFA program of the Molcas program system provides various visual and quantitative wavefunction analysis methods. It is based on the libwfa [223, 224] wavefunction analysis library. The interface to Molcas is described in Ref. [225].

The program computes natural transition orbitals (NTO) [226, 227], which provide a compact description of one-electron excited states. Natural difference orbitals (NDO) [227] can be computed to visualize many-body effects and orbital relaxation effects [228]. A module for the statistical analysis of exciton wavefunctions is included [229, 230], which provides various quantitative descriptors to describe the excited states. Output is printed for the 1-electron transition density matrix (1TDM) and for the 1-electron difference density matrix (1DDM). A decomposition into local and charge transfer contributions on different chromophores is possible through the charge transfer number analysis [231], which has been integrated into Molcas recently. Postprocessing is possible through the external TheoDORE [232] program.

WFA supports full use of spatial symmetry and can analyse transitions between different spin multiplicities and particle numbers. Installation

The WFA module is currently not installed by default. Its installation occurs via CMake. It requires a working HDF5 installation (including C++ bindings) and access to the include files of the Armadillo C++ linear algebra library. In the current settings, external BLAS/LAPACK libraries have to be used. Use, e.g., the following commands for installation:

FC=ifort cmake -D LINALG=MKL -D WFA=ON -D ARMADILLO_INC=../armadillo-7.300.0/include ..

To obtain the required libraries, you can use on Ubuntu:

sudo apt install libhdf5-dev libhdf5-cpp-103

Alternatively, you can link against the dynamic HDF5 libraries distributed along with Anaconda. Dependencies

The WFA program requires HDF5 files, which are written by either SCF, RASSCF, or RASSI. In the case of RASSI, the TRD1 keyword has to be activated. Files Input files


All information that the WFA program needs is contained in this HDF5 file. The name can be adjusted with the H5FIle option. Output files


The orbital coefficients of NOs, NTOs, and NDOs are written to the same HDF5 file that is also used for input.


These are input files for the external TheoDORE program.


Input file for TheoDORE.

For a seamless interface to TheoDORE, you can also create the tden_summ.txt file via

grep '^|' molcas.log > tden_summ.txt

The NOs, NTOs, and NDOs on the HDF5 file can be accessed via Pegamoid. Alternatively, the orbitals can be converted to Molden format via the Molpy program. Call, e.g.:

penny molcas.rassi.h5 --wfaorbs molden Input

The input for the WFA module is preceded by:

&WFA Keywords

Basic Keywords:


Specifies the name of the HDF5 file used for reading and writing (e.g. $Project.scf.h5, $Project.rasscf.h5, $Project.rassi.h5). You either have to use this option or rename the file of interest to WFAH5.


Select how much output is produced (0-4, default: 3).


Specifies what properties are computed in a TheoDORE-style fragment-based analysis (0-3, default: 1). This requires defining fragments via ATLIsts.

0 — none

1 — Basic: POS, PR, DEL, CT, CTnt

2 — Extended: POS, POSi, POSf, PR, PRi, PRf, DEL, COH, CT, CTnt

3 — For transition metal complexes: POSi, POSf, PR, CT, MC, LC, MLCT, LMCT, LLCT

The definition of the descriptors is provided here. For a more fine-grained input use PROPlist.


Define the fragments in a TheoDORE-style analysis. Note: If symmetry is turned on, then Molcas may reorder the atoms. In this case it is essential to take the order Molcas produced (seen for example in the Molden files).

The first entry is the number of fragments. Then enter the atomic indices of the fragment followed by a *. Example:

1 2 4 *
3 *

Note: This input can be generated automatically via TheoDORE by suppling a file with coordinates coord.mol and running

theodore theoinp -a coord.mol

Index of the reference state for 1TDM and 1DDM analysis (default: 1).

Advanced keywords for fine grain output options and debug information:


Activate Mulliken population analysis (also for CT numbers).


Activate Löwdin population analysis (also for CT numbers).


Activate NO, NTO, and NDO analysis.


Activate exciton and multipole analysis.


Activate charge transfer number analysis and creation of *.om files.


Print the NOs, NTOs, and/or NDOs to the HDF file.


Manual input of properties to be printed out in a TheoDORE-style fragment based analysis. Use only if CTNUMMODE does not provide what you want.

Enter as a list followed by a *, e.g.


The full list of descriptors is provided here.


Print debug information.


Add info for verification runs with pymolcas verify. Input example

* Analysis of SCF job

H5file = $Project.scf.h5
* Analysis of RASSCF job
* Reduced output

H5file = $Project.rasscf.h5
wfalevel = 1
* Analysis of RASSI job, use the TRD1 keyword

H5file = $Project.rassi.h5
1 2 4 *
3 * Output State/difference density matrix analysis (SCF/RASSCF/RASSI)

RASSCF analysis for state 2 (3) A


RASSI analysis for state R_2




Number of unpaired electrons \(n_u=\sum_i\min(n_i, 2-n_i)\) [227, 233]


Number of unpaired electrons \(n_{u,nl}=\sum_i n_i^2(2-n_i)^2\)


NO participation ratio \(\text{PR}_{\text{NO}}\)

p_D and p_A

Promotion number \(p_D\) and \(p_A\)

PR_D and PR_A

D/A participation ratio \(\text{PR}_D\) and \(\text{PR}_A\)

<r_h> [Ang]

Mean position of detachment density \(\vec{d}_D\) [230]

<r_e> [Ang]

Mean position of attachment density \(\vec{d}_A\)

|<r_e - r_h>| [Ang]

Linear D/A distance \(\vec{d}_{D\rightarrow A} = \vec{d}_A - \vec{d}_D\)

Hole size [Ang]

RMS size of detachment density \(\sigma_D\)

Electron size [Ang]

RMS size of attachment density \(\sigma_A\) Transition density matrix analysis (RASSI)

RASSI analysis for transiton from state 1 to 2 (Tr_1-2)

Output listing


Leading SVs

Largest NTO occupation numbers

Sum of SVs (Omega)

\(\Omega\), Sum of NTO occupation numbers


NTO participation ratio \(\text{PR}_{\text{NTO}}\) [231]

Entanglement entropy (S_HE)

\(S_{H|E}=-\sum_i\lambda_i\log_2\lambda_i\) [234]

Nr of entangled states (Z_HE)


Renormalized S_HE/Z_HE

Replace \(\lambda_i\rightarrow \lambda_i/\Omega\)


Norm of the 1TDM \(\Omega\), single-exc. character

QTa / QT2

Sum over absolute (\(Q^t_a\)) or squared (\(Q^t_2\)) transition charges


Local contributions: Trace of the \(\Omega\) matrix with respect to basis functions (LOC) or squareroots of the values (LOCa)


Exp. value of the particle-hole permutation operator, measuring de-excitations [235]

<r_h> [Ang]

Mean position of hole \(\langle\vec{x}_h\rangle_{\text{exc}}\) [230]

<r_e> [Ang]

Mean position of electron \(\langle\vec{x}_e\rangle_{\text{exc}}\)

|<r_e - r_h>| [Ang]

Linear e/h distance \(\vec{d}_{h\rightarrow e} = \langle\vec{x}_e - \vec{x}_h\rangle_{\text{exc}}\)

Hole size [Ang]

RMS hole size: \(\sigma_h = (\langle\vec{x}_h^2\rangle_{\text{exc}} - \langle\vec{x}_h\rangle_{\text{exc}}^2)^{1/2}\)

Electron size [Ang]

RMS electron size: \(\sigma_e = (\langle\vec{x}_e^2\rangle_{\text{exc}} - \langle\vec{x}_e\rangle_{\text{exc}}^2)^{1/2}\)

RMS electron-hole separation [Ang]

\(d_{\text{exc}} = (\langle \left|\vec{x}_e - \vec{x}_h\right|^2\rangle_{\text{exc}})^{1/2}\) [229]

Covariance(r_h, r_e) [Ang^2]

\(\text{COV}\left(\vec{x}_h,\vec{x}_e\right) = \langle\vec{x}_h\cdot\vec{x}_e\rangle_{\text{exc}} - \langle\vec{x}_h\rangle_{\text{exc}}\cdot\langle\vec{x}_e\rangle_{\text{exc}}\)

Correlation coefficient

\(R_{eh} = \text{COV}\left(\vec{x}_h,\vec{x}_e\right)/\sigma_h\cdot\sigma_e\) [230]

Center-of-mass size

\((\langle \left|\vec{x}_e + \vec{x}_h\right|^2\rangle_{\text{exc}}-\langle \vec{x}_e + \vec{x}_h\rangle_{\text{exc}}^2)^{1/2}\)