diff --git a/atomistics/workflows/evcurve/workflow.py b/atomistics/workflows/evcurve/workflow.py index 22cc4843..ed006d94 100644 --- a/atomistics/workflows/evcurve/workflow.py +++ b/atomistics/workflows/evcurve/workflow.py @@ -1,6 +1,5 @@ import numpy as np from ase.atoms import Atoms -from typing import Literal from collections import OrderedDict from atomistics.workflows.evcurve.fit import EnergyVolumeFit @@ -8,7 +7,7 @@ def _strain_axes( - structure: Atoms, axes: Literal["x", "y", "z"], volume_strain: float + structure: Atoms, volume_strain: float, axes: tuple[str, str, str] = ("x", "y", "z") ) -> Atoms: """ Strain box along given axes to achieve given *volumetric* strain. @@ -75,7 +74,7 @@ def __init__( fit_type="polynomial", fit_order=3, vol_range=0.05, - axes=["x", "y", "z"], + axes=("x", "y", "z"), strains=None, ): self.structure = structure @@ -106,7 +105,9 @@ def generate_structures(self): int(self.num_points), ) for strain in strains: - basis = _strain_axes(self.structure, self.axes, strain) + basis = _strain_axes( + structure=self.structure, axes=self.axes, volume_strain=strain + ) self._structure_dict[1 + np.round(strain, 7)] = basis return {"calc_energy": self._structure_dict} diff --git a/tests/test_evcurve_abinit.py b/tests/test_evcurve_abinit.py index c5c91739..28a9dacb 100644 --- a/tests/test_evcurve_abinit.py +++ b/tests/test_evcurve_abinit.py @@ -40,7 +40,7 @@ def test_calc_evcurve(self): fit_type='polynomial', fit_order=3, vol_range=0.05, - axes=['x', 'y', 'z'], + axes=('x', 'y', 'z'), strains=None, ) task_dict = workflow.generate_structures() diff --git a/tests/test_evcurve_emt.py b/tests/test_evcurve_emt.py index 4c45b0eb..405fc8f8 100644 --- a/tests/test_evcurve_emt.py +++ b/tests/test_evcurve_emt.py @@ -15,7 +15,7 @@ def test_calc_evcurve(self): fit_type='polynomial', fit_order=3, vol_range=0.05, - axes=['x', 'y', 'z'], + axes=('x', 'y', 'z'), strains=None, ) task_dict = workflow.generate_structures() diff --git a/tests/test_evcurve_gpaw.py b/tests/test_evcurve_gpaw.py index 7c463e6b..e19b60b1 100644 --- a/tests/test_evcurve_gpaw.py +++ b/tests/test_evcurve_gpaw.py @@ -25,7 +25,7 @@ def test_calc_evcurve(self): fit_type='polynomial', fit_order=3, vol_range=0.05, - axes=['x', 'y', 'z'], + axes=('x', 'y', 'z'), strains=None, ) task_dict = workflow.generate_structures() diff --git a/tests/test_evcurve_lammps.py b/tests/test_evcurve_lammps.py index 4a1bf797..1d5259e2 100644 --- a/tests/test_evcurve_lammps.py +++ b/tests/test_evcurve_lammps.py @@ -41,7 +41,7 @@ def test_calc_evcurve(self): fit_type='polynomial', fit_order=3, vol_range=0.05, - axes=['x', 'y', 'z'], + axes=('x', 'y', 'z'), strains=None, ) task_dict = workflow.generate_structures() diff --git a/tests/test_evcurve_qe.py b/tests/test_evcurve_qe.py index dde12eb3..efeeb319 100644 --- a/tests/test_evcurve_qe.py +++ b/tests/test_evcurve_qe.py @@ -43,7 +43,7 @@ def test_calc_evcurve(self): fit_type='polynomial', fit_order=3, vol_range=0.05, - axes=['x', 'y', 'z'], + axes=('x', 'y', 'z'), strains=None, ) task_dict = workflow.generate_structures() diff --git a/tests/test_evcurve_siesta.py b/tests/test_evcurve_siesta.py index 527af14e..95d5f5ad 100644 --- a/tests/test_evcurve_siesta.py +++ b/tests/test_evcurve_siesta.py @@ -44,7 +44,7 @@ def test_calc_evcurve(self): fit_type='polynomial', fit_order=3, vol_range=0.05, - axes=['x', 'y', 'z'], + axes=('x', 'y', 'z'), strains=None, ) task_dict = workflow.generate_structures()