GEMDAT-repos / GEMDAT

Python toolkit for molecular dynamics analysis
https://gemdat.readthedocs.io
Apache License 2.0
21 stars 3 forks source link

orientations.get_conventional_coordinates() #288

Closed tfamprikis closed 3 months ago

tfamprikis commented 3 months ago

should rewrite to a general get_transformed_coordinates() that takes as argument a 3x3 transformation matrix.

the current transformation matrix hard written in orientations.get_conventional_coordinates() can be a default since its a usual case.

stefsmeets commented 3 months ago

I'm not convinced that the current hardcoded matrix (primitive to conventional) should be the default. It depends on the outcome lattice type, and this is not fixed.

I'd rather we used the pymatgen machinery here, e.g. pymatgen has Structure.to_primitive / Structure.to_conventional, which uses SpacegroupAnalyzer.get_[primitive|conventional]_standard_structure, which uses SpacegroupAnalyzer.get_conventional_to_primitive_transformation_matrix.

stefsmeets commented 3 months ago

We can configure it so the user can specify the matrix.