reseting unwrapped coordinates?

Dear All,

I am trying to use unwrapped coordinates during the simulation provided by compute property/atom. I average the obtained unwrapped atomic coordinates within 2 ps using fix ave/atom to get rid of the local vibration of atoms. This part of input script looks something like that:

compute unX all property/atom xu yu zu

fix apos all ave/atom 10 200 2000 c_unX[1] c_unX[2] c_unX[3]

After that time it would be good to have the unwrapped coordinates reset to the real coordinates to be able to average them again for the next 2 ps. Is there any straight way to do that (maybe there exist some fix already), or I would have to do some programming?

I would be very thankful for any suggestion.

All the best,

Bartosz

Dear All,

I am trying to use unwrapped coordinates during the simulation provided by
compute property/atom. I average the obtained unwrapped atomic coordinates
within 2 ps using fix ave/atom to get rid of the local vibration of atoms.
This part of input script looks something like that:

compute unX all property/atom xu yu zu

fix apos all ave/atom 10 200 2000 c_unX[1] c_unX[2] c_unX[3]

After that time it would be good to have the unwrapped coordinates reset to
the real coordinates to be able to average them again for the next 2 ps. Is
there any straight way to do that (maybe there exist some fix already), or I
would have to do some programming?

to wrap unwrapped coordinates back to into the principal cell, you
simply need to reset their image flags. this can be done with the set
command or by writing out a data file and processing it or any other
operation that has the same effect. if you have molecules in your
system, you have to make sure to subtract the same numbers from the
image flags of all atoms in the same molecule.

axel.

axel.

After that time it would be good to have the unwrapped coordinates reset to the real coordinates to be able to average them again >for the next 2 ps. Is there any straight way to do that (maybe there exist some fix already), or I would have to do some >programming?

I don’t understand your Q. The fix ave/atom command is simply

using unwrapped atom coords to calculated its average
during 2000-step windows. This operation does not alter any coords
within LAMMPS itself, it’s just a diagnostic, performed by

unwrapping the coords each time they are needed.

For the next 2000 steps, the coords will again be uwrapped
and a new average calculated.

If you want to reset the image flags of all the atoms every 2000
steps, then use the “set” command as Axel mentioned and invoke

it in a loop every 2000 steps or using the run every command.

Steve