I’ve been trying really hard to make the code for solid argon code (compute heat/flux command — LAMMPS documentation) work for GaAs but I’m getting really small values for the thermal conductivity.
It would be very helpful to get a code that works well and then work from that.
The quoted code does work. But computing thermal conductivity is a non-trivial task and it requires care with performing the calculations. You cannot expect to just replace the force field and then everything else will work magically. The examples provided by LAMMPS generally are meant to run fast and show the principles, but are not meant to be taken literally for production calculations.
Most people that have trouble with these either mix up the units or don’t run long enough until the data is properly converged (and often don’t even make an effort to check the convergence).
Also, the examples in the examples/KAPPA folder provide some more information in the README file. There are multiple ways to compute the thermal conductivity so it is advisable to try them all out.