# The compute hnemd keyword

## Purpose

The `compute_hnemd`

keyword is used to calculate the RTC (running thermal conductivity) using HNEMD method.

## Grammar

- This keyword has 4 parameters and looks like the following:

compute_hnemd output_interval Fe_x Fe_y Fe_z

The first parameter is the output interval. The next three parameters are the [math]x[/math], [math]y[/math], [math]z[/math] components of the external driving force [math]\vec{F}_{\rm e}[/math] in units of [math]Å^{-1}[/math].

## Examples

### Example 1

- An example of the keyword is:

compute_hnemd 1000 0.00001 0 0

This means that (1) you want to calculate the thermal conductivity using the HNEMD method; (2) the RTC will be averaged and output every 1000 steps (the heat current is sampled for every step); (3) the external driving force is along the [math]x[/math] direction and has a magnitude of [math]10^{-5} Å^{-1}[/math]. The results will be written into a file named `kappa.out`

in the same folder where you put your `run.in`

file in. Note that one should control the temperature when using this keyword. Otherwise, the system will be heated up by the external driving force.

## Caveats

- Cannot be used in the same run as the compute_hac keyword.