[lammps-users] Potential Implementing?

Dear All,

I implemented a new potential to use it in lammps following the method described on the documentation od lammps:

The potential energy of the system is evaluated in this program (pair_foo.cpp).

My problem is how to communicate this quantity (potential energy) in order to write correctly the output file (log.lammps).

Any idea?

Thanks in advance,
Best regards.

If you wrote it like the other pair potentials in LAMMPS then it will store
its energy and virial in the appropriate variables in pair.h and the values
will be used by thermo and other classes in the code.