kim-tools 0.2.1__py3-none-any.whl → 0.2.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
kim_tools/__init__.py CHANGED
@@ -1,4 +1,4 @@
1
- __version__ = "0.2.1"
1
+ __version__ = "0.2.2"
2
2
 
3
3
  from .aflow_util import *
4
4
  from .aflow_util import __all__ as aflow_all
@@ -1426,7 +1426,11 @@ class AFLOW:
1426
1426
  return equation_sets
1427
1427
 
1428
1428
  def solve_for_params_of_known_prototype(
1429
- self, atoms: Atoms, prototype_label: str, max_resid: float = 1e-5
1429
+ self,
1430
+ atoms: Atoms,
1431
+ prototype_label: str,
1432
+ max_resid: float = 1e-5,
1433
+ cell_rtol: float = 0.01,
1430
1434
  ) -> List[float]:
1431
1435
  """
1432
1436
  Given an Atoms object that is a primitive cell of its Bravais lattice as
@@ -1451,6 +1455,8 @@ class AFLOW:
1451
1455
  max_resid:
1452
1456
  Maximum residual allowed when attempting to match the fractional
1453
1457
  positions of the atoms to the crystallographic equations
1458
+ cell_rtol:
1459
+ Relative tolerance on cell lengths and angles
1454
1460
 
1455
1461
  Returns:
1456
1462
  List of free parameters that will regenerate `atoms` (up to permutations,
@@ -1649,7 +1655,11 @@ class AFLOW:
1649
1655
  # The internal shift may have taken us to an internal parameter
1650
1656
  # solution that represents a rotation, so we need to check
1651
1657
  if self.confirm_unrotated_prototype_designation(
1652
- atoms, species, prototype_label, candidate_prototype_param_values
1658
+ atoms,
1659
+ species,
1660
+ prototype_label,
1661
+ candidate_prototype_param_values,
1662
+ cell_rtol,
1653
1663
  ):
1654
1664
  logger.info(
1655
1665
  f"Found set of parameters for prototype {prototype_label} "
@@ -1679,8 +1689,7 @@ class AFLOW:
1679
1689
  test_atoms: Atoms,
1680
1690
  ref_atoms: Atoms,
1681
1691
  sgnum: Union[int, str],
1682
- rtol: float = 1.0e-4,
1683
- atol: float = 1.0e-8,
1692
+ rtol: float = 0.01,
1684
1693
  ) -> bool:
1685
1694
  """
1686
1695
  Check whether `test_atoms` and `reference_atoms` are unrotated as follows:
@@ -1703,12 +1712,10 @@ class AFLOW:
1703
1712
  sgnum:
1704
1713
  Space group number
1705
1714
  rtol:
1706
- Parameter to pass to :func:`numpy.allclose` for comparing cell params
1707
- atol:
1708
- Parameter to pass to :func:`numpy.allclose` for comparing cell params
1715
+ Parameter to pass to :func:`numpy.allclose` for comparing cell params.
1709
1716
  """
1710
1717
  if not np.allclose(
1711
- ref_atoms.cell.cellpar(), test_atoms.cell.cellpar(), atol=atol, rtol=rtol
1718
+ ref_atoms.cell.cellpar(), test_atoms.cell.cellpar(), rtol=rtol
1712
1719
  ):
1713
1720
  logger.info(
1714
1721
  "Cell lengths and angles do not match.\n"
@@ -1750,8 +1757,7 @@ class AFLOW:
1750
1757
  species: List[str],
1751
1758
  prototype_label: str,
1752
1759
  parameter_values: List[float],
1753
- rtol: float = 1.0e-4,
1754
- atol: float = 1.0e-8,
1760
+ rtol: float = 0.01,
1755
1761
  ) -> bool:
1756
1762
  """
1757
1763
  Check whether the provided prototype designation recreates ``reference_atoms``
@@ -1775,8 +1781,6 @@ class AFLOW:
1775
1781
  The free parameters of the AFLOW prototype designation
1776
1782
  rtol:
1777
1783
  Parameter to pass to :func:`numpy.allclose` for comparing cell params
1778
- atol:
1779
- Parameter to pass to :func:`numpy.allclose` for comparing cell params
1780
1784
 
1781
1785
  Returns:
1782
1786
  Whether or not the crystals match
@@ -1792,5 +1796,4 @@ class AFLOW:
1792
1796
  reference_atoms,
1793
1797
  get_space_group_number_from_prototype(prototype_label),
1794
1798
  rtol,
1795
- atol,
1796
1799
  )
@@ -1219,7 +1219,7 @@ class SingleCrystalTestDriver(KIMTestDriver):
1219
1219
  logger.info(msg)
1220
1220
 
1221
1221
  def _update_nominal_parameter_values(
1222
- self, atoms: Atoms, max_resid: float = 1e-5
1222
+ self, atoms: Atoms, max_resid: float = 1e-5, cell_rtol: float = 0.01
1223
1223
  ) -> None:
