find a particle in a specific point


I have a polymer and it is passing through a nanopore.I have a periodic condition so the polymer is passing through the pore again and again. I want to find out which bead of polymer(polymer has 2 ends imagine one of them has id =1 and another id=10) enters in the pore first(every time which the polymer is attempting to get through the pore) In other words I want to have statistical data of this process. I expect that atom id=1 and id=10 have more chance to enter the pore.

Can you get me an idea to count these events?