kim-tools 0.3.8__py3-none-any.whl → 0.3.10__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/aflow_util/core.py +22 -11
- kim_tools/test_driver/core.py +176 -65
- {kim_tools-0.3.8.dist-info → kim_tools-0.3.10.dist-info}/METADATA +1 -1
- {kim_tools-0.3.8.dist-info → kim_tools-0.3.10.dist-info}/RECORD +8 -8
- {kim_tools-0.3.8.dist-info → kim_tools-0.3.10.dist-info}/WHEEL +0 -0
- {kim_tools-0.3.8.dist-info → kim_tools-0.3.10.dist-info}/licenses/LICENSE.CDDL +0 -0
- {kim_tools-0.3.8.dist-info → kim_tools-0.3.10.dist-info}/top_level.txt +0 -0
kim_tools/__init__.py
CHANGED
kim_tools/aflow_util/core.py
CHANGED
@@ -1547,7 +1547,8 @@ class AFLOW:
|
|
1547
1547
|
cell_rtol: float = 0.01,
|
1548
1548
|
rot_rtol: float = 0.01,
|
1549
1549
|
rot_atol: float = 0.01,
|
1550
|
-
|
1550
|
+
match_library_proto: bool = True,
|
1551
|
+
) -> Union[List[float], Tuple[List[float], Optional[str]]]:
|
1551
1552
|
"""
|
1552
1553
|
Given an Atoms object that is a primitive cell of its Bravais lattice as
|
1553
1554
|
defined in doi.org/10.1016/j.commatsci.2017.01.017, and its presumed prototype
|
@@ -1584,12 +1585,16 @@ class AFLOW:
|
|
1584
1585
|
Parameter to pass to :func:`numpy.allclose` for compariong fractional
|
1585
1586
|
rotations. Default value chosen to be commensurate with AFLOW
|
1586
1587
|
default distance tolerance of 0.01*(NN distance)
|
1588
|
+
match_library_proto:
|
1589
|
+
Whether to attempt matching to library prototypes
|
1587
1590
|
|
1588
1591
|
Returns:
|
1589
1592
|
* List of free parameters that will regenerate `atoms` (up to permutations,
|
1590
1593
|
rotations, and translations) when paired with `prototype_label`
|
1591
|
-
*
|
1592
|
-
|
1594
|
+
* Additionally, if 'match_library_proto' is True (default):
|
1595
|
+
* Library prototype label from the AFLOW prototype encyclopedia, if any
|
1596
|
+
* Title of library prototype from the AFLOW prototype encyclopedia,
|
1597
|
+
if any
|
1593
1598
|
|
1594
1599
|
Raises:
|
1595
1600
|
AFLOW.ChangedSymmetryException:
|
@@ -1636,9 +1641,10 @@ class AFLOW:
|
|
1636
1641
|
"aflow_prototype_label"
|
1637
1642
|
]
|
1638
1643
|
|
1639
|
-
|
1640
|
-
|
1641
|
-
|
1644
|
+
if match_library_proto:
|
1645
|
+
library_prototype_label, short_name = (
|
1646
|
+
self.get_library_prototype_label_and_shortname_from_atoms(atoms)
|
1647
|
+
)
|
1642
1648
|
|
1643
1649
|
# NOTE: Because of below, this only works if the provided prototype label is
|
1644
1650
|
# correctly alphabetized. Change this?
|
@@ -1824,11 +1830,14 @@ class AFLOW:
|
|
1824
1830
|
f"Found set of parameters for prototype {prototype_label} "
|
1825
1831
|
"that is unrotated"
|
1826
1832
|
)
|
1827
|
-
|
1828
|
-
|
1829
|
-
|
1830
|
-
|
1831
|
-
|
1833
|
+
if match_library_proto:
|
1834
|
+
return (
|
1835
|
+
candidate_prototype_param_values,
|
1836
|
+
library_prototype_label,
|
1837
|
+
short_name,
|
1838
|
+
)
|
1839
|
+
else:
|
1840
|
+
return candidate_prototype_param_values
|
1832
1841
|
else:
|
1833
1842
|
logger.info(
|
1834
1843
|
f"Found set of parameters for prototype {prototype_label}, "
|
@@ -1902,7 +1911,9 @@ class AFLOW:
|
|
1902
1911
|
cell_lengths_and_angles = ref_atoms.cell.cellpar()
|
1903
1912
|
|
1904
1913
|
test_atoms_copy = test_atoms.copy()
|
1914
|
+
del test_atoms_copy.constraints
|
1905
1915
|
ref_atoms_copy = ref_atoms.copy()
|
1916
|
+
del ref_atoms_copy.constraints
|
1906
1917
|
|
1907
1918
|
test_atoms_copy.set_cell(
|
1908
1919
|
Cell.fromcellpar(cell_lengths_and_angles), scale_atoms=True
|
kim_tools/test_driver/core.py
CHANGED
@@ -30,6 +30,7 @@
|
|
30
30
|
Helper classes for KIM Test Drivers
|
31
31
|
|
32
32
|
"""
|
33
|
+
import glob
|
33
34
|
import json
|
34
35
|
import logging
|
35
36
|
import os
|
@@ -64,6 +65,7 @@ from kim_query import raw_query
|
|
64
65
|
from ..aflow_util import (
|
65
66
|
AFLOW,
|
66
67
|
get_space_group_number_from_prototype,
|
68
|
+
get_stoich_reduced_list_from_prototype,
|
67
69
|
prototype_labels_are_equivalent,
|
68
70
|
)
|
69
71
|
from ..aflow_util.core import AFLOW_EXECUTABLE, get_atom_indices_for_each_wyckoff_orb
|
@@ -139,8 +141,8 @@ def minimize_wrapper(
|
|
139
141
|
steps: int = MAXSTEPS_INITIAL,
|
140
142
|
variable_cell: bool = True,
|
141
143
|
logfile: Optional[Union[str, IO]] = "kim-tools.log",
|
142
|
-
algorithm: Optimizer = LBFGSLineSearch,
|
143
|
-
cell_filter: UnitCellFilter = FrechetCellFilter,
|
144
|
+
algorithm: type[Optimizer] = LBFGSLineSearch,
|
145
|
+
cell_filter: type[UnitCellFilter] = FrechetCellFilter,
|
144
146
|
fix_symmetry: Union[bool, FixSymmetry] = False,
|
145
147
|
opt_kwargs: Dict = {},
|
146
148
|
flt_kwargs: Dict = {},
|
@@ -191,12 +193,13 @@ def minimize_wrapper(
|
|
191
193
|
Returns:
|
192
194
|
Whether the minimization succeeded
|
193
195
|
"""
|
196
|
+
existing_constraints = atoms.constraints
|
194
197
|
if fix_symmetry is not False:
|
195
198
|
if fix_symmetry is True:
|
196
199
|
symmetry = FixSymmetry(atoms)
|
197
200
|
else:
|
198
201
|
symmetry = fix_symmetry
|
199
|
-
atoms.set_constraint(symmetry)
|
202
|
+
atoms.set_constraint([symmetry] + existing_constraints)
|
200
203
|
if variable_cell:
|
201
204
|
supercell_wrapped = cell_filter(atoms, **flt_kwargs)
|
202
205
|
opt = algorithm(supercell_wrapped, logfile=logfile, **opt_kwargs)
|
@@ -228,7 +231,7 @@ def minimize_wrapper(
|
|
228
231
|
+ " steps."
|
229
232
|
)
|
230
233
|
|
231
|
-
|
234
|
+
atoms.set_constraint(existing_constraints)
|
232
235
|
|
233
236
|
if minimization_stalled or iteration_limits_reached:
|
234
237
|
try:
|
@@ -242,7 +245,7 @@ def minimize_wrapper(
|
|
242
245
|
"trying to evaluate final forces and stress:"
|
243
246
|
)
|
244
247
|
logger.info(repr(e))
|
245
|
-
|
248
|
+
return False
|
246
249
|
else:
|
247
250
|
return True
|
248
251
|
|
@@ -769,17 +772,25 @@ class KIMTestDriver(ABC):
|
|
769
772
|
def write_property_instances_to_file(self, filename="output/results.edn") -> None:
|
770
773
|
"""
|
771
774
|
Write internal property instances (possibly accumulated over several calls to
|
772
|
-
the Test Driver) to a file at the requested path.
|
773
|
-
the same directory.
|
775
|
+
the Test Driver) to a file at the requested path.
|
774
776
|
|
775
777
|
Args:
|
776
778
|
filename: path to write the file
|
777
779
|
"""
|
778
|
-
|
779
|
-
|
780
|
-
|
781
|
-
|
782
|
-
|
780
|
+
kim_property_dump(self._get_serialized_property_instances(), filename)
|
781
|
+
filename_parent = Path(filename).parent.resolve()
|
782
|
+
if filename_parent != Path("output").resolve():
|
783
|
+
for file_in_output in glob.glob("output/*"):
|
784
|
+
file_in_output_name = str(Path(file_in_output).name)
|
785
|
+
for instance in self.property_instances:
|
786
|
+
for key in instance:
|
787
|
+
if isinstance(instance[key], dict):
|
788
|
+
if file_in_output_name == instance[key]["source-value"]:
|
789
|
+
shutil.move(file_in_output, filename_parent)
|
790
|
+
elif isinstance(instance[key]["source-value"], list):
|
791
|
+
for file_in_property in instance[key]["source-value"]:
|
792
|
+
if file_in_output_name == file_in_property:
|
793
|
+
shutil.move(file_in_output, filename_parent)
|
783
794
|
|
784
795
|
def get_isolated_energy_per_atom(self, symbol: str) -> float:
|
785
796
|
"""
|
@@ -814,6 +825,7 @@ def _add_common_crystal_genome_keys_to_current_property_instance(
|
|
814
825
|
temperature_unit: Optional[str] = "K",
|
815
826
|
crystal_genome_source_structure_id: Optional[List[List[str]]] = None,
|
816
827
|
aflow_executable: str = AFLOW_EXECUTABLE,
|
828
|
+
omit_keys: Optional[List[str]] = None,
|
817
829
|
) -> str:
|
818
830
|
"""
|
819
831
|
Write common Crystal Genome keys to the last element of ``property_instances``. See
|
@@ -827,19 +839,26 @@ def _add_common_crystal_genome_keys_to_current_property_instance(
|
|
827
839
|
The key will be added to the last dictionary in the list
|
828
840
|
aflow_executable:
|
829
841
|
Path to the AFLOW executable
|
842
|
+
omit_keys:
|
843
|
+
Which keys to omit writing
|
830
844
|
|
831
845
|
Returns:
|
832
846
|
Updated EDN-serialized list of property instances
|
833
847
|
"""
|
834
|
-
|
835
|
-
|
836
|
-
|
837
|
-
|
838
|
-
|
839
|
-
|
840
|
-
|
841
|
-
property_instances
|
842
|
-
|
848
|
+
if omit_keys is None:
|
849
|
+
omit_keys = []
|
850
|
+
if "prototype-label" not in omit_keys:
|
851
|
+
property_instances = _add_key_to_current_property_instance(
|
852
|
+
property_instances, "prototype-label", prototype_label
|
853
|
+
)
|
854
|
+
if "stoichiometric-species" not in omit_keys:
|
855
|
+
property_instances = _add_key_to_current_property_instance(
|
856
|
+
property_instances, "stoichiometric-species", stoichiometric_species
|
857
|
+
)
|
858
|
+
if "a" not in omit_keys:
|
859
|
+
property_instances = _add_key_to_current_property_instance(
|
860
|
+
property_instances, "a", a, a_unit
|
861
|
+
)
|
843
862
|
|
844
863
|
# get parameter names
|
845
864
|
aflow = AFLOW(aflow_executable=aflow_executable)
|
@@ -856,24 +875,28 @@ def _add_common_crystal_genome_keys_to_current_property_instance(
|
|
856
875
|
"Incorrect number of parameter_values (i.e. dimensionless parameters "
|
857
876
|
"besides a) for the provided prototype"
|
858
877
|
)
|
859
|
-
|
860
|
-
property_instances
|
861
|
-
|
862
|
-
|
863
|
-
|
864
|
-
|
878
|
+
if "parameter-names" not in omit_keys:
|
879
|
+
property_instances = _add_key_to_current_property_instance(
|
880
|
+
property_instances, "parameter-names", aflow_parameter_names[1:]
|
881
|
+
)
|
882
|
+
if "parameter-values" not in omit_keys:
|
883
|
+
property_instances = _add_key_to_current_property_instance(
|
884
|
+
property_instances, "parameter-values", parameter_values
|
885
|
+
)
|
865
886
|
|
866
887
|
if short_name is not None:
|
867
888
|
if not isinstance(short_name, list):
|
868
889
|
short_name = [short_name]
|
869
|
-
|
870
|
-
property_instances
|
871
|
-
|
890
|
+
if "short-name" not in omit_keys:
|
891
|
+
property_instances = _add_key_to_current_property_instance(
|
892
|
+
property_instances, "short-name", short_name
|
893
|
+
)
|
872
894
|
|
873
895
|
if library_prototype_label is not None:
|
874
|
-
|
875
|
-
property_instances
|
876
|
-
|
896
|
+
if "library-prototype-label" not in omit_keys:
|
897
|
+
property_instances = _add_key_to_current_property_instance(
|
898
|
+
property_instances, "library-prototype-label", library_prototype_label
|
899
|
+
)
|
877
900
|
|
878
901
|
if cell_cauchy_stress is not None:
|
879
902
|
if len(cell_cauchy_stress) != 6:
|
@@ -882,27 +905,30 @@ def _add_common_crystal_genome_keys_to_current_property_instance(
|
|
882
905
|
"order [xx, yy, zz, yz, xz, xy]"
|
883
906
|
)
|
884
907
|
if cell_cauchy_stress_unit is None:
|
885
|
-
raise
|
886
|
-
|
887
|
-
property_instances
|
888
|
-
|
889
|
-
|
890
|
-
|
891
|
-
|
908
|
+
raise KIMTestDriverError("Please provide a `cell_cauchy_stress_unit`")
|
909
|
+
if "cell-cauchy-stress" not in omit_keys:
|
910
|
+
property_instances = _add_key_to_current_property_instance(
|
911
|
+
property_instances,
|
912
|
+
"cell-cauchy-stress",
|
913
|
+
cell_cauchy_stress,
|
914
|
+
cell_cauchy_stress_unit,
|
915
|
+
)
|
892
916
|
|
893
917
|
if temperature is not None:
|
894
918
|
if temperature_unit is None:
|
895
|
-
raise
|
896
|
-
|
897
|
-
property_instances
|
898
|
-
|
919
|
+
raise KIMTestDriverError("Please provide a `temperature_unit`")
|
920
|
+
if "temperature" not in omit_keys:
|
921
|
+
property_instances = _add_key_to_current_property_instance(
|
922
|
+
property_instances, "temperature", temperature, temperature_unit
|
923
|
+
)
|
899
924
|
|
900
925
|
if crystal_genome_source_structure_id is not None:
|
901
|
-
|
902
|
-
property_instances
|
903
|
-
|
904
|
-
|
905
|
-
|
926
|
+
if "crystal-genome-source-structure-id" not in omit_keys:
|
927
|
+
property_instances = _add_key_to_current_property_instance(
|
928
|
+
property_instances,
|
929
|
+
"crystal-genome-source-structure-id",
|
930
|
+
crystal_genome_source_structure_id,
|
931
|
+
)
|
906
932
|
|
907
933
|
return property_instances
|
908
934
|
|
@@ -924,6 +950,7 @@ def _add_property_instance_and_common_crystal_genome_keys(
|
|
924
950
|
disclaimer: Optional[str] = None,
|
925
951
|
property_instances: Optional[str] = None,
|
926
952
|
aflow_executable: str = AFLOW_EXECUTABLE,
|
953
|
+
omit_keys: Optional[List[str]] = None,
|
927
954
|
) -> str:
|
928
955
|
"""
|
929
956
|
Initialize a new property instance to ``property_instances`` (an empty
|
@@ -946,6 +973,8 @@ def _add_property_instance_and_common_crystal_genome_keys(
|
|
946
973
|
A pre-existing EDN-serialized list of KIM Property instances to add to
|
947
974
|
aflow_executable:
|
948
975
|
Path to the AFLOW executable
|
976
|
+
omit_keys:
|
977
|
+
Which keys to omit writing
|
949
978
|
|
950
979
|
Returns:
|
951
980
|
Updated EDN-serialized list of property instances
|
@@ -968,6 +997,7 @@ def _add_property_instance_and_common_crystal_genome_keys(
|
|
968
997
|
cell_cauchy_stress_unit=cell_cauchy_stress_unit,
|
969
998
|
cell_cauchy_stress=cell_cauchy_stress,
|
970
999
|
aflow_executable=aflow_executable,
|
1000
|
+
omit_keys=omit_keys,
|
971
1001
|
)
|
972
1002
|
|
973
1003
|
|
@@ -1301,17 +1331,28 @@ class SingleCrystalTestDriver(KIMTestDriver):
|
|
1301
1331
|
crystal_structure = get_crystal_structure_from_atoms(
|
1302
1332
|
atoms=material, aflow_executable=self.aflow_executable
|
1303
1333
|
)
|
1334
|
+
aflow = AFLOW()
|
1335
|
+
atoms_rebuilt = get_atoms_from_crystal_structure(crystal_structure)
|
1336
|
+
_, self.__input_rotation, _, _ = (
|
1337
|
+
aflow.get_basistransformation_rotation_originshift_atom_map_from_atoms(
|
1338
|
+
atoms_rebuilt,
|
1339
|
+
material,
|
1340
|
+
)
|
1341
|
+
)
|
1304
1342
|
msg = (
|
1305
|
-
"Rebuilding
|
1343
|
+
"Rebuilding Atoms object in a standard setting defined by "
|
1306
1344
|
"doi.org/10.1016/j.commatsci.2017.01.017. See log file or computed "
|
1307
1345
|
"properties for the (possibly re-oriented) primitive cell that "
|
1308
|
-
"computations will be based on."
|
1346
|
+
"computations will be based on. To obtain the rotation of this "
|
1347
|
+
"cell relative to the Atoms object you provided, use "
|
1348
|
+
f"{self.__class__.__name__}.get_input_rotation()"
|
1309
1349
|
)
|
1310
1350
|
logger.info(msg)
|
1311
1351
|
print()
|
1312
1352
|
print(msg)
|
1313
1353
|
print()
|
1314
1354
|
else:
|
1355
|
+
self.__input_rotation = None
|
1315
1356
|
crystal_structure = material
|
1316
1357
|
|
1317
1358
|
# Pop the temperature and stress keys in case they came along with a query
|
@@ -1365,6 +1406,7 @@ class SingleCrystalTestDriver(KIMTestDriver):
|
|
1365
1406
|
cell_rtol: float = 0.01,
|
1366
1407
|
rot_rtol: float = 0.01,
|
1367
1408
|
rot_atol: float = 0.01,
|
1409
|
+
match_library_proto: bool = True,
|
1368
1410
|
) -> None:
|
1369
1411
|
"""
|
1370
1412
|
Update the nominal parameter values of the nominal crystal structure from the
|
@@ -1409,6 +1451,8 @@ class SingleCrystalTestDriver(KIMTestDriver):
|
|
1409
1451
|
Parameter to pass to :func:`numpy.allclose` for compariong fractional
|
1410
1452
|
rotations. Default value chosen to be commensurate with AFLOW
|
1411
1453
|
default distance tolerance of 0.01*(NN distance)
|
1454
|
+
match_library_proto:
|
1455
|
+
Whether to match to library prototypes
|
1412
1456
|
|
1413
1457
|
Raises:
|
1414
1458
|
AFLOW.FailedToMatchException:
|
@@ -1421,18 +1465,29 @@ class SingleCrystalTestDriver(KIMTestDriver):
|
|
1421
1465
|
"""
|
1422
1466
|
aflow = AFLOW(aflow_executable=self.aflow_executable)
|
1423
1467
|
try:
|
1424
|
-
|
1425
|
-
|
1468
|
+
if match_library_proto:
|
1469
|
+
(aflow_parameter_values, library_prototype_label, short_name) = (
|
1470
|
+
aflow.solve_for_params_of_known_prototype(
|
1471
|
+
atoms=atoms,
|
1472
|
+
prototype_label=self.get_nominal_prototype_label(),
|
1473
|
+
max_resid=max_resid,
|
1474
|
+
cell_rtol=cell_rtol,
|
1475
|
+
rot_rtol=rot_rtol,
|
1476
|
+
rot_atol=rot_atol,
|
1477
|
+
)
|
1478
|
+
)
|
1479
|
+
else:
|
1480
|
+
aflow_parameter_values = aflow.solve_for_params_of_known_prototype(
|
1426
1481
|
atoms=atoms,
|
1427
|
-
prototype_label=self.
|
1428
|
-
"prototype-label"
|
1429
|
-
]["source-value"],
|
1482
|
+
prototype_label=self.get_nominal_prototype_label(),
|
1430
1483
|
max_resid=max_resid,
|
1431
1484
|
cell_rtol=cell_rtol,
|
1432
1485
|
rot_rtol=rot_rtol,
|
1433
1486
|
rot_atol=rot_atol,
|
1487
|
+
match_library_proto=False,
|
1434
1488
|
)
|
1435
|
-
|
1489
|
+
library_prototype_label = None
|
1490
|
+
short_name = None
|
1436
1491
|
except (AFLOW.FailedToMatchException, AFLOW.ChangedSymmetryException) as e:
|
1437
1492
|
raise type(e)(
|
1438
1493
|
"Encountered an error that MAY be the result of the nominal crystal "
|
@@ -1526,6 +1581,7 @@ class SingleCrystalTestDriver(KIMTestDriver):
|
|
1526
1581
|
stress_unit: Optional[str] = None,
|
1527
1582
|
temp_unit: str = "K",
|
1528
1583
|
disclaimer: Optional[str] = None,
|
1584
|
+
omit_keys: Optional[List[str]] = None,
|
1529
1585
|
) -> None:
|
1530
1586
|
"""
|
1531
1587
|
Initialize a new property instance to ``self.property_instances``. It will
|
@@ -1556,6 +1612,8 @@ class SingleCrystalTestDriver(KIMTestDriver):
|
|
1556
1612
|
disclaimer:
|
1557
1613
|
An optional disclaimer commenting on the applicability of this result,
|
1558
1614
|
e.g. "This relaxation did not reach the desired tolerance."
|
1615
|
+
omit_keys:
|
1616
|
+
Which keys to omit writing
|
1559
1617
|
"""
|
1560
1618
|
crystal_structure = self.__nominal_crystal_structure_npt
|
1561
1619
|
|
@@ -1654,17 +1712,22 @@ class SingleCrystalTestDriver(KIMTestDriver):
|
|
1654
1712
|
disclaimer=disclaimer,
|
1655
1713
|
property_instances=super()._get_serialized_property_instances(),
|
1656
1714
|
aflow_executable=self.aflow_executable,
|
1715
|
+
omit_keys=omit_keys,
|
1657
1716
|
)
|
1658
1717
|
)
|
1659
1718
|
|
1660
|
-
|
1661
|
-
|
1662
|
-
|
1663
|
-
|
1664
|
-
|
1665
|
-
|
1666
|
-
|
1667
|
-
|
1719
|
+
if omit_keys is None:
|
1720
|
+
omit_keys = []
|
1721
|
+
if "coordinates-file" not in omit_keys:
|
1722
|
+
self.__add_poscar_to_curr_prop_inst(
|
1723
|
+
"primitive", "instance.poscar", "coordinates-file"
|
1724
|
+
)
|
1725
|
+
if "coordinates-file-conventional" not in omit_keys:
|
1726
|
+
self.__add_poscar_to_curr_prop_inst(
|
1727
|
+
"conventional",
|
1728
|
+
"conventional.instance.poscar",
|
1729
|
+
"coordinates-file-conventional",
|
1730
|
+
)
|
1668
1731
|
|
1669
1732
|
def _get_temperature(self, unit: str = "K") -> float:
|
1670
1733
|
"""
|
@@ -1900,6 +1963,42 @@ class SingleCrystalTestDriver(KIMTestDriver):
|
|
1900
1963
|
"source-value"
|
1901
1964
|
]
|
1902
1965
|
|
1966
|
+
def get_nominal_space_group_number(self) -> int:
|
1967
|
+
return get_space_group_number_from_prototype(self.get_nominal_prototype_label())
|
1968
|
+
|
1969
|
+
def get_nominal_stoichiometric_species(self) -> List[str]:
|
1970
|
+
return self._get_nominal_crystal_structure_npt()["stoichiometric-species"][
|
1971
|
+
"source-value"
|
1972
|
+
]
|
1973
|
+
|
1974
|
+
def get_nominal_stoichiometry(self) -> List[int]:
|
1975
|
+
return get_stoich_reduced_list_from_prototype(
|
1976
|
+
self.get_nominal_prototype_label()
|
1977
|
+
)
|
1978
|
+
|
1979
|
+
def get_nominal_a(self) -> float:
|
1980
|
+
return self._get_nominal_crystal_structure_npt()["a"]["source-value"]
|
1981
|
+
|
1982
|
+
def get_nominal_parameter_names(self) -> List[str]:
|
1983
|
+
return _get_optional_source_value(
|
1984
|
+
self._get_nominal_crystal_structure_npt(), "parameter-names"
|
1985
|
+
)
|
1986
|
+
|
1987
|
+
def get_nominal_parameter_values(self) -> List[float]:
|
1988
|
+
return _get_optional_source_value(
|
1989
|
+
self._get_nominal_crystal_structure_npt(), "parameter-values"
|
1990
|
+
)
|
1991
|
+
|
1992
|
+
def get_nominal_short_name(self) -> List[str]:
|
1993
|
+
return _get_optional_source_value(
|
1994
|
+
self._get_nominal_crystal_structure_npt(), "short-name"
|
1995
|
+
)
|
1996
|
+
|
1997
|
+
def get_nominal_library_prototype_label(self) -> str:
|
1998
|
+
return _get_optional_source_value(
|
1999
|
+
self._get_nominal_crystal_structure_npt(), "library-prototype-label"
|
2000
|
+
)
|
2001
|
+
|
1903
2002
|
def get_atom_indices_for_each_wyckoff_orb(self) -> List[Dict]:
|
1904
2003
|
"""
|
1905
2004
|
Get a list of dictionaries containing the atom indices of each Wyckoff
|
@@ -1911,6 +2010,18 @@ class SingleCrystalTestDriver(KIMTestDriver):
|
|
1911
2010
|
"""
|
1912
2011
|
return get_atom_indices_for_each_wyckoff_orb(self.get_nominal_prototype_label())
|
1913
2012
|
|
2013
|
+
def get_input_rotation(self) -> Optional[npt.ArrayLike]:
|
2014
|
+
"""
|
2015
|
+
Returns:
|
2016
|
+
If the Test Driver was called with an Atoms object, the nominal crystal
|
2017
|
+
structure may be rotated w.r.t. the input.
|
2018
|
+
This returns the Cartesian rotation to transform the Atoms input to the
|
2019
|
+
internal nominal crystal structure. I.e., if you want to get computed
|
2020
|
+
tensor properties in the same orientation as your input, you should
|
2021
|
+
rotate the reported tensors by the transpose of this rotation.
|
2022
|
+
"""
|
2023
|
+
return self.__input_rotation
|
2024
|
+
|
1914
2025
|
|
1915
2026
|
def query_crystal_structures(
|
1916
2027
|
stoichiometric_species: List[str],
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: kim-tools
|
3
|
-
Version: 0.3.
|
3
|
+
Version: 0.3.10
|
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,7 +1,7 @@
|
|
1
|
-
kim_tools/__init__.py,sha256=
|
1
|
+
kim_tools/__init__.py,sha256=JLUazZQCLoZytIvOaYLlsNL_HwIINUM3Qe4Z3ljGkoI,434
|
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=
|
4
|
+
kim_tools/aflow_util/core.py,sha256=PM-ww2zoZXksGHbyPKW54v8r1bignJvFhDByx7Qm1ac,80837
|
5
5
|
kim_tools/aflow_util/aflow_prototype_encyclopedia/data/A108B24C11D24_cP334_222_h4i_i_bf_i-001/info.json,sha256=IsFiO9X2Ko7yoq2QkDurUVP7k1BE4WFgblu7oxl6iZs,2013
|
6
6
|
kim_tools/aflow_util/aflow_prototype_encyclopedia/data/A10B11_tI84_139_dehim_eh2n-001/info.json,sha256=f1EdtouuSL2y9NNw40Rvz2J9ZZcsqQBcyEmlHj6XoW8,1186
|
7
7
|
kim_tools/aflow_util/aflow_prototype_encyclopedia/data/A10B2C_hP39_171_5c_c_a-001/info.json,sha256=vD1xjZKWShL0E6XNsSlmIhilGcGNefl56oQDLQlHO1M,1596
|
@@ -2023,11 +2023,11 @@ kim_tools/symmetry_util/data/wyck_pos_xform_under_normalizer.json,sha256=6g1YuYh
|
|
2023
2023
|
kim_tools/symmetry_util/data/wyckoff_multiplicities.json,sha256=qG2RPBd_-ejDIfz-E4ZhkHyRpIboxRy7oiXkdDf5Eg8,32270
|
2024
2024
|
kim_tools/symmetry_util/data/wyckoff_sets.json,sha256=f5ZpHKDHo6_JWki1b7KUGoYLlhU-44Qikw_-PtbLssw,9248
|
2025
2025
|
kim_tools/test_driver/__init__.py,sha256=KOiceeZNqkfrgZ66CiRiUdniceDrCmmDXQkOw0wXaCQ,92
|
2026
|
-
kim_tools/test_driver/core.py,sha256=
|
2026
|
+
kim_tools/test_driver/core.py,sha256=r7I4DXswo-f9Fl2aAwf0pBbRFnVk70Pyq9-mMlKGpaI,99055
|
2027
2027
|
kim_tools/vc/__init__.py,sha256=zXjhxXCKVMLBMXXWYG3if7VOpBnsFrn_RjVpnohDm5c,74
|
2028
2028
|
kim_tools/vc/core.py,sha256=BIjzEExnQAL2S90a_npptRm3ACqAo4fZBtvTDBMWMdw,13963
|
2029
|
-
kim_tools-0.3.
|
2030
|
-
kim_tools-0.3.
|
2031
|
-
kim_tools-0.3.
|
2032
|
-
kim_tools-0.3.
|
2033
|
-
kim_tools-0.3.
|
2029
|
+
kim_tools-0.3.10.dist-info/licenses/LICENSE.CDDL,sha256=I2luEED_SHjuZ01B4rYG-AF_135amL24JpHvZ1Jhqe8,16373
|
2030
|
+
kim_tools-0.3.10.dist-info/METADATA,sha256=Xkz5rrE_JMZpWPaQxRPJKoWH0CNolsnlgiGm32-FYws,2033
|
2031
|
+
kim_tools-0.3.10.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
2032
|
+
kim_tools-0.3.10.dist-info/top_level.txt,sha256=w_YCpJ5ERigj9te74ln7k64tqj1VumOzM_s9dsalIWY,10
|
2033
|
+
kim_tools-0.3.10.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|