Functions

get_symmetry_lattice(atoms)

Rotate the structure to certain oritentation to get the irreducible elastic tensor.

ij_to_voigt(i, j)

Convert 3×3 matrix indices to Voigt notation.

is_voigt_diag(vix)

Check the Voigt index is diagonal element.

map2d(data, func)

Apply function to each element in the 2D list.

select(cond, value_for_true, value_for_false)

Select 2nd or 3rd arg’s value depending on the cond arg.

swap_ij(ind)

Swap the first and second args.

to_unit_vec(a)

Normalize the 3D vector.

voigt_to_ij(voigt)

Convert Voigt notation to 3×3 matrix indices.