Optimized generation of neighbor list and thread_atom_nl kernel