Mulliken population analysis
From cclib
Mulliken population analysis can be used to determine and interpret the electron density of a molecule. The contribution of the a-th atomic orbital to the i-th molecular orbital in this method is written in terms of the molecular orbital coefficients, c, and the overlap matrix, S:
The Mulliken class available from cclib.method performs Mulliken population analysis and can be used as follows:
from cclib.method import MPA
from cclib.parser import Gaussian
p=Gaussian("mycalc.out")
p.parse()
m=MPA(p)
m.calculate()
After the calculate() method is called, the following attributes are available:
- aoresults: a Numeric array[3] with spin, molecular orbital, and atomic/fragment orbitals as the axes (aoresults[0][45][0] gives the contribution of the 1st atomic/fragment orbital to the 46th alpha/restricted molecular orbital)
- fragresults: a Numeric array[3] with spin, molecular orbital, and atoms as the axes (atomresults[1][23][4] gives the contribution of the 5th atomic/fragment orbital to the 24th beta molecular orbital)
- fragcharges: a Numeric array[1] with the number of (partial) electrons in each atom (atomcharges[2] gives the number of electrons on the 3rd atom)
Custom fragments
The calculate function optionally accepts a list of lists containing atomic orbital numbers (e.g. [[0,1,2],[3,4,5,6],...]). Calling function this way is useful if one is more interested in the contributions of certain orbitals, such as metal d, to the molecular orbitals. In this case, fragresults and fragcharges reflect the groups of atomic orbitals instead of atoms.
Custom progress
The Mulliken class also can take a progress class as an argument so that the progress of the calculation can be monitored:
from cclib.method import Mulliken
from cclib.parser import Gaussian
from cclib.progress import TextProgress
import logging
progress=TextProgress()
p=Gaussian("mycalc.out",progress,logging.ERROR)
p.parse()
m=Mulliken(p,progress,logging.ERROR)
m.calculate()
