Paul Crozier (CCd) has been working on an extension to the fix gcmc
command to allow for atom type swaps. He can comment on
this problem and its availability.
You can also define a variable that picks a random atom ID (using
the random() function for variables) and then use it with the set
command to change an atom’s type. If you did that in a loop, also running
N steps, you could do something like this.
Thanks for your response,
I found that the fix adapt command may be modified for my purpose.
However, I need make clear something before. I need your help further.
What I do is: every N timestep, I will scan all atoms via for loop. then a random number will be created, if the number is smaller than a given value, the type of the picked atom will be changed to the taget atom type.
So: I want to know
- Can the atom->type be used to choose the type[i] of i atom?
- if the type[i] was change to new type[i], can the new interaction be calculated automaticly in the next time step? because I do not changed the pair style, only changed the type of one atom.
- I want to know the mean of atom->nghost , atom->mask, atom->nlocal, groupbit
Thanks in advance.
------------------ Original ------------------
I doubt that fix adapt is what you want to use. I suggest that
you check with Paul (again CCd) to see if what he has already
implemented will do what you want. Or I suggest you try
the variable and loop construct I mentioned in my first email.
Of you can write your own new fix.
I’d recommend that you try our new fix atom/swap (soon to be released) to see if that meets your needs.