Dumping kinetic and potential energy

Hi,

Following the manual I am able to calculate kinetic and potential energy per atom and make a custom dump of those values in “real” energy units which is kcal/mole.

compute ke all ke/atom
compute pe all pe/atom

output data

dump 1 all custom 100 filename element x y z vx vy vz fx fy fz q c_ke c_pe

However what I would like to achieve is to make a dump where kinetic and potential energies per atom will be expressed in eV (eletron Volts) instead of kcal/mole.

How can I make such unit recalculation?

I tried to use:

variable keeV atom ke*0.043364102

but it doesn’t work.

Regards,
Bartlomiej

“but it doesn’t work.” is not a very helpful description of the problem…
What exactly does not work? What did you expect to see and what do you see?

Also, referencing “ke” will not do you any good as that is the total kinetic energy of the system (Or the average, I always forget). If you want to multiply the per-atom kinetic energy, you should reference your compute instead, like this:
compute K all ke/atom

variable keeV atom “c_K * 0.043364102”

Putting that in a dump custom statement works for me.