I tested the list of strains from the magnesium structure, once with the default ASE structure, once by changing the axis from x to y. I got exactly the same list of strains. That's not so surprising given the fact that the internal algorithm seems to check only the symmetry group and not how the structure is oriented.
importnumpyasnpfromase.buildimportbulkfromatomistics.workflows.elasticimporthelperF_list= []
forrotatein [True, False]:
structure=bulk("Mg", orthorhombic=True)
ifrotate:
rot=np.array([[0, -1, 0], [1, 0, 0], [0, 0, 1]])
structure.set_cell(rot.T @ structure.cell @ rot)
structure.set_positions(structure.positions @ rot) data_dict=helper.get_tasks_for_elastic_matrix(structure, 0.01, 3)
F_list.append([struct.cell.diagonal() /structure.cell.diagonal() forstructindata_dict[0]["calc_energy"].values()])
print(np.allclose(F_list[0], F_list[1]))output: True
I tested the list of strains from the magnesium structure, once with the default ASE structure, once by changing the axis from x to y. I got exactly the same list of strains. That's not so surprising given the fact that the internal algorithm seems to check only the symmetry group and not how the structure is oriented.
output:
True