Skip to content

Commit

Permalink
Fix issue19
Browse files Browse the repository at this point in the history
  • Loading branch information
adrybakov committed May 28, 2024
1 parent 664bf72 commit 4b79dfc
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 4 deletions.
5 changes: 5 additions & 0 deletions docs/source/release-notes/0.8.rst
Original file line number Diff line number Diff line change
Expand Up @@ -160,3 +160,8 @@ Hotfix for 0.8.11 (Missed imports).
------

Add the summary message to the :ref:`rad-identify-wannier-centres` script.

0.8.14
------

Resolve :issue:`19`
6 changes: 3 additions & 3 deletions radtools/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
"""


__version__ = "0.8.13"
__version__ = "0.8.14"
__doclink__ = "rad-tools.org"
__git_hash__ = "43a49a2aaa1472db5dd040fa5186cc293e9b7e45"
__release_date__ = "4 March 2024"
__git_hash__ = "664bf724a51d4e839ac3b4a820f3d7de9edb8fd4"
__release_date__ = "28 May 2024"


from . import (
Expand Down
22 changes: 21 additions & 1 deletion radtools/crystal/lattice.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ class Lattice:
"""

def __init__(self, *args, standardize=True, **kwargs) -> None:
self.eps_rel = REL_TOL
self._eps_rel = REL_TOL
self._cell = None
self._type = None
self._kpoints = None
Expand Down Expand Up @@ -728,6 +728,26 @@ def eps(self):

return self.eps_rel * abs(self.unit_cell_volume) ** (1 / 3.0)

@property
def eps_rel(self):
r"""
Relative epsilon
Returns
-------
eps_rel : float
"""

return eps_rel

@eps_rel.setter
def eps_rel(self, new_value):
try:
self.eps_rel = float(new_value)
except ValueError:
raise ValueError("Not a float")
self._type = None

def type(self, eps_rel=None):
r"""
Identify the lattice type.
Expand Down

0 comments on commit 4b79dfc

Please sign in to comment.