1224
1224
  """
1225
1225
  Update the nominal parameter values of the nominal crystal structure from the
@@ -1251,6 +1251,8 @@ class SingleCrystalTestDriver(KIMTestDriver):
1251
1251
  max_resid:
1252
1252
  Maximum residual allowed when attempting to match the fractional
1253
1253
  positions of the atoms to the crystallographic equations
1254
+ cell_rtol:
1255
+ Relative tolerance on cell lengths and angles
1254
1256
 
1255
1257
  Raises:
1256
1258
  AFLOW.FailedToMatchException:
@@ -1269,6 +1271,7 @@ class SingleCrystalTestDriver(KIMTestDriver):
1269
1271
  "source-value"
1270
1272
  ],
1271
1273
  max_resid=max_resid,
1274
+ cell_rtol=cell_rtol,
1272
1275
  )
1273
1276
  except (AFLOW.FailedToMatchException, AFLOW.ChangedSymmetryException) as e:
1274
1277
  raise type(e)(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: kim-tools
3
- Version: 0.2.1
3
+ Version: 0.2.2
4
4
  Summary: Base classes and helper routines for writing KIM Tests
5
5
  Author-email: ilia Nikiforov <nikif002@umn.edu>, Ellad Tadmor <tadmor@umn.edu>, Claire Waters <bwaters@umn.edu>, "Daniel S. Karls" <karl0100umn@gmail.com>, Matt Bierbaum <matt.bierbaum@gmail.com>, Eric Fuemmeler <efuemmel@umn.edu>
6
6
  Maintainer-email: ilia Nikiforov <nikif002@umn.edu>
@@ -1,7 +1,7 @@
1
- kim_tools/__init__.py,sha256=-dcfQfnIcs043nxVvh5sJHOkRySpNLwUf_MxHxwH2B4,433
1
+ kim_tools/__init__.py,sha256=gGt0sG7foY9MROLXGAYUkxV8GdwEulr_PS5wMm06mcM,433
2
2
  kim_tools/kimunits.py,sha256=jOxBv9gRVhxPE6ygAIUxOzCAfPI6tT6sBaF_FNl9m-M,5387
3
3
  kim_tools/aflow_util/__init__.py,sha256=lJnQ8fZCma80QVRQeKvY4MQ87oCWu-9KATV3dKJfpDc,80
4
- kim_tools/aflow_util/core.py,sha256=-UOiEHHA_3Bcvl49OIwnlQCl0ddN2KWdmNEZ2M9MlW4,72271
4
+ kim_tools/aflow_util/core.py,sha256=57K2G1jGgJhUA312RkWnhb3MOmlo9B5DdenNb_dIkzc,72206
5
5
  kim_tools/aflow_util/data/README_PROTO.TXT,sha256=bTpcd8GHOkpcQn6YUZzqKhiTytwSDpkgu4boeoogT38,447851
6
6
  kim_tools/ase/__init__.py,sha256=1i6ko5tNr0VZC3T7hoEzq4fnSU0DdxNpxXcSaWMcJWc,76
7
7
  kim_tools/ase/core.py,sha256=d6eOu_HSxVr-ae0TSEbY4HKdePxhNu3yv8NN9VDl-BA,30256
@@ -14,11 +14,11 @@ kim_tools/symmetry_util/data/wyck_pos_xform_under_normalizer.json,sha256=6g1YuYh
14
14
  kim_tools/symmetry_util/data/wyckoff_multiplicities.json,sha256=qG2RPBd_-ejDIfz-E4ZhkHyRpIboxRy7oiXkdDf5Eg8,32270
15
15
  kim_tools/symmetry_util/data/wyckoff_sets.json,sha256=f5ZpHKDHo6_JWki1b7KUGoYLlhU-44Qikw_-PtbLssw,9248
16
16
  kim_tools/test_driver/__init__.py,sha256=KOiceeZNqkfrgZ66CiRiUdniceDrCmmDXQkOw0wXaCQ,92
17
- kim_tools/test_driver/core.py,sha256=7l_fnLXNYNLuROY3b1vbqIA_715acaBbQGjS3PXdXB8,78538
17
+ kim_tools/test_driver/core.py,sha256=bA1tZPM3dES5PZSanN_xPC-SApSB1usO10EvoIq8EgY,78685
18
18
  kim_tools/vc/__init__.py,sha256=zXjhxXCKVMLBMXXWYG3if7VOpBnsFrn_RjVpnohDm5c,74
19
19
  kim_tools/vc/core.py,sha256=BIjzEExnQAL2S90a_npptRm3ACqAo4fZBtvTDBMWMdw,13963
20
- kim_tools-0.2.1.dist-info/licenses/LICENSE.CDDL,sha256=I2luEED_SHjuZ01B4rYG-AF_135amL24JpHvZ1Jhqe8,16373
21
- kim_tools-0.2.1.dist-info/METADATA,sha256=kQVhy8AzLH5-Oa8s0NEPdzgVnmjkfKBLMcOgKL2u02g,1460
22
- kim_tools-0.2.1.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
23
- kim_tools-0.2.1.dist-info/top_level.txt,sha256=w_YCpJ5ERigj9te74ln7k64tqj1VumOzM_s9dsalIWY,10
24
- kim_tools-0.2.1.dist-info/RECORD,,
20
+ kim_tools-0.2.2.dist-info/licenses/LICENSE.CDDL,sha256=I2luEED_SHjuZ01B4rYG-AF_135amL24JpHvZ1Jhqe8,16373
21
+ kim_tools-0.2.2.dist-info/METADATA,sha256=3OJoiiqV0-dLI_4hq--8wWF5BcedispUTMgZ1Z4ieR8,1460
22
+ kim_tools-0.2.2.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
23
+ kim_tools-0.2.2.dist-info/top_level.txt,sha256=w_YCpJ5ERigj9te74ln7k64tqj1VumOzM_s9dsalIWY,10
24
+ kim_tools-0.2.2.dist-info/RECORD,,