The Defect Analysis Package (DefAP)

DefAP is a program developed to facilitate the exploration of a material’s defect chemistry. A large number of features are provided and rapid exploration is supported through the use of autoplotting with carefully considered automatic data labelling and simplification options enabling production of publication quality plots.


DefAP is a Python (Python 3.6.9 tested) code that runs in a command-line interface using Linux (tested on Ubuntu 18.04.5 LTS) or MacOS (tested on MacOS 10.13.4). The following modules are required:

  • numpy
  • scipy

A gnuplot installation is also required (tested with gnuplot v5.2) and, if using a Linux system and want to automatically view plots, a GV installation (tested with gv 3.7.4).


To operate DefAP, please consult the operating manual included in the software.


  • Mr. William Neilson
  • Dr. Samuel Murphy

For work produced using DefAP, please cite:

Point Defects and Non-stoichiometry in Li2TiO3. Samuel T. Murphy and Nicholas D. M. Hine, Chem. Mater. 2014, 26, 4, 1629–1638,

A new publication detailing the full methods of DefAP will be available soon.


Questions, remarks and contributions should be addressed to and [email protected]


View Github