.. _ipot:

********************
Ionisation Potential
********************

.. note:: Ths scripts for this step in the tutorial can be found in ``mgo_surface/7_mgo_ip``.

This tutorial will run through how to calculate the ionisation potential 
of a system. As with the previous theme, this tutorial will be delivered 
by using an MgO cluster as the example.

First, the energy of the non-ionised MgO system is calculated. This is 
the same as the earlier single point calculation of MgO, except 
run at the optimised cluster geometry:

.. literalinclude:: ../../samples/mgo_surface/7_mgo_ip/mgo_ip.py
    :lines: 13-46

Next, we increase the charge by 1, representing the removal of an electron
from MgO. This also changes the environment to an open shell system, 
with a multiplicity change from a singlet (1) to a doublet (2).

.. literalinclude:: ../../samples/mgo_surface/7_mgo_ip/mgo_ip.py
    :lines: 52-68

The ionisation potential of MgO is calculated using the equation below:

.. math:: E_{IP} = E_{[MgO_{surf}]^{+}} - E_{[MgO_{surf}]^0} + E_{corr}

.. note:: The calculation should result in :math:`E_{IP}= 6.35` eV.

A more accurate calculation can be obtained if the Jost correction is 
applied to the script. The Jost correction is applied when dealing with 
charged species in QM/MM calculations, as the relaxed region has a finite 
space. The Jost correction uses the following equation:

.. math:: E_{corr} = -\frac{{{Q}^{2}(\varepsilon - 1))}}{2R(\varepsilon + 1)}

Where:

        * Q = total charge of the electrons in the defect, units e.
        * \varepsilon = dielectric constant of MgO, no units.
        * R = radius of the relaxed region (\ :math:`a_(0)`\), units a.u. bohr

.. note:: The corrected value should be :math:`E_{IP}= 5.88` eV.
