kim-tools 0.3.4__py3-none-any.whl → 0.3.5__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 +1 -1
- kim_tools/ase/core.py +8 -5
- kim_tools/test_driver/core.py +18 -0
- {kim_tools-0.3.4.dist-info → kim_tools-0.3.5.dist-info}/METADATA +1 -1
- {kim_tools-0.3.4.dist-info → kim_tools-0.3.5.dist-info}/RECORD +8 -8
- {kim_tools-0.3.4.dist-info → kim_tools-0.3.5.dist-info}/WHEEL +0 -0
- {kim_tools-0.3.4.dist-info → kim_tools-0.3.5.dist-info}/licenses/LICENSE.CDDL +0 -0
- {kim_tools-0.3.4.dist-info → kim_tools-0.3.5.dist-info}/top_level.txt +0 -0
kim_tools/__init__.py
CHANGED
kim_tools/ase/core.py
CHANGED
@@ -208,7 +208,7 @@ def randomize_positions(atoms, pert_amp, seed=None):
|
|
208
208
|
|
209
209
|
|
210
210
|
################################################################################
|
211
|
-
def get_isolated_energy_per_atom(model: Union[str, Calculator], symbol):
|
211
|
+
def get_isolated_energy_per_atom(model: Union[str, Calculator], symbol: str) -> float:
|
212
212
|
"""
|
213
213
|
Construct a non-periodic cell containing a single atom and compute its energy.
|
214
214
|
|
@@ -238,10 +238,13 @@ def get_isolated_energy_per_atom(model: Union[str, Calculator], symbol):
|
|
238
238
|
)
|
239
239
|
single_atom.calc = calc
|
240
240
|
energy_per_atom = single_atom.get_potential_energy()
|
241
|
-
if
|
242
|
-
|
243
|
-
if
|
244
|
-
calc
|
241
|
+
# if we are attaching an existing LAMMPS calculator to an atoms object,
|
242
|
+
# we can't delete it. Only do so if we are making a new one from a KIM ID.
|
243
|
+
if isinstance(model, str):
|
244
|
+
if hasattr(calc, "clean"):
|
245
|
+
calc.clean()
|
246
|
+
if hasattr(calc, "__del__"):
|
247
|
+
calc.__del__()
|
245
248
|
del single_atom
|
246
249
|
return energy_per_atom
|
247
250
|
|
kim_tools/test_driver/core.py
CHANGED
@@ -66,6 +66,7 @@ from ..aflow_util import (
|
|
66
66
|
prototype_labels_are_equivalent,
|
67
67
|
)
|
68
68
|
from ..aflow_util.core import AFLOW_EXECUTABLE
|
69
|
+
from ..ase import get_isolated_energy_per_atom
|
69
70
|
from ..kimunits import convert_list, convert_units
|
70
71
|
from ..symmetry_util import (
|
71
72
|
cartesian_rotation_is_in_point_group,
|
@@ -746,6 +747,23 @@ class KIMTestDriver(ABC):
|
|
746
747
|
self.__output_property_instances, f
|
747
748
|
) # serialize the dictionary to string first
|
748
749
|
|
750
|
+
def get_isolated_energy_per_atom(self, symbol: str) -> float:
|
751
|
+
"""
|
752
|
+
Construct a non-periodic cell containing a single atom and compute its energy.
|
753
|
+
|
754
|
+
Args
|
755
|
+
symbol:
|
756
|
+
The chemical species
|
757
|
+
|
758
|
+
Returns:
|
759
|
+
The isolated energy of a single atom
|
760
|
+
"""
|
761
|
+
try:
|
762
|
+
model = self.kim_model_name
|
763
|
+
except self.NonKIMModelError:
|
764
|
+
model = self._calc
|
765
|
+
return get_isolated_energy_per_atom(model=model, symbol=symbol)
|
766
|
+
|
749
767
|
|
750
768
|
def _add_common_crystal_genome_keys_to_current_property_instance(
|
751
769
|
property_instances: str,
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: kim-tools
|
3
|
-
Version: 0.3.
|
3
|
+
Version: 0.3.5
|
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>, Philipp Hoellmer <ph2484@nyu.edu>, Guanming Zhang <gz2241@nyu.edu>, Tom Egg <tje3676@nyu.edu>
|
6
6
|
Maintainer-email: ilia Nikiforov <nikif002@umn.edu>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
kim_tools/__init__.py,sha256=
|
1
|
+
kim_tools/__init__.py,sha256=y8h76B1TbTZ5GZBpVnnyhzD06UpiOrAN5xffFW2TfLI,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
4
|
kim_tools/aflow_util/core.py,sha256=zi69wMcgkcYBTKbc-OvKlMIzUtgphO57yBA8LB7_5wc,77484
|
@@ -2002,7 +2002,7 @@ kim_tools/aflow_util/aflow_prototype_encyclopedia/data/A_tP4_129_ac-001/info.jso
|
|
2002
2002
|
kim_tools/aflow_util/aflow_prototype_encyclopedia/data/A_tP4_136_f-001/info.json,sha256=5_xlFGOov7VoFwzhp7JtltRnWiAFfgpwF5qc3kMSAjQ,1278
|
2003
2003
|
kim_tools/aflow_util/aflow_prototype_encyclopedia/data/A_tP50_134_a2m2n-001/info.json,sha256=K601zsKLpvPLIaK17bEiNGIQJYJDvIby1lIJ3P9Ze6E,1258
|
2004
2004
|
kim_tools/ase/__init__.py,sha256=1i6ko5tNr0VZC3T7hoEzq4fnSU0DdxNpxXcSaWMcJWc,76
|
2005
|
-
kim_tools/ase/core.py,sha256=
|
2005
|
+
kim_tools/ase/core.py,sha256=odRuHQGZl-pcRtkdYvG31_3kW6nt3qwHdKvAOJ-ifwM,31207
|
2006
2006
|
kim_tools/symmetry_util/__init__.py,sha256=uu-ZSUDUTe2P81rkAS3tXverx31s_uZ3wL4SD_dn5aI,86
|
2007
2007
|
kim_tools/symmetry_util/core.py,sha256=HfDy1CwNWUZIkb4cs3ebUDgWjtt4jRSkBKgGEnlkjuI,30888
|
2008
2008
|
kim_tools/symmetry_util/data/possible_primitive_shifts.json,sha256=4OVNgn3NnykgGlYiAcecERmVWiIZFrmP2LZI3ml_Sh0,25010
|
@@ -2012,11 +2012,11 @@ kim_tools/symmetry_util/data/wyck_pos_xform_under_normalizer.json,sha256=6g1YuYh
|
|
2012
2012
|
kim_tools/symmetry_util/data/wyckoff_multiplicities.json,sha256=qG2RPBd_-ejDIfz-E4ZhkHyRpIboxRy7oiXkdDf5Eg8,32270
|
2013
2013
|
kim_tools/symmetry_util/data/wyckoff_sets.json,sha256=f5ZpHKDHo6_JWki1b7KUGoYLlhU-44Qikw_-PtbLssw,9248
|
2014
2014
|
kim_tools/test_driver/__init__.py,sha256=KOiceeZNqkfrgZ66CiRiUdniceDrCmmDXQkOw0wXaCQ,92
|
2015
|
-
kim_tools/test_driver/core.py,sha256=
|
2015
|
+
kim_tools/test_driver/core.py,sha256=8FbOhQRu38zX48CBgFgMrB2tLLSXUsbrXl9dYx5CVHw,90320
|
2016
2016
|
kim_tools/vc/__init__.py,sha256=zXjhxXCKVMLBMXXWYG3if7VOpBnsFrn_RjVpnohDm5c,74
|
2017
2017
|
kim_tools/vc/core.py,sha256=BIjzEExnQAL2S90a_npptRm3ACqAo4fZBtvTDBMWMdw,13963
|
2018
|
-
kim_tools-0.3.
|
2019
|
-
kim_tools-0.3.
|
2020
|
-
kim_tools-0.3.
|
2021
|
-
kim_tools-0.3.
|
2022
|
-
kim_tools-0.3.
|
2018
|
+
kim_tools-0.3.5.dist-info/licenses/LICENSE.CDDL,sha256=I2luEED_SHjuZ01B4rYG-AF_135amL24JpHvZ1Jhqe8,16373
|
2019
|
+
kim_tools-0.3.5.dist-info/METADATA,sha256=YHR8cikv3dJ0DLWxltEXkNyDbHFJMMT5hullZnEvYvs,2032
|
2020
|
+
kim_tools-0.3.5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
2021
|
+
kim_tools-0.3.5.dist-info/top_level.txt,sha256=w_YCpJ5ERigj9te74ln7k64tqj1VumOzM_s9dsalIWY,10
|
2022
|
+
kim_tools-0.3.5.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|