I’m trying to calculate the total energy per atom (potential+kinetic energy per atom).
So, I made following code.
[CODE]
atom_style atomic
units metal
…
…
…
compute PE all pe/atom
compute KE all ke/atom
variable poteng equal c_PE
variable kineng equal c_KE
variable mecheng equal “poteng + kineng”
…
dump A all custom 1 FILENAME c_PE c_KE v_mecheng
…
[CODE END]
I checked that the dump command works without the ‘v_mecheng’.
When I add ‘v_mecheng’ to the dump command, the error “ERROR: Dump custom variable is not atom-style variable (src/dump_custom.cpp:1439)” happens.
I looked up the manual and I tried to change the ‘v_mecheng’ to ‘i_mecheng’, ‘d_mecheng’, ‘f_mecheng’, but it didn’t worked.
So, how to define the ‘atom-style’ variable?
More specifically how can I calculate the total energy per atom?