ghost atoms' velocities in PBC

Is there any way to change velocities of the ghost atoms? Specifically
I would like to reverse velocities for ghost atoms forming periodic
boundary.

Is there any way to change velocities of the ghost atoms? Specifically
I would like to reverse velocities for ghost atoms forming periodic
boundary.

i don't understand the question. any ghost atom is a local atom elsewhere
and you can access those with the velocity command. ghost atoms have
nothing to do with periodic boundaries, but with domain decomposition.

cheers,
   axel.

I thought the ghost atom is from setting boundary condition, is it wrong? The number of ghost atoms seems change during runs. How could we output the number of ghost atoms, and their velocity ? The 'dump' command only can output real atom's information.

Best wishes,
Yangpeng

在 Mar 23, 2011,9:32 AM, Axel Kohlmeyer 写道:

2011/3/23 Yangpeng Ou <[email protected]...>:

I thought the ghost atom is from setting boundary condition, is it wrong? The number of ghost atoms seems change during runs. How could we output the number of ghost atoms, and their velocity ? The 'dump' command only can output real atom's information.

ghost atoms are the "halo" of atoms around each domain (of local
atoms) that are needed
to compute all bonded and non-bonded interactions across the domains.
of course that does implicitly take care of periodic boundaries, too.

there is no need to output the ghost atom properties, since they are identical
to those of the corresponding local atom in a difference domain (i.e.
on a different
MPI task). the information about those is exchanged during the MD steps.
details are in steve's papers on the LAMMPS MD implementation or can be
gathered (with much more effort) from reading through verlet.cpp and
the functions
it is calling.

cheers,
   axel.

Thanks for quick reply. I first encountered the ghost atom issue while I try to compute virial. My own method to compute virial is to output net force and position of each particle and sum their together as definition. However, the result is completely different from lammps virial output. The lammps seems to compute virial including not only real atoms but also ghost atoms? I think lammps method maybe count two times, or three times for some atoms? I know my though is wrong. Could you help to clarify it.

Thanks a lot.

在 Mar 23, 2011,9:58 AM, Axel Kohlmeyer 写道:

The virial computation uses ghost-atom forces for the F dot r term, b/c
that's an efficient way to do it. It doesn't use ghost velocities for
the kinetic
energy term.

Steve

2011/3/23 Yangpeng Ou <[email protected]...>:

i don't understand the question. any ghost atom is a local atom elsewhere
and you can access those with the velocity command. ghost atoms have
nothing to do with periodic boundaries, but with domain decomposition.

ghost atoms are the "halo" of atoms around each domain

details are in steve's papers on the LAMMPS MD implementation or can be

gathered (with much more effort) from reading through verlet.cpp

I am trying to "decouple" properties of the "original" atom and the "halo"
on the another side of the periodic domain.

But if I understand you answer it is not easy.

i don't understand the question. any ghost atom is a local atom elsewhere
and you can access those with the velocity command. ghost atoms have
nothing to do with periodic boundaries, but with domain decomposition.

ghost atoms are the "halo" of atoms around each domain

details are in steve's papers on the LAMMPS MD implementation or can be

gathered (with much more effort) from reading through verlet.cpp

I am trying to "decouple" properties of the "original" atom and the "halo"
on the another side of the periodic domain.

please note, "domain" refers to the domain decomposition
that is used in LAMMPS for parallelization. for the individual
domains there is no "other side", they "only" have neighbors
to their six faces. those neighbors may, or may not be a
periodic image of themselves (for small processor counts)
or not. it is difficult to explain this in words, steve's papers
and presentations have some nice graphics illustrating what
is going on. that is probably the best way to understand it.

axel.

I think I am messing up the terms. Let my express the idea without
references to the
implementation in code.

One can frame the PBC in this way ( "|" is the boundary of the
simulation box, "*" atoms).
1. | * * * * |
2. create "halo" atoms
   + + | * * * * | + +
3. do force calculations

I want to add one extra step
1. | * * * * |
2. create "halo" atoms
   + + | * * * * | + +
3. modify velocities of the "halo" atoms
4. do force calculations

I think I am messing up the terms. Let my express the idea without
references to the
implementation in code.

One can frame the PBC in this way ( "|" is the boundary of the
simulation box, "*" atoms).
1. | * * * * |
2. create "halo" atoms
+ + | * * * * | + +
3. do force calculations

I want to add one extra step
1. | * * * * |
2. create "halo" atoms
+ + | * * * * | + +
3. modify velocities of the "halo" atoms
4. do force calculations

you'd have to keep extra copies of your data
around and do extra communication for that.

in lammps your halo and the ghost atoms
only coincide if you are running on a single processor.

axel

in lammps your halo and the ghost atoms
only coincide if you are running on a single processor.

But I think it is easy to find halo atoms. They are the ones outside
of the domain box.