Extract nbnxm grid.h and pairlistwork.h