an error in calculating Von Mises Stress

Dear all,

I want to calculate Von Mises Stress by following commands in Lammps input:

compute peratom all stress/atom
variable p1 equal (c_peratom[1]-c_peratom[2])^2+(c_peratom[2]-c_peratom[3])^2+(c_peratom[1]-c_peratom[3])^2
variable p2 equal (c_peratom[4]^2+c_peratom[5]^+c_peratom[6]^)*6
variable vonstress equal sqrt((v_p1+v_p2)/2)

dump cor all custom 10 dump.lammpstrj id type x y z v_vonstress

However, it always encounters an error: Dump custom variable is not atom-style variable. Could anyone give me some instructions? Thanks in advance!

Best,
Y.S. He

Dear all,

I want to calculate Von Mises Stress by following commands in Lammps input:
......
compute peratom all stress/atom
variable p1 equal
(c_peratom[1]-c_peratom[2])^2+(c_peratom[2]-c_peratom[3])^2+(c_peratom[1]-c_peratom[3])^2
variable p2 equal (c_peratom[4]^2+c_peratom[5]^+c_peratom[6]^)*6
variable vonstress equal sqrt((v_p1+v_p2)/2)
......
dump cor all custom 10 dump.lammpstrj id type x y z v_vonstress

However, it always encounters an error: Dump custom variable is not
atom-style variable. Could anyone give me some instructions? Thanks in

the error message already tell you what is wrong. read the documentation
about variables and how to output them again.

axel.

You can only dump an atom-style variable that produces
one value per atom. Equal-style variables produce a single
global value. You can print that with thermo output but
not into a dump file.

Steve