geodynamics / burnman

BurnMan is a library for modeling mantle thermodynamics and thermoelasticity constrained by mineral physics experiments.
https://geodynamics.github.io/burnman/
GNU General Public License v2.0
54 stars 41 forks source link

added required frame_convention argument to cell parameter conversions #585

Closed bobmyhill closed 7 months ago

bobmyhill commented 7 months ago

This PR makes the functions utils.unitcell.cell_parameters_to_vectors() and utils.unitcell.vectors_to_cell_parameters() more flexible by adding an additional argument frame_convention. This required argument takes a list of three integers that define the order of axes and vectors.

The convention dictates that the c[0]th cell vector is colinear with the c[0]th-axis, the c[1]th cell vector is perpendicular to the c[2]th-axis, and the c[2]th cell vector is defined to give a right-handed coordinate system. In common crystallographic shorthand, $x_{c0}$ // $a{c0}$, $x{c2}$ // $a{c_2}^*$.

The new argument is set to be required, as there is no "default" option for non-orthotropic materials - different conventions are more suitable for different materials.