Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update atomistics to 0.1.3 #1217

Merged
merged 4 commits into from
Nov 23, 2023
Merged

Update atomistics to 0.1.3 #1217

merged 4 commits into from
Nov 23, 2023

Conversation

jan-janssen
Copy link
Member

No description provided.

@jan-janssen
Copy link
Member Author

File ~/work/pyiron_atomistics/pyiron_atomistics/pyiron_atomistics/atomistics/master/murnaghan.py:98, in MurnaghanJobGenerator.parameter_list(self)
     92     strains = np.linspace(
     93         -self._master.input["vol_range"],
     94         self._master.input["vol_range"],
     95         int(self._master.input["num_points"]),
     96     )
     97 for strain in strains:
---> 98     basis = _strain_axes(
     99         self._master.structure, self._master.input["axes"], strain
    100     )
    101     parameter_lst.append([1 + np.round(strain, 7), basis])
    102 return parameter_lst
File /usr/share/miniconda3/envs/my-env/lib/python3.10/site-packages/atomistics/workflows/evcurve/workflow.py:17, in _strain_axes(structure, volume_strain, axes)
      9 def _strain_axes(
     10     structure: Atoms, volume_strain: float, axes: tuple[str, str, str] = ("x", "y", "z")
     11 ) -> Atoms:
     12     """
     13     Strain box along given axes to achieve given *volumetric* strain.
     14 
     15     Returns a copy.
     16     """
---> 17     axes = np.array([a in axes for a in ("x", "y", "z")])
     18     num_axes = sum(axes)
     19     # formula calculates the strain along each axis to achieve the overall volumetric strain
     20     # beware that: (1+e)**x - 1 != e**x
File /usr/share/miniconda3/envs/my-env/lib/python3.10/site-packages/atomistics/workflows/evcurve/workflow.py:17, in <listcomp>(.0)
      9 def _strain_axes(
     10     structure: Atoms, volume_strain: float, axes: tuple[str, str, str] = ("x", "y", "z")
     11 ) -> Atoms:
     12     """
     13     Strain box along given axes to achieve given *volumetric* strain.
     14 
     15     Returns a copy.
     16     """
---> 17     axes = np.array([a in axes for a in ("x", "y", "z")])
     18     num_axes = sum(axes)
     19     # formula calculates the strain along each axis to achieve the overall volumetric strain
     20     # beware that: (1+e)**x - 1 != e**x
TypeError: argument of type 'numpy.float64' is not iterable

@jan-janssen
Copy link
Member Author

This seems to be related to switching from lists like ['x', 'y', 'z'] to tuples ('x', 'y', 'z'). pyiron/atomistics#63

@coveralls
Copy link

coveralls commented Nov 23, 2023

Pull Request Test Coverage Report for Build 6966695654

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 68.273%

Totals Coverage Status
Change from base Build 6949127611: 0.0%
Covered Lines: 10738
Relevant Lines: 15728

💛 - Coveralls

@jan-janssen jan-janssen merged commit 4703907 into main Nov 23, 2023
24 checks passed
@delete-merged-branch delete-merged-branch bot deleted the atomistics branch November 23, 2023 07:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants