Closed kavanase closed 2 months ago
This fixed implementation is tested and shown to be working in the attached notebook as well
Done!
Also checked that this test fails with the old code (for fractional=True
), but works all fine with the new code.
Summary
Structure.apply_operation()
fails when using thefractional=True
operation. The issue is that theSymmOp
is applied to the site frac coords (in the original lattice), but then these new frac coords (in the old basis) are used directly with the new (transformed) lattice, giving a 'doubled' transformation and messing with the output.Fix added here, matching the implementation in
doped
(which also has a couple more options and a cleaner implementation).MWE:
(Notebook and structure being used attached too as always 😉 , with more examples)
Pymatgen_SymmOp_Fix_PR.zip