@staticmethod
def _correct_ligsite(g, l):
    """
        a correction applied to the pocket grid created by LIGSITE during the Atomic Hotspot calculation
        grid points where ligsite has a score of 0 (i.e. a clash) and SuperStar has a favourable score, set the ligsite
        grid point to its maximum neighbour
        :param `ccdc.utilities.Grid` g: atomic hotspot grid
        :param `ccdc.utilities.Grid` l: pocket grid
        :return:
        """
    mask = (l < 1) & (g > 2)
    lc = l.copy()
    lc = lc.max_value_of_neighbours().max_value_of_neighbours()
    return l + (mask * lc).mean_value_of_neighbours() * mask
