[lammps-users] Compute heat/flux requires ghost atoms store velocity

Dear all.

I am trying to run an example program, but I keep getting the same message
no matter what I do.
ERROR: Compute heat/flux requires ghost atoms store velocity

The example is that found online. Has anyone have this kind of problem?

Regards

Peter C. K

atom_style full
units real
dimension 3
boundary p p p
lattice fcc 5.376 orient x 1 0 0 orient y 0 1 0 orient z 0 0 1
region box block 0 4 0 4 0 4
create_box 1 box
create_atoms 1 box
mass 1 39.948
pair_style lj/cut 13.0
pair_coeff * * 0.2381 3.405
group every region box

velocity all create 70 102486 mom yes rot yes dist gaussian
timestep 4.0
thermo 10
# ------------- Equilibration and thermalisation ----------------
fix NPT all npt 70 70 10 xyz 0.0 0.0 100.0 drag 0.2
run 8000
unfix NPT
# --------------- Equilibration in nve -----------------
fix NVE all nve
run 8000
# -------------- Flux calculation in nve ---------------
reset_timestep 0
compute myPE all pe/atom pair
compute flux all heat/flux myPE
log flux.log
variable J equal c_flux[1]/vol
thermo_style custom step temp v_J
run 100000

I think you are using an older version of the code with the current
on-line documentation/text-script. If you download the current
version, the test script should work without that error
message. The older version requires a line like
communicate single vel yes

Steve