Abstract
Algorithms are presented for performing topological analysis of functions defined on grids of points. By connecting these points according to a Delaunay triangulation, a neighbourhood graph is constructed that allows the topological analysis to be recast as a problem in graph theory. This allows for the treatment of arbitrary grids, including those employed in standard density functional theory (DFT) calculations. The flexibility of the approach is demonstrated for various applications involving analysis of the charge and magnetically induced current densities in molecules, where features of the neighbourhood graph are found to correspond to chemically relevant topographical properties, such as Bader charges. These properties converge using an order of magnitude fewer grid points than previous approaches, whilst exhibiting an appealing $O(N\log(N))$ scaling of the computational cost. The issue of grid bias is discussed in the context of graph based algorithms and strategies for avoiding this bias are presented.