Skip to content

Commit d390c19

Browse files
author
utf
committed
Fix tests
1 parent 0a6d621 commit d390c19

File tree

2 files changed

+31
-27
lines changed

2 files changed

+31
-27
lines changed

docs/src/contributors.md

+2
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,5 @@ Other contributions are provided by:
1212
* Kieran Spooner through the research group of David Scanlon at University College London.
1313
* Francesco Ricci through the research group of Prof. Geoffroy Hautier at UC Louvain.
1414
* Jason Frost
15+
* Øven Andreas Grimenes
16+
* Sara Shivalingam Goud

tests/core/test_run.py

+29-27
Original file line numberDiff line numberDiff line change
@@ -60,22 +60,24 @@
6060
si_settings_wavefunction_nocache = deepcopy(si_settings_wavefunction)
6161
si_settings_wavefunction_nocache.update({"cache_wavefunction": False})
6262
si_transport_projections = {
63-
("mobility", ("overall", (0, 0))): 1576.074528381305,
64-
("mobility", ("overall", (-1, 0))): 817.7095423715324,
65-
("seebeck", (0, 0)): -1008.6448354488775,
66-
("seebeck", (-1, 0)): -710.4420172707946,
67-
("conductivity", (0, 0)): 26.524979568158074,
68-
("conductivity", (-1, 0)): 1310.121658393053,
69-
("electronic_thermal_conductivity", (0, 0)): 0.0013629136608729912,
63+
("mobility", ("overall", (0, 0))): 1576.258481998666,
64+
("mobility", ("overall", (-1, 0))): 817.847040804815,
65+
("seebeck", (0, 0)): -1008.6407009022223,
66+
("seebeck", (-1, 0)): -710.4554457760123,
67+
("conductivity", (0, 0)): 26.528060275446744,
68+
("conductivity", (-1, 0)): 1310.3419623097216,
69+
("electronic_thermal_conductivity", (0, 0)): 0.001362899666873465,
7070
}
71+
72+
7173
si_transport_wavefunction = {
72-
("mobility", ("overall", (0, 0))): 1234.1461746826737,
73-
("mobility", ("overall", (-1, 0))): 667.3798557475134,
74-
("seebeck", (0, 0)): -960.4571567090115,
75-
("seebeck", (-1, 0)): -711.2202530136929,
76-
("conductivity", (0, 0)): 21.233368948315626,
77-
("conductivity", (-1, 0)): 1069.265903429082,
78-
("electronic_thermal_conductivity", (0, 0)): 0.0018031827294972345,
74+
("mobility", ("overall", (0, 0))): 1288.8049717578235,
75+
("mobility", ("overall", (-1, 0))): 681.2894275920993,
76+
("seebeck", (0, 0)): -962.9704212387054,
77+
("seebeck", (-1, 0)): -709.850960870414,
78+
("conductivity", (0, 0)): 22.129086011629486,
79+
("conductivity", (-1, 0)): 1091.551538629644,
80+
("electronic_thermal_conductivity", (0, 0)): 0.0018040121810027631,
7981
}
8082

8183
gaas_settings_wavefunction = {
@@ -93,15 +95,16 @@
9395
"nworkers": 1,
9496
}
9597
gaas_transport = {
96-
("mobility", ("overall", (0, 0))): 21305.275888767374,
97-
("mobility", ("overall", (0, -1))): 2428.11416884464,
98-
("seebeck", (0, 0)): -858.4131242931522,
99-
("seebeck", (0, -1)): -608.3181725103633,
100-
("conductivity", (0, 0)): 10.24043666456572,
101-
("conductivity", (0, -1)): 241.9083618988777,
102-
("electronic_thermal_conductivity", (0, -1)): 0.026674584564867737,
98+
("mobility", ("overall", (0, 0))): 21314.654055452356,
99+
("mobility", ("overall", (0, -1))): 2427.8469925471195,
100+
("seebeck", (0, 0)): -858.4123574982394,
101+
("seebeck", (0, -1)): -608.293376903711,
102+
("conductivity", (0, 0)): 10.244949132013248,
103+
("conductivity", (0, -1)): 241.8806741581644,
104+
("electronic_thermal_conductivity", (0, -1)): 0.026659775406849422,
103105
}
104106

107+
105108
test_data = [
106109
pytest.param(
107110
"Si",
@@ -245,10 +248,9 @@ def _validate_data(amset_data, transport, max_aniso, files, scats):
245248
print("('{}', {}): {},".format(prop, loc, value))
246249

247250
# assert values agree to within 1 %
248-
# assert (
249-
# np.abs(1 - value / expected) < 0.01
250-
# ), f"property: {prop}, loc: {loc}, differs by more than 1%: calculated: {value}, expected: {expected}"
251+
assert (
252+
np.abs(1 - value / expected) < 0.01
253+
), f"property: {prop}, loc: {loc}, differs by more than 1%: calculated: {value}, expected: {expected}"
251254

252-
# # check scattering types
253-
# assert set(amset_data.scattering_labels) == set(scats)
254-
assert False
255+
# check scattering types
256+
assert set(amset_data.scattering_labels) == set(scats)

0 commit comments

Comments
 (0)