Atom IDs

Hello all!
How can I do something in lammps so that atom IDs increase in one direction. I mean for example atom with an ID of 1 has a lower z coordinate than atom with an ID of 1000 so that they are generated almost in z direction.

tanx

Hello all!
How can I do something in lammps so that atom IDs increase in one direction.
I mean for example atom with an ID of 1 has a lower z coordinate than atom
with an ID of 1000 so that they are generated almost in z direction.

what do you need this for?

if you import atoms from a data file, you can have them in any order you wish.

axel.

If you make a data file, you can specify the position of each atom however you like. Can you give a bit more information about what you want to do?

Yeah, But I want to get some properties of different atoms in different regions of my simulation box. So it’s much easier for me to have atom IDs sorted in one direction.

Yeah, But I want to get some properties of different atoms in different
regions of my simulation box. So it's much easier for me to have atom IDs
sorted in one direction.

*what* properties? there are all kinds of options to set up regions in
lammps. it looks to me that the problem is not with the atom ids but
rather your approach to what you want to solve.

you cannot change atom ids during a run. many parts of LAMMPS *depend*
on atoms with the same id being the same atom.

axel.

Yeap ofcourse!! But If I have a simulation box which a region is lattice and one other region is generated randomly and it consists of more than 30000 atoms how can I make that data file??
is there any way to do with atom_modify map command?

I still didnt understand this. Do you want to generate “other” region during the run or the start of run itself. I mean, if u want the latter, then a data file is possible. That depends, however, on what do u call a ““Random”” config. Just include a set of commands(rules) in your code used for writing a data file and u will have a no. of different configs. generated randomly.

Sagar

suppose that I want to have some different atoms velocities in a time sequential order. And I need to have atoms in different regions.
Also I’m sure that I don’t want to use dump file!! It will be so complicated for me.

suppose that I want to have some different atoms velocities in a time
sequential order. And I need to have atoms in different regions.
Also I'm sure that I don't want to use dump file!! It will be so complicated
for me.

the only complicated thing that i currently see are your explanations.
please step back a little and explain what you want to do with a bit
more detail and context and then people will be able to make
recommendations. just random statements without sufficient context are
not enough to make an educated suggestion.
remember that people cannot see what is in your head and what you
were/are thinking. also keep in mind that people may use different
terms to describe the same thing, so you have to be accurate and
specific yet lucid in your descriptions.

if it was such a good idea to have the facility that you are looking
for, it would have already been implemented in a code like LAMMPS that
is used by quite a few people...

axel.

let me ask you in other way. Is there any way to change atom IDs after atoms being created? and if it’s possible how can I sort them in a direction order? for example in z-direction. Is there any thing to do with atom_modify map command?

let me ask you in other way. Is there any way to change atom IDs after atoms
being created?

not internally and i already explained why that is a fairly dumb idea, anyway.

and if it's possible how can I sort them in a direction
order? for example in z-direction. Is there any thing to do with atom_modify
map command?

let me repeat. you are asking for help "backwards", i.e. by asking for
a "feature" rather than describing what you want to achieve.

axel.

Maybe with the set command: you can place the atoms where you want as a function of their id, with a loop and so on.
http://lammps.sandia.gov/doc/set.html
But I think preparing a data file is easier.
And I'm sure there is an even easier way to do what you want, which I still don't understand either.

Al 18/04/13 10:58, En Rostam Sampad ha escrit:

Hi Rostam,

I guess that this is not quite for lammps. You can sort your data file using text editor such as vi, vim, MS excel, emacs etc.

I recommend you one simple vi command to sort your data file.

  1. Open your data file with vi editor.
  2. Type as follow.
    :sort n
    for example, if you want to sort rows from 10 to 100,
    just type like —> :10,100sort n

I guess that is what you want.

C.W Jang