nearest neighbor analysis

I want to get nearest neighbor analysis (for 6 nearest neighbors) for each atom in my simulation. Can you please help me write a code for it?
Kindly help me.
Regards
Karunya M
National Institute of technology.
Trichy.

No one is likely to help your write code. If the
computes in LAMMPS like CNA do not do
what you want, then you will need to write code
yourself to do what you need.

Steve