Compute total energy of a single particle

Hi all,

How do i compute energy(ke+pe) of a single particle(solute) in an explicit solvent(water)?

Thank you
Diljith T

Hi Diljith,

One option is to create an group (https://lammps.sandia.gov/doc/group.html) with that particle, then create a compute to calculate its pe with group all (https://lammps.sandia.gov/doc/compute_group_group.html). You can add that to the ke compute as well.

In the input file it would look something like:

group particle id XXX
compute c1 particle group/group all
compute c2 particle ke
variable ParticleEnergy equal c_c1+c_c2

where XXX is the atom ID of your particle of interest. If you only wanted the solvation potential energy, then all you need to do is change “all” to whatever group you name the water.

David

Thank you!