Combining potentials for calculation of heat flux

Dear Steve,

Thank you very much for your email. I can calculate the contribution of each potential on the heat flux. My problem is that I don’t how I can add them and save them to a SINGLE file. For example for LJ + Tersoff, I know how to calculate the heat flux in the system at each time step (Q_tersoff [i] and Q_LJ[i] — i is time step) but these arrays are calculated in different files (pair_Tersoff.CPP and pair_LJ.CPP). I need to add these two arrays and output the results to a file but I don’t know how to call Q_LJ at each time step from “pair_Tersoff.CPP” file.


I don’t really know what you’re trying to do. If you

can get the values you want in two output files, why

not post-process them to add the values together

and create one file. In other words, don’t worry

about LAMMPS doing it, just do it yourself.


I agree with Steve, it is better to right your own personal post processing codes, but by the way if you intend to use different potential at the same time for your calculations, I believe it is not possible, rather do them seperately and use your own code to add the results.

Thank you very much for your answers.