Symmetry analyser in elastic module (probably) does not work
Nobody has claimed this yet.
- Dominant language
- Jupyter Notebook
- Stars
- 10
- Forks
- 4
- Avg merge
- 12h 31m
- Merged PRs (30d)
- 13
Description
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.
import numpy as np
from ase.build import bulk
from atomistics.workflows.elastic import helper
F_list = []
for rotate in [True, False]:
structure = bulk("Mg", orthorhombic=True)
if rotate:
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() for struct in data_dict[0]["calc_energy"].values()])
print(np.allclose(F_list[0], F_list[1]))
output: True
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the provided Python reproducer and read the atomistics.workflows.elastic.helper.get_tasks_for_elastic_matrix entry point. Compare the generated strain lists for the original and rotated magnesium structures, then verify that the result reflects the structure orientation rather than only its symmetry group.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100