Bond-orientational order parameters#

Frame.steinhardt(l) returns the local q_l and the Lechner-Dellago average for every atom. The neighbour list is the cutoff list. Degrees 3, 4, 6, 8, and 12 are computed. seams steinhardt reports the means of the degrees given to --l (default \(q_4\) and \(q_6\), from the solid-harmonic kernel). --l 3,4,6,8,12 asks for every degree the library computes.

tests/dseams/test_doc_snippets.py runs the Python block on this page.

import pydseams as ds

frame = ds.read("input/traj/exampleTraj.lammpstrj", atom_type=2)
q3 = frame.steinhardt(3)
assert len(q3["ql"]) == 250
assert round(float(sum(q3["ql"]) / len(q3["ql"])), 6) == 0.374897
assert round(float(sum(q3["ql_bar"]) / len(q3["ql_bar"])), 6) == 0.187542

q3["ql"] and q3["ql_bar"] are the per-atom arrays. On this frame the finite means are about 0.374897 and 0.187542.

The local parameter 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}).\]