How to output two energies?

Hi everyone,

let’s say I’m working with two kinds of bonds, a morse bond and a harmonic bond.

By writing thermo_style custom step ebond etotal

I can output the total energy and the potential energy of the bonds. Is there any way

of getting the ebond for the morse potential and the ebond for the harmonic one separately?

Thanks a lot!

Hi everyone,

let's say I'm working with two kinds of bonds, a morse bond and a harmonic
bond.
By writing thermo_style custom step ebond etotal
I can output the total energy and the potential energy of the bonds. Is
there any way
of getting the ebond for the morse potential and the ebond for the harmonic
one separately?

you would either have to program a compute style similar to compute
pair for bonds, or you need to use rerun on a prerecorded trajectory
with only one kind of bond enabled.

axel.

Thanks for your reply, Axel! That sounds kind of hard, which of those techniques do you think would be easier to perform?

Thanks for your reply, Axel! That sounds kind of hard, which of those
techniques do you think would be easier to perform?

for me or for you? :wink:

as often in science, the answer is: it depends

without knowing what kind of simulations you do, what you want to do
with the information, how many times you need to do this and what C++
programming skills you have, and how much energy you are willing to
invest in improving them (if needed) and to understand how to modify
LAMMPS, it is difficult to give an exact answer.

for me personally, it would probably be easier to write a new compute
(and then add versions for the other hybrids to it as well).

axel.

FYI, i just implemented a compute bond command into LAMMPS-ICMS.
http://git.lammps.org/git/?p=lammps-icms.git;a=commit;h=b154a21d50d6eb70019d3103a5d4dfd75df763cd

took about one hour to write, test and document. :wink:

axel.

That’s great! I’m gonna go over it right now, thanks!

It works fantastically, thank you very much!

That should be added to LAMMPS, its really useful to know which potentials are doing what

It works fantastically, thank you very much!
That should be added to LAMMPS, its really useful to know which potentials
are doing what

​it is already included in today's patch. ​LAMMPS Molecular Dynamics Simulator

axel.