Closed bfield1 closed 10 months ago
We can modify the routines for conjugation in cryst.gi to fix this.
A solution is to add a line which records the translation component. That would be either t := C [d+1]{[1..d]};
for RightAction or t := C {[1..d]}[d+1];
for LeftAction.
Then, in recording the new Wyckoff position, we replace the translation entry with translation := w!.translation*c + t,
.
Calculating Wyckoff positions for a crystallographic group causes those positions to be recorded with the group. When you conjugate (
^
) the group with an affine matrix, the Wyckoff positions are transformed and recorded with the new conjugated group. However, if the affine matrix represents a translation, then the translation components of the Wyckoff positions are not translated, even when they should be. This is illustrated in the following example code.Which outputs
I would expect the second Wyckoff group, the one which is cached, to be the same as the latter result.
This appears to be an issue in the following part of the code, where the translation component of the Wyckoff positions is only transformed by the linear part of the transformation and not its translation part. https://github.com/gap-packages/cryst/blob/fbf54fb5aaee274e88f8900415a082a1463f0220/gap/cryst.gi#L283-L295