<!-- https://docs.dseams.info/user/tutorials/order-parameters.md -->

# Bond-orientational order parameters {#bond-orientational-order-parameters}

The local Steinhardt parameter of atom $i$ is

$$
q_l(i) = \sqrt{\frac{4\pi}{2l+1} \sum_{m=-l}^{l} |q_{lm}(i)|^2}
$$

with

$$
q_{lm}(i) = \frac{1}{N_b(i)} \sum_{j \in N(i)} Y_{lm}(\hat r_{ij}).
$$

$N(i)$ is every neighbour inside the cutoff. The Lechner-Dellago
average replaces $q_{lm}(i)$ with the mean of $q_{lm}$ over $i$
and its neighbours, then uses the same sum.

The library computes degrees 3, 4, 6, 8, and 12. `seams steinhardt`
prints the finite mean of each degree named by `--l`. The default list
is 4 and 6. Degrees 4 and 6 use the solid-harmonic kernel on that
cutoff list. Degrees 3, 8, and 12 are computed when `--l` names them.

## One mixed frame {#one-mixed-frame}

`input/traj/exampleTraj.lammpstrj` has 750 atoms. Type 2 is the 250
oxygens. Type 1 is hydrogen.

```bash
seams read input/traj/exampleTraj.lammpstrj --type 2
```

```default
nop 250 frame 1 box 40 40 180.203
```

```bash
seams steinhardt input/traj/exampleTraj.lammpstrj --type 2 --cutoff 3.5 --l 3
```

```default
nop 250 q3 0.374897 q3bar 0.187542
```

`q3` is the mean of the finite local $q_3$ values. `q3bar` is the
mean of the finite Lechner-Dellago values. On this frame those means
are 0.374897 and 0.187542.

```bash
seams steinhardt input/traj/exampleTraj.lammpstrj --type 2 --cutoff 3.5 --l 3,4,6,8,12
```

```default
nop 250 q3 0.374897 q3bar 0.187542 q4 0.693844 q4bar 0.648011 q6 0.420854 q6bar 0.33063 q8 0.587703 q8bar 0.481713 q12 0.51294 q12bar 0.341973
```
