Skip to content

Symmetry analyser in elastic module (probably) does not work #528

Description

@samwaseda

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions