Calculating total energy of a single particle.

Hi all,
I am trying to calculate the total energy of a single particle. I have computed both pe & ke, and there is a force acting on the particle(which I’ve added using fix addforce). To compute the total energy, I need to add these quantities but, both ke & pe are computed as equal style variables and potential energy corresponds to atom style variable. How do I add these values and print it using thermo command?

Thank you,
Diljith T

Hi all,
I am trying to calculate the total energy of a single particle. I have computed both pe & ke, and there is a force acting on the particle(which I’ve added using fix addforce). To compute the total energy, I need to add these quantities but, both ke & pe are computed as equal style variables and potential energy corresponds to atom style variable. How do I add these values and print it using thermo command?

please have a look at https://lammps.sandia.gov/doc/Howto_output.html and the individual pages it links to.

axel.