How to find the global ID of an atom after putting it through a local loop

Hello LAMMPS users,

I am using the LAMMPS version 12Dec2018. I am randomly choosing an atom (say atom ID: 200) out of a certain number of atoms (say 1000), and then finding all its neighbouring atoms up to the nearest-neighbour distance (let’s say the nearest-neighbour atom count is 8). Then I am putting all these nearest-neighbour atoms in a loop (1 to 8 atoms), and when a certain condition is met, one of the nearest-neighbour atoms (say atom number 6) is chosen, but its global atom ID is something different (say 100). But when I use “variable A equal id[v_atom]”, I am not getting 100, but I am getting 6. How do I get the global atom ID after getting an atom from a local loop? Thank you.

Regards,
Rajesh

Hi.
I also do KMC to calculate the diffusion coefficient. Have you solved your problem now? Would you mind communicating with me?

You are trying to use the LAMMPS input script language as a full fledged programming language, but it has not been designed for your kind of application. Rather you need to implement it in C++ like the rest of LAMMPS. Even using the Python interface may be a stretch since you need direct access to internal data structures.

Hello, I haven’t solved my problem yet, but yeah, we can communicate.

Hi,
I haven’t replied to you yet! I’m so sorry!I also want to use kinetic Monte Carlo to calculate the self-diffusivity of NiCrCo, which I see you have been solving with the IN file of LAMMPS. I wonder if I can communicate with you about KMC.
Xue baoshuai

Hello,

Yes, we can communicate. Here’s my EMail: [email protected]