atom_hit_cache is a set of atom serial numbers which have already been tested. We keep track of these to avoid recalculating the distance.

def find_heavy_atoms_near_atom(self, source_atom, search_radius, atom_hit_cache = set(), restrict_to_CA = False):
        '''atom_hit_cache is a set of atom serial numbers which have already been tested. We keep track of these to avoid recalculating the distance.
        '''
        #todo: Benchmark atom_hit_cache to see if it actually speeds up the search

        non_heavy_atoms = self.get_atom_names_by_group(set(['H', 'D', 'T']))
        return self.find_atoms_near_atom(source_atom, search_radius, atom_names_to_exclude = non_heavy_atoms, atom_hit_cache = atom_hit_cache, restrict_to_CA = restrict_to_CA)