How to get thermal conductivity, using rNEMD method?

Hello everyone,

I am conducting a LAMMPS simulation work to get thermal conductivity, using rNEMD method. To get a good grasp of this method, I tried to first understand the example available in Github, provided in this link “

However, I have difficulty understanding some parts of this method. I ran this code in my own system and I got the log file and temperature profile. Having said that, I am not sure how can I get use of the output information to calculate thermal conductivity.
According to the LAMMPS documentation, using “fix ave/chunk”, we can get a temperature gradient (dT/dz), outputted in the tmp.profile file. Therefore, I am supposing that in order to get the real temperature of each region, I have to do the following calculations:

T(final)= [(temperature gradient)*dz]+T(initial)

where T(initial) would be the total temperature of the system (e.g. 300 K). This part especially gets so confusing to me, as in the “Read me” section of Github (, it mentions the average temperature difference should be 1.16, which is not identical to my calculations. Also, reporting this method in lj units has added to the confusion. Thus, I would really appreciate any clarifications on this method.

Thank you very much for your time and consideration.

This is a very bad choice, since it is not the canonical repository for LAMMPS sources but a repository of running tests. In the lammps-testing repository, the examples are outdated and only maintained for testing purposes, not for user consumption.

The place to start with this is always in bringing your text book knowledge up to speed. Any software documentation will not provide it but rather expect that you have sufficient knowledge of the theoretical background to understand what is done. Without you run a high risk of making mistakes or not understanding whether your choices are correct and your results are converged.

The second step is always to check out the LAMMPS manual, in this case there is a “howto” document with some explanations: 8.3.6. Calculate thermal conductivity — LAMMPS documentation
Note that this refers to some other “howto” document to explain the basic workflow file structure and more: 8.3.6. Calculate thermal conductivity — LAMMPS documentation
So you should study that first. Both refer to the examples tree in the LAMMPS source distribution for the specific details, inputs and README files with further details. Since those are in the LAMMPS distribution, they are maintained and kept up-to-date and corrected in case there are reports of issues.

The remainder of your post is just a consequence of not following the proper order of steps and thus it would be pointless to discuss that.