def METHOD_NAME(self):
    """Calculate Hirshfeld charges."""
    super().METHOD_NAME()
    # Generator object to iterate over the grid.
    ngridx, ngridy, ngridz = self.charge_density.data.shape
    indices = (
        (i, x, y, z)
        for i in range(self.data.natom)
        for x in range(ngridx)
        for y in range(ngridy)
        for z in range(ngridz)
    )
    grid_shape = (self.data.natom, ngridx, ngridy, ngridz)
    stockholder_w = numpy.zeros(grid_shape)
    self.closest_r_index = numpy.zeros(grid_shape, dtype=int)
    for atomi, xindex, yindex, zindex in indices:
        # Distance of the grid from atom grid.
        dist_r = self._cartesian_dist(
            self.data.atomcoords[-1][atomi],
            self.charge_density.coordinates([xindex, yindex, zindex]),
        )
        self.closest_r_index[atomi][xindex][yindex][zindex] = numpy.abs(
            self.radial_grid_r[atomi] - dist_r
        ).argmin()
        # stockholder_w is radial proatom density projected on Cartesian grid
        stockholder_w[atomi][xindex][yindex][zindex] = self.proatom_density[atomi][
            self.closest_r_index[atomi][xindex][yindex][zindex]
        ]
    # Equation 3 in doi:10.1007/BF01113058
    # stockholder_bigW represents the denominator in this equation
    # \sum{eta_chi(r_chi)}_chi
    # where eta is proatom density, chi is index of atoms in the molecule, and r_chi is
    # radial distance from center of atom chi.
    stockholder_bigW = numpy.sum(stockholder_w, axis=0)
    self.fragcharges = numpy.zeros((self.data.natom))
    self.logger.info("Creating fragcharges: array[1]")
    for atomi in range(self.data.natom):
        # Equation 1 in doi:10.1007/BF01113058
        # The weights supplied for integrate function correspond to W_A in the equation.
        # Q_A = Z_A - \integral(W_A(r) * q_A(r) dr)
        # where Q_A is Hirshfeld charges, W_A is weights determined on each grid and on each
        # atom, and q_A is total charge densities on the Cartesian grid.
        self.fragcharges[atomi] = self.data.atomnos[atomi] - self.charge_density.integrate(
            weights=(stockholder_w[atomi] / stockholder_bigW)
        )
    return True