Thanks Antonia.
Let me try to explain my problem once more.
The code I am working on creates 2 types of particles (say type 1 and 2). There exists a Lennard-jones pair potential between different particle types but not among same particle type (there exists pure repulsion forces among same particle types.). The bonds that are created due to this pair potential between them are dynamic in nature.
What i want is to provide these particles with a way to limit the number of dynamic bonds to a set value, so that one particle of a type(type1) can only interact with a limited number of particles of the other particle type(type2).
I believe one way to do this is to add a counter to each particle or using lists (i don't know for sure as i have no background of programming).
can you please suggest a way to do this?
thank you.