Density

The Density class from cclib.method can be used to calculate the density matrix:

from cclib.parser import Gaussian from cclib.method import Density

parser=Gaussian("myfile.out") parser.parse

d=Density(parser) d.calculate

After calculate is called, the density attribute is available. It is simply a Numeric array with two axes, and follows the standard definition of the density matrix.