When determining the resulting cells (both primitive and conventional) the output lattice differs with respect to spglib.
Even if using the Setting.spglib() flag,
This causes downstream issues when trying to compute brilliounzone path in tools such as SeeKPath, which relies on conventional cells conforming to a specific set of rules.
One simple example is the following:
import spglib
import moyopy
from moyopy import Setting
lattice = [[3.1118027, 0 ,0], [0, 5.35005134, 0], [0,0,5.78662637]]
numbers = [1,1,2,2]
positions = [
[0.0,0.0,0.5],
[0.5,0.5,0.0],
[0.0,0.0,0.0],
[0.5,0.5,0.5]
]
cell = (lattice, positions, numbers)
sym_data = spglib.get_symmetry_dataset(cell, symprec=1e-4)
print(f"spglib SGN: {sym_data.number}")
print(f"Conventional Lattice:")
print(f"{sym_data.std_lattice}")
Outputs:
spglib SGN: 71
Conventional Lattice:
[[3.1118027 0. 0. ]
[0. 5.35005134 0. ]
[0. 0. 5.78662637]]
Whereas the same crystal usuing moyopy:
moyoCell = moyopy.Cell(lattice, positions,numbers)
sym_data_moyo = moyopy.MoyoDataset(moyoCell, symprec=1e-4, setting=Setting.spglib())
cell = sym_data_moyo.std_cell
print(f"moyo SGN: {sym_data_moyo.number}\n")
print("Conventional Lattice:")
for i, vec in enumerate(cell.basis):
rounded = [round(x, 6) for x in vec]
print(f"{rounded}")
outputs:
moyo SGN: 71
Conventional Lattice:
[5.786626, 0.0, -0.0]
[0.0, 3.111803, 0.0]
[-0.0, -0.0, 5.350051]
I will note that while this seems related to #260, I have other examples where the resulting lattice is much different to spglib.
Would be great to clear this up, perhaps its general confusion on my end.
When determining the resulting cells (both primitive and conventional) the output lattice differs with respect to spglib.
Even if using the Setting.spglib() flag,
This causes downstream issues when trying to compute brilliounzone path in tools such as SeeKPath, which relies on conventional cells conforming to a specific set of rules.
One simple example is the following:
Outputs:
Whereas the same crystal usuing moyopy:
outputs:
I will note that while this seems related to #260, I have other examples where the resulting lattice is much different to spglib.
Would be great to clear this up, perhaps its general confusion on my end.