Which variable command stores numeric values and changes values after every loop

Hello Everyone
I am doing polymer translocation inside a nanopore , so I have to check in a loop, if all the polymer beads are inside or outside the nanopore using the z_coordinate so if the condition being outside the nanopore satisfies for all monomers after sufficient runs then the loop will be stopped and runs too but variable command only input string not numeric values, how can I make them numeric values so as to check the condition?

Why? Why not use compute reduce/region?

Your question is far to vague and abstract to provide any specific advice. It would be much easier, if you would provide some prototype input where you outline what you intend to do.

But as indicated in my note above, it seems to me that your strategy for a solution may be misguided in the first place.