# summation in compute heat flux

Hello everyone,

I have a question about the following summation in compute heat/flux command:

J=1/V(…+Σ _i<j(fij.Vij).xij)

For any atom i, dose j include “only” the atoms in the main cell or a j is the nearest neighbours of i which could be a ghost atom in an image cell?

Best wishes,
Abolfazl

Hello everyone,

I have a question about the following summation in compute heat/flux command:

J=1/V(...+Σ _i<j(fij.Vij).xij)

For any atom i, dose j include "only" the atoms in the main cell or a j is the nearest neighbours of i which could be a ghost atom in an image cell?

it looks like you are misunderstanding what a "ghost" atom in LAMMPS
is. ghost atoms are copies of atoms from neighboring *subdomains* due
to domain decomposition.
when LAMMPS divides the cell into sub-domains, all atoms inside those
subdomains are "local" atoms on the MPI rank that "owns" those atoms.
then atoms within the communication cutoff, typically the largest
pairwise cutoff plus neighborlist skin distance, are copied to
neighboring subdomains as "ghosts", so all e.g. pairwise interactions
within the cutoff can be computed.

only in the case of having a single subdomain, i.e. running with a
single MPI rank, are the ghost atoms periodic copies from "local"
atoms at the other side of the same subdomain.

to try and answer the question. the manual says, that the second term
in the GK formula is the per-atom stress tensor (S) of atom i times
the velocity vector of atom i. that is what the compute actually
computes. the following lines are just a reformulation of that
expression. as is the nature of the per-atom stress tensor, it is - in
the simplest case - computed based on the neighbor list using
neighbors j of atom i up to the pair wise interaction cutoff. those
are closest images. since LAMMPS is not subject to minimum image
conventions, there could be multiple periodic copies of the same atom,
if your cutoff is large and the simulation box very small.

axel.

axel.

Thanks a lot!