Hi,
I am working on electron irradiation of a single-walled carbon nanotube.
At the moment, I’m stumped by randomly selecting atoms within the area to be irradiated. I can randomly select an atom within the tube but not within the target area. Using the following code:
variable randomno index 0.32 0.26 0.36 0.45 0.04 0.15 #from random decimal generator
next randomno
variable randomID equal "TotalNumberofAtoms*randomno’
group randomatom id $randomID
My supervisor suggested reassigning global atoms IDs to local atom IDs but I don’t know how to do this!
Any ideas/suggestions?
Cheers,
KATE McDONELL | PhD Candidate
School of Civil Engineering | Faculty of Engineering and IT
THE UNIVERSITY OF SYDNEY
hi kate,
Hi,
I am working on electron irradiation of a single-walled carbon nanotube.
At the moment, I'm stumped by randomly selecting atoms within the area to be
irradiated. I can randomly select an atom within the tube but not within the
target area. Using the following code:
variable randomno index 0.32 0.26 0.36 0.45 0.04 0.15 #from random decimal
generator
next randomno
variable randomID equal "TotalNumberofAtoms*randomno'
group randomatom id $randomID
My supervisor suggested reassigning global atoms IDs to local atom IDs but I
don't know how to do this!
on the lammps input script level, there is no concept of a local
vs. a global atom id. all atom ids are global. local indexing is
only done on the source code level due to domain decomposition
(and then the distribution depends on the number of processors).
the script fragment from above doesn't make much sense without
having more context. you have to explain in more detail what your
objectives are, how you intend to implement them, and what your
actual script code looks like.
Any ideas/suggestions?
to me it sounds a lot like the best solution would be to write a
custom fix that can pick an atom in the way you want it to have
and then apply the irradiation effect to them.
cheers,
axel.