Problem with atom->mask & atom->type

Dear Developers,

I am trying to edit a part of source codes (I use 22 Aug 2018). I need mask/type for every atoms. But, the problem is both of mask and type are changed in different time steps e.g. compute_property_atom.cpp in pack_xu function … .

I would be grateful if you let me know if this problem is bug or normal?
Also, what does the mask do?

Sincerely,

Amir

Dear Developers,

I am trying to edit a part of source codes (I use 22 Aug 2018).

which part?
BTW: you'd better work on the most recent (stable) version, the 12
December 2018 version.

I need mask/type for every atoms. But, the problem is both of mask and type are changed in different time steps e.g. compute_property_atom.cpp in pack_xu function ... .

how do you determine this? please provide (convincing) evidence. mask
value can only change, if you have dynamic groups and atom types only
change if you have a fix that can change atom types, like fix
atom/swap, fix bond/create, fix bond/react, or similar.

I would be grateful if you let me know if this problem is bug or normal?

most likely you are not interpreting LAMMPS behavior correctly or you
are doing something that is corrupting your data. but with so limited
information, it is difficult to say anything specific. it looks like
you need to spend more time reading source code, especially of the
base classes and core commands. ...and don't forget the header files,
they are full of hints of what class members are meant to be used for
(the ones you are supposed to be using, that is, if their names are
not very obvious already).

Also, what does the mask do?

i am confused. you say you need atom->mask, but then you claim you
have no idea what it is good for. that makes no sense. what do you
need atom->mask for then?
be it as it may, the atom->mask array contains the bits that identify
to which group an atom belongs to.

axel.

Dear Axel,

Many thanks for your response.

I installed the most recent (stable) version, the 12 December 2018 version, but there is the mentioned problem.

I had found that mask did what (as you mentioned in your e-mail), I was surprised too, because masks were changed with time. I don’t use dynamic group in my script.

I print type and mask for all atoms in “compute_property_atom.cpp” file in the function “pack_xu” between lines 716 and 717. Type and mask are changed with time. I attach the LAMMPS script and input file at the end of this e-mail.

I would be grateful if you check the script and tell me about the mentioned problem.

Thank you in advance.

Sincerely,

Amir

test.chain (2.83 KB)

initial_configuration.chain (1.18 KB)

Dear Axel,

Many thanks for your response.

I installed the most recent (stable) version, the 12 December 2018 version, but there is the mentioned problem.

I had found that mask did what (as you mentioned in your e-mail), I was surprised too, because masks were changed with time. I don't use dynamic group in my script.

I print type and mask for all atoms in "compute_property_atom.cpp" file in the function "pack_xu" between lines 716 and 717. Type and mask are changed with time. I attach the LAMMPS script and input file at the end of this e-mail.

I would be grateful if you check the script and tell me about the mentioned problem.

the problem is due to your lack of attention to how LAMMPS handles
simulation data and does domain decomposition.
it is not the data that changes, but it is the order of atoms. if you
also output atom->tag, for the atoms in question, you should see, that
atoms with the same id (i.e. tag) keep their value, but their order
changes.

axel.