emmet-builders 0.51.11__py3-none-any.whl → 0.51.12__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.
Potentially problematic release.
This version of emmet-builders might be problematic. Click here for more details.
- emmet/builders/materials/elasticity.py +13 -5
- emmet/builders/materials/electronic_structure.py +69 -132
- {emmet_builders-0.51.11.dist-info → emmet_builders-0.51.12.dist-info}/METADATA +1 -1
- {emmet_builders-0.51.11.dist-info → emmet_builders-0.51.12.dist-info}/RECORD +6 -6
- {emmet_builders-0.51.11.dist-info → emmet_builders-0.51.12.dist-info}/WHEEL +0 -0
- {emmet_builders-0.51.11.dist-info → emmet_builders-0.51.12.dist-info}/top_level.txt +0 -0
|
@@ -73,7 +73,9 @@ class ElasticityBuilder(Builder):
|
|
|
73
73
|
self.elasticity.ensure_index("material_id")
|
|
74
74
|
self.elasticity.ensure_index("last_updated")
|
|
75
75
|
|
|
76
|
-
def get_items(
|
|
76
|
+
def get_items(
|
|
77
|
+
self,
|
|
78
|
+
) -> Generator[Tuple[str, Dict[str, str], List[Dict]], None, None]:
|
|
77
79
|
"""
|
|
78
80
|
Gets all items to process into elasticity docs.
|
|
79
81
|
|
|
@@ -93,7 +95,6 @@ class ElasticityBuilder(Builder):
|
|
|
93
95
|
query = self.query.copy()
|
|
94
96
|
|
|
95
97
|
for i, doc in enumerate(cursor):
|
|
96
|
-
|
|
97
98
|
material_id = doc["material_id"]
|
|
98
99
|
calc_types = {str(k): v for k, v in doc["calc_types"].items()}
|
|
99
100
|
|
|
@@ -106,6 +107,7 @@ class ElasticityBuilder(Builder):
|
|
|
106
107
|
"output",
|
|
107
108
|
"orig_inputs",
|
|
108
109
|
"completed_at",
|
|
110
|
+
"last_updated",
|
|
109
111
|
"transmuter",
|
|
110
112
|
"task_id",
|
|
111
113
|
"dir_name",
|
|
@@ -172,12 +174,14 @@ class ElasticityBuilder(Builder):
|
|
|
172
174
|
stresses = []
|
|
173
175
|
deform_task_ids = []
|
|
174
176
|
deform_dir_names = []
|
|
177
|
+
deform_last_updated = []
|
|
175
178
|
for doc in final_deform:
|
|
176
179
|
deforms.append(Deformation(doc["transmuter"]["transformation_params"][0]["deformation"]))
|
|
177
180
|
# -0.1 to convert to GPa from kBar and s
|
|
178
181
|
stresses.append(-0.1 * Stress(doc["output"]["stress"]))
|
|
179
182
|
deform_task_ids.append(doc["task_id"])
|
|
180
183
|
deform_dir_names.append(doc["dir_name"])
|
|
184
|
+
deform_last_updated.append(doc["last_updated"])
|
|
181
185
|
|
|
182
186
|
elasticity_doc = ElasticityDoc.from_deformations_and_stresses(
|
|
183
187
|
structure=Structure.from_dict(final_opt["output"]["structure"]),
|
|
@@ -186,6 +190,7 @@ class ElasticityBuilder(Builder):
|
|
|
186
190
|
stresses=stresses,
|
|
187
191
|
deformation_task_ids=deform_task_ids,
|
|
188
192
|
deformation_dir_names=deform_dir_names,
|
|
193
|
+
deform_last_updated=deform_last_updated,
|
|
189
194
|
equilibrium_stress=-0.1 * Stress(final_opt["output"]["stress"]),
|
|
190
195
|
optimization_task_id=final_opt["task_id"],
|
|
191
196
|
optimization_dir_name=final_opt["dir_name"],
|
|
@@ -208,7 +213,9 @@ class ElasticityBuilder(Builder):
|
|
|
208
213
|
|
|
209
214
|
|
|
210
215
|
def filter_opt_tasks(
|
|
211
|
-
tasks: List[Dict],
|
|
216
|
+
tasks: List[Dict],
|
|
217
|
+
calc_types: Dict[str, str],
|
|
218
|
+
target_calc_type: str = CalcType.GGA_Structure_Optimization,
|
|
212
219
|
) -> List[Dict]:
|
|
213
220
|
"""
|
|
214
221
|
Filter optimization tasks, by
|
|
@@ -220,7 +227,9 @@ def filter_opt_tasks(
|
|
|
220
227
|
|
|
221
228
|
|
|
222
229
|
def filter_deform_tasks(
|
|
223
|
-
tasks: List[Dict],
|
|
230
|
+
tasks: List[Dict],
|
|
231
|
+
calc_types: Dict[str, str],
|
|
232
|
+
target_calc_type: str = CalcType.GGA_Deformation,
|
|
224
233
|
) -> List[Dict]:
|
|
225
234
|
"""
|
|
226
235
|
Filter deformation tasks, by
|
|
@@ -326,7 +335,6 @@ def filter_deform_tasks_by_time(tasks: List[Dict], deform_comp_tol: float = 1e-5
|
|
|
326
335
|
mapping = TensorMapping(tol=deform_comp_tol, tensors=[], values=[])
|
|
327
336
|
|
|
328
337
|
for doc in tasks:
|
|
329
|
-
|
|
330
338
|
# assume only one deformation, should be checked in `filter_deform_tasks()`
|
|
331
339
|
deform = doc["transmuter"]["transformation_params"][0]["deformation"]
|
|
332
340
|
|
|
@@ -70,9 +70,7 @@ class ElectronicStructureBuilder(Builder):
|
|
|
70
70
|
"""
|
|
71
71
|
q = dict(self.query)
|
|
72
72
|
|
|
73
|
-
keys = self.electronic_structure.newer_in(
|
|
74
|
-
self.materials, criteria=q, exhaustive=True
|
|
75
|
-
)
|
|
73
|
+
keys = self.electronic_structure.newer_in(self.materials, criteria=q, exhaustive=True)
|
|
76
74
|
|
|
77
75
|
N = ceil(len(keys) / number_splits)
|
|
78
76
|
for split in grouper(keys, N):
|
|
@@ -93,17 +91,13 @@ class ElectronicStructureBuilder(Builder):
|
|
|
93
91
|
mat_ids = self.materials.distinct(self.materials.key, criteria=q)
|
|
94
92
|
es_ids = self.electronic_structure.distinct(self.electronic_structure.key)
|
|
95
93
|
|
|
96
|
-
mats_set = set(
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
)
|
|
100
|
-
) | (set(mat_ids) - set(es_ids))
|
|
94
|
+
mats_set = set(self.electronic_structure.newer_in(target=self.materials, criteria=q, exhaustive=True)) | (
|
|
95
|
+
set(mat_ids) - set(es_ids)
|
|
96
|
+
)
|
|
101
97
|
|
|
102
98
|
mats = [mat for mat in mats_set]
|
|
103
99
|
|
|
104
|
-
self.logger.info(
|
|
105
|
-
"Processing {} materials for electronic structure".format(len(mats))
|
|
106
|
-
)
|
|
100
|
+
self.logger.info("Processing {} materials for electronic structure".format(len(mats)))
|
|
107
101
|
|
|
108
102
|
self.total = len(mats)
|
|
109
103
|
|
|
@@ -133,13 +127,7 @@ class ElectronicStructureBuilder(Builder):
|
|
|
133
127
|
for bs_type, bs_entry in mat["bandstructure"].items():
|
|
134
128
|
if bs_entry.get("object", None) is not None:
|
|
135
129
|
bs[bs_type] = (
|
|
136
|
-
{
|
|
137
|
-
bs_entry["task_id"]: BandStructureSymmLine.from_dict(
|
|
138
|
-
bs_entry["object"]
|
|
139
|
-
)
|
|
140
|
-
}
|
|
141
|
-
if bs_entry
|
|
142
|
-
else None
|
|
130
|
+
{bs_entry["task_id"]: BandStructureSymmLine.from_dict(bs_entry["object"])} if bs_entry else None
|
|
143
131
|
)
|
|
144
132
|
|
|
145
133
|
structures[bs_entry["task_id"]] = bs_entry["output_structure"]
|
|
@@ -147,17 +135,13 @@ class ElectronicStructureBuilder(Builder):
|
|
|
147
135
|
if mat["dos"]:
|
|
148
136
|
if mat["dos"]["object"] is not None:
|
|
149
137
|
self.logger.info("Processing density of states")
|
|
150
|
-
dos = {
|
|
151
|
-
mat["dos"]["task_id"]: CompleteDos.from_dict(mat["dos"]["object"])
|
|
152
|
-
}
|
|
138
|
+
dos = {mat["dos"]["task_id"]: CompleteDos.from_dict(mat["dos"]["object"])}
|
|
153
139
|
|
|
154
140
|
structures[mat["dos"]["task_id"]] = mat["dos"]["output_structure"]
|
|
155
141
|
|
|
156
142
|
if bs:
|
|
157
143
|
self.logger.info(
|
|
158
|
-
"Processing band structure types: {}".format(
|
|
159
|
-
[bs_type for bs_type, bs_entry in bs.items() if bs_entry]
|
|
160
|
-
)
|
|
144
|
+
"Processing band structure types: {}".format([bs_type for bs_type, bs_entry in bs.items() if bs_entry])
|
|
161
145
|
)
|
|
162
146
|
|
|
163
147
|
# Default summary data
|
|
@@ -173,6 +157,7 @@ class ElectronicStructureBuilder(Builder):
|
|
|
173
157
|
is_gap_direct=mat["other"]["is_gap_direct"],
|
|
174
158
|
is_metal=mat["other"]["is_metal"],
|
|
175
159
|
magnetic_ordering=mat["other"]["magnetic_ordering"],
|
|
160
|
+
origins=mat["origins"],
|
|
176
161
|
warnings=[],
|
|
177
162
|
)
|
|
178
163
|
|
|
@@ -180,10 +165,7 @@ class ElectronicStructureBuilder(Builder):
|
|
|
180
165
|
eig_values = mat["other"].get("eigenvalue_band_properties", None)
|
|
181
166
|
|
|
182
167
|
if eig_values is not None:
|
|
183
|
-
if not np.isclose(
|
|
184
|
-
mat["other"]["band_gap"], eig_values["bandgap"], atol=0.2, rtol=0.0
|
|
185
|
-
):
|
|
186
|
-
|
|
168
|
+
if not np.isclose(mat["other"]["band_gap"], eig_values["bandgap"], atol=0.2, rtol=0.0):
|
|
187
169
|
d["warnings"].append(
|
|
188
170
|
"Regular parsed band gap and band gap from eigenvalue_band_properties do not agree. "
|
|
189
171
|
"Using data from eigenvalue_band_properties where appropriate."
|
|
@@ -193,16 +175,13 @@ class ElectronicStructureBuilder(Builder):
|
|
|
193
175
|
d["cbm"] = eig_values["cbm"]
|
|
194
176
|
d["vbm"] = eig_values["vbm"]
|
|
195
177
|
d["is_gap_direct"] = eig_values["is_gap_direct"]
|
|
196
|
-
d["is_metal"] = (
|
|
197
|
-
True if np.isclose(d["band_gap"], 0.0, atol=0.01, rtol=0) else False
|
|
198
|
-
)
|
|
178
|
+
d["is_metal"] = True if np.isclose(d["band_gap"], 0.0, atol=0.01, rtol=0) else False
|
|
199
179
|
|
|
200
180
|
if dos is None:
|
|
201
181
|
doc = ElectronicStructureDoc.from_structure(**d)
|
|
202
182
|
|
|
203
183
|
else:
|
|
204
184
|
try:
|
|
205
|
-
|
|
206
185
|
doc = ElectronicStructureDoc.from_bsdos(
|
|
207
186
|
material_id=mat[self.materials.key],
|
|
208
187
|
structures=structures,
|
|
@@ -210,14 +189,13 @@ class ElectronicStructureBuilder(Builder):
|
|
|
210
189
|
is_gap_direct=d["is_gap_direct"],
|
|
211
190
|
is_metal=d["is_metal"],
|
|
212
191
|
deprecated=d["deprecated"],
|
|
192
|
+
origins=d["origins"],
|
|
213
193
|
**bs,
|
|
214
194
|
)
|
|
215
195
|
doc = self._bsdos_checks(doc, dos[mat["dos"]["task_id"]], structures)
|
|
216
196
|
|
|
217
197
|
except Exception:
|
|
218
|
-
d["warnings"].append(
|
|
219
|
-
"Band structure and/or data exists but an error occured while processing."
|
|
220
|
-
)
|
|
198
|
+
d["warnings"].append("Band structure and/or data exists but an error occured while processing.")
|
|
221
199
|
doc = ElectronicStructureDoc.from_structure(**d)
|
|
222
200
|
|
|
223
201
|
# Magnetic ordering check
|
|
@@ -233,16 +211,11 @@ class ElectronicStructureBuilder(Builder):
|
|
|
233
211
|
|
|
234
212
|
if doc.dos is not None:
|
|
235
213
|
dos_dict = doc.dos.dict()
|
|
236
|
-
mag_orderings.update(
|
|
237
|
-
{dos_dict["total"][Spin.up]["task_id"]: dos_dict["magnetic_ordering"]}
|
|
238
|
-
)
|
|
214
|
+
mag_orderings.update({dos_dict["total"][Spin.up]["task_id"]: dos_dict["magnetic_ordering"]})
|
|
239
215
|
|
|
240
216
|
for task_id, ordering in mag_orderings.items():
|
|
241
217
|
if doc.magnetic_ordering != ordering:
|
|
242
|
-
|
|
243
|
-
doc.warnings.append(
|
|
244
|
-
f"Summary data magnetic ordering does not agree with the ordering from {task_id}"
|
|
245
|
-
)
|
|
218
|
+
doc.warnings.append(f"Summary data magnetic ordering does not agree with the ordering from {task_id}")
|
|
246
219
|
|
|
247
220
|
# LMAXMIX check, VASP default is 2
|
|
248
221
|
expected_lmaxmix = MPStaticSet(structure).incar.get("LMAXMIX", 2)
|
|
@@ -303,14 +276,9 @@ class ElectronicStructureBuilder(Builder):
|
|
|
303
276
|
for task_id, struct in structures.items():
|
|
304
277
|
pair_list.append((task_id, struct))
|
|
305
278
|
|
|
306
|
-
struct_prim = SpacegroupAnalyzer(struct).get_primitive_standard_structure(
|
|
307
|
-
international_monoclinic=False
|
|
308
|
-
)
|
|
309
|
-
|
|
310
|
-
if not np.allclose(
|
|
311
|
-
struct.lattice.matrix, struct_prim.lattice.matrix, atol=1e-3
|
|
312
|
-
):
|
|
279
|
+
struct_prim = SpacegroupAnalyzer(struct).get_primitive_standard_structure(international_monoclinic=False)
|
|
313
280
|
|
|
281
|
+
if not np.allclose(struct.lattice.matrix, struct_prim.lattice.matrix, atol=1e-3):
|
|
314
282
|
if doc.warnings is None:
|
|
315
283
|
doc.warnings = []
|
|
316
284
|
|
|
@@ -362,10 +330,8 @@ class ElectronicStructureBuilder(Builder):
|
|
|
362
330
|
other_calcs = []
|
|
363
331
|
|
|
364
332
|
for task_id in mat["task_types"].keys():
|
|
365
|
-
|
|
366
333
|
# Handle all line-mode tasks
|
|
367
334
|
if "NSCF Line" in mat["task_types"][task_id]:
|
|
368
|
-
|
|
369
335
|
bs_type = None
|
|
370
336
|
|
|
371
337
|
task_query = self.tasks.query_one(
|
|
@@ -381,18 +347,14 @@ class ElectronicStructureBuilder(Builder):
|
|
|
381
347
|
criteria={"task_id": str(task_id)},
|
|
382
348
|
)
|
|
383
349
|
|
|
384
|
-
fs_id = str(
|
|
385
|
-
task_query["calcs_reversed"][0].get("bandstructure_fs_id", None)
|
|
386
|
-
)
|
|
350
|
+
fs_id = str(task_query["calcs_reversed"][0].get("bandstructure_fs_id", None))
|
|
387
351
|
|
|
388
352
|
if fs_id is not None:
|
|
389
353
|
structure = Structure.from_dict(task_query["output"]["structure"])
|
|
390
354
|
|
|
391
355
|
kpoints = task_query["orig_inputs"]["kpoints"]
|
|
392
356
|
labels_dict = {
|
|
393
|
-
label: point
|
|
394
|
-
for label, point in zip(kpoints["labels"], kpoints["kpoints"])
|
|
395
|
-
if label is not None
|
|
357
|
+
label: point for label, point in zip(kpoints["labels"], kpoints["kpoints"]) if label is not None
|
|
396
358
|
}
|
|
397
359
|
|
|
398
360
|
try:
|
|
@@ -401,18 +363,12 @@ class ElectronicStructureBuilder(Builder):
|
|
|
401
363
|
bs_type = None
|
|
402
364
|
|
|
403
365
|
if bs_type is None:
|
|
404
|
-
|
|
405
|
-
bs_dict = self.bandstructure_fs.query_one(
|
|
406
|
-
{self.bandstructure_fs.key: str(task_id)}
|
|
407
|
-
)
|
|
366
|
+
bs_dict = self.bandstructure_fs.query_one({self.bandstructure_fs.key: str(task_id)})
|
|
408
367
|
|
|
409
368
|
if bs_dict is not None:
|
|
410
|
-
|
|
411
369
|
bs = BandStructureSymmLine.from_dict(bs_dict["data"])
|
|
412
370
|
|
|
413
|
-
bs_type = self._obtain_path_type(
|
|
414
|
-
bs.labels_dict, bs.structure
|
|
415
|
-
)
|
|
371
|
+
bs_type = self._obtain_path_type(bs.labels_dict, bs.structure)
|
|
416
372
|
|
|
417
373
|
is_hubbard = task_query["input"]["is_hubbard"]
|
|
418
374
|
lmaxmix = task_query["input"]["incar"].get(
|
|
@@ -461,14 +417,10 @@ class ElectronicStructureBuilder(Builder):
|
|
|
461
417
|
structure = Structure.from_dict(task_query["output"]["structure"])
|
|
462
418
|
|
|
463
419
|
if (
|
|
464
|
-
task_query["orig_inputs"]["kpoints"]["generation_style"]
|
|
465
|
-
== "
|
|
466
|
-
or task_query["orig_inputs"]["kpoints"]["generation_style"]
|
|
467
|
-
== "Gamma"
|
|
420
|
+
task_query["orig_inputs"]["kpoints"]["generation_style"] == "Monkhorst"
|
|
421
|
+
or task_query["orig_inputs"]["kpoints"]["generation_style"] == "Gamma"
|
|
468
422
|
):
|
|
469
|
-
nkpoints = np.prod(
|
|
470
|
-
task_query["orig_inputs"]["kpoints"]["kpoints"][0], axis=0
|
|
471
|
-
)
|
|
423
|
+
nkpoints = np.prod(task_query["orig_inputs"]["kpoints"]["kpoints"][0], axis=0)
|
|
472
424
|
|
|
473
425
|
else:
|
|
474
426
|
nkpoints = task_query["orig_inputs"]["kpoints"]["nkpoints"]
|
|
@@ -504,9 +456,7 @@ class ElectronicStructureBuilder(Builder):
|
|
|
504
456
|
|
|
505
457
|
structure = Structure.from_dict(task_query["output"]["structure"])
|
|
506
458
|
|
|
507
|
-
other_mag_ordering = CollinearMagneticStructureAnalyzer(
|
|
508
|
-
structure
|
|
509
|
-
).ordering
|
|
459
|
+
other_mag_ordering = CollinearMagneticStructureAnalyzer(structure).ordering
|
|
510
460
|
|
|
511
461
|
is_hubbard = task_query["input"]["is_hubbard"]
|
|
512
462
|
|
|
@@ -516,9 +466,7 @@ class ElectronicStructureBuilder(Builder):
|
|
|
516
466
|
last_calc["input"]["kpoints"]["generation_style"] == "Monkhorst"
|
|
517
467
|
or last_calc["input"]["kpoints"]["generation_style"] == "Gamma"
|
|
518
468
|
):
|
|
519
|
-
nkpoints = np.prod(
|
|
520
|
-
last_calc["input"]["kpoints"]["kpoints"][0], axis=0
|
|
521
|
-
)
|
|
469
|
+
nkpoints = np.prod(last_calc["input"]["kpoints"]["kpoints"][0], axis=0)
|
|
522
470
|
else:
|
|
523
471
|
nkpoints = last_calc["input"]["kpoints"]["nkpoints"]
|
|
524
472
|
|
|
@@ -526,9 +474,7 @@ class ElectronicStructureBuilder(Builder):
|
|
|
526
474
|
|
|
527
475
|
other_calcs.append(
|
|
528
476
|
{
|
|
529
|
-
"is_static": True
|
|
530
|
-
if "Static" in mat["task_types"][task_id]
|
|
531
|
-
else False,
|
|
477
|
+
"is_static": True if "Static" in mat["task_types"][task_id] else False,
|
|
532
478
|
"task_id": task_id,
|
|
533
479
|
"is_hubbard": int(is_hubbard),
|
|
534
480
|
"nkpoints": int(nkpoints),
|
|
@@ -538,18 +484,15 @@ class ElectronicStructureBuilder(Builder):
|
|
|
538
484
|
}
|
|
539
485
|
)
|
|
540
486
|
|
|
541
|
-
updated_materials_doc = self._obtain_blessed_calculations(
|
|
542
|
-
mat, bs_calcs, dos_calcs, other_calcs
|
|
543
|
-
)
|
|
487
|
+
updated_materials_doc = self._obtain_blessed_calculations(mat, bs_calcs, dos_calcs, other_calcs)
|
|
544
488
|
|
|
545
489
|
return updated_materials_doc
|
|
546
490
|
|
|
547
|
-
def _obtain_blessed_calculations(
|
|
548
|
-
self, materials_doc, bs_calcs, dos_calcs, other_calcs
|
|
549
|
-
):
|
|
550
|
-
|
|
491
|
+
def _obtain_blessed_calculations(self, materials_doc, bs_calcs, dos_calcs, other_calcs):
|
|
551
492
|
bs_types = ["setyawan_curtarolo", "hinuma", "latimer_munro"]
|
|
552
493
|
|
|
494
|
+
materials_doc["origins"] = []
|
|
495
|
+
|
|
553
496
|
for bs_type in bs_types:
|
|
554
497
|
# select "blessed" bs of each type
|
|
555
498
|
if bs_calcs[bs_type]:
|
|
@@ -563,28 +506,25 @@ class ElectronicStructureBuilder(Builder):
|
|
|
563
506
|
reverse=True,
|
|
564
507
|
)
|
|
565
508
|
|
|
566
|
-
materials_doc["bandstructure"][bs_type]["task_id"] = sorted_bs_data[0][
|
|
567
|
-
"task_id"
|
|
568
|
-
]
|
|
509
|
+
materials_doc["bandstructure"][bs_type]["task_id"] = sorted_bs_data[0]["task_id"]
|
|
569
510
|
|
|
570
|
-
materials_doc["bandstructure"][bs_type]["lmaxmix"] = sorted_bs_data[0][
|
|
571
|
-
"lmaxmix"
|
|
572
|
-
]
|
|
511
|
+
materials_doc["bandstructure"][bs_type]["lmaxmix"] = sorted_bs_data[0]["lmaxmix"]
|
|
573
512
|
|
|
574
|
-
bs_obj = self.bandstructure_fs.query_one(
|
|
575
|
-
criteria={"fs_id": sorted_bs_data[0]["fs_id"]}
|
|
576
|
-
)
|
|
513
|
+
bs_obj = self.bandstructure_fs.query_one(criteria={"fs_id": sorted_bs_data[0]["fs_id"]})
|
|
577
514
|
|
|
578
|
-
materials_doc["bandstructure"][bs_type]["object"] =
|
|
579
|
-
bs_obj["data"] if bs_obj is not None else None
|
|
580
|
-
)
|
|
515
|
+
materials_doc["bandstructure"][bs_type]["object"] = bs_obj["data"] if bs_obj is not None else None
|
|
581
516
|
|
|
582
|
-
materials_doc["bandstructure"][bs_type][
|
|
583
|
-
"output_structure"
|
|
584
|
-
] = sorted_bs_data[0]["output_structure"]
|
|
517
|
+
materials_doc["bandstructure"][bs_type]["output_structure"] = sorted_bs_data[0]["output_structure"]
|
|
585
518
|
|
|
586
|
-
|
|
519
|
+
materials_doc["origins"].append(
|
|
520
|
+
{
|
|
521
|
+
"name": bs_type,
|
|
522
|
+
"task_id": sorted_bs_data[0]["task_id"],
|
|
523
|
+
"last_updated": sorted_bs_data[0]["updated_on"],
|
|
524
|
+
}
|
|
525
|
+
)
|
|
587
526
|
|
|
527
|
+
if dos_calcs:
|
|
588
528
|
sorted_dos_data = sorted(
|
|
589
529
|
dos_calcs,
|
|
590
530
|
key=lambda entry: (
|
|
@@ -600,19 +540,20 @@ class ElectronicStructureBuilder(Builder):
|
|
|
600
540
|
|
|
601
541
|
materials_doc["dos"]["lmaxmix"] = sorted_dos_data[0]["lmaxmix"]
|
|
602
542
|
|
|
603
|
-
dos_obj = self.dos_fs.query_one(
|
|
604
|
-
|
|
605
|
-
)
|
|
606
|
-
materials_doc["dos"]["object"] = (
|
|
607
|
-
dos_obj["data"] if dos_obj is not None else None
|
|
608
|
-
)
|
|
543
|
+
dos_obj = self.dos_fs.query_one(criteria={"fs_id": sorted_dos_data[0]["fs_id"]})
|
|
544
|
+
materials_doc["dos"]["object"] = dos_obj["data"] if dos_obj is not None else None
|
|
609
545
|
|
|
610
|
-
materials_doc["dos"]["output_structure"] = sorted_dos_data[0][
|
|
611
|
-
"output_structure"
|
|
612
|
-
]
|
|
546
|
+
materials_doc["dos"]["output_structure"] = sorted_dos_data[0]["output_structure"]
|
|
613
547
|
|
|
614
|
-
|
|
548
|
+
materials_doc["origins"].append(
|
|
549
|
+
{
|
|
550
|
+
"name": "dos",
|
|
551
|
+
"task_id": sorted_dos_data[0]["task_id"],
|
|
552
|
+
"last_updated": sorted_dos_data[0]["updated_on"],
|
|
553
|
+
}
|
|
554
|
+
)
|
|
615
555
|
|
|
556
|
+
if other_calcs:
|
|
616
557
|
sorted_other_data = sorted(
|
|
617
558
|
other_calcs,
|
|
618
559
|
key=lambda entry: (
|
|
@@ -628,12 +569,17 @@ class ElectronicStructureBuilder(Builder):
|
|
|
628
569
|
|
|
629
570
|
task_output_data = sorted_other_data[0]["calcs_reversed"][-1]["output"]
|
|
630
571
|
materials_doc["other"]["band_gap"] = task_output_data["bandgap"]
|
|
631
|
-
materials_doc["other"]["magnetic_ordering"] = sorted_other_data[0][
|
|
632
|
-
|
|
633
|
-
|
|
572
|
+
materials_doc["other"]["magnetic_ordering"] = sorted_other_data[0]["magnetic_ordering"]
|
|
573
|
+
materials_doc["other"]["last_updated"] = sorted_other_data[0]["updated_on"]
|
|
574
|
+
|
|
575
|
+
materials_doc["other"]["is_metal"] = materials_doc["other"]["band_gap"] == 0.0
|
|
634
576
|
|
|
635
|
-
materials_doc["
|
|
636
|
-
|
|
577
|
+
materials_doc["origins"].append(
|
|
578
|
+
{
|
|
579
|
+
"name": "electronic_structure",
|
|
580
|
+
"task_id": sorted_other_data[0]["task_id"],
|
|
581
|
+
"last_updated": sorted_other_data[0]["updated_on"],
|
|
582
|
+
}
|
|
637
583
|
)
|
|
638
584
|
|
|
639
585
|
for prop in [
|
|
@@ -644,7 +590,6 @@ class ElectronicStructureBuilder(Builder):
|
|
|
644
590
|
"is_metal",
|
|
645
591
|
"eigenvalue_band_properties",
|
|
646
592
|
]:
|
|
647
|
-
|
|
648
593
|
# First try other calcs_reversed entries if properties are not found in last
|
|
649
594
|
if prop not in task_output_data:
|
|
650
595
|
for calc in sorted_other_data[0]["calcs_reversed"]:
|
|
@@ -663,7 +608,6 @@ class ElectronicStructureBuilder(Builder):
|
|
|
663
608
|
angle_tolerance=SETTINGS.ANGLE_TOL,
|
|
664
609
|
atol=1e-5,
|
|
665
610
|
):
|
|
666
|
-
|
|
667
611
|
bs_type = None
|
|
668
612
|
|
|
669
613
|
if any([label.islower() for label in labels_dict]):
|
|
@@ -680,24 +624,17 @@ class ElectronicStructureBuilder(Builder):
|
|
|
680
624
|
atol=atol,
|
|
681
625
|
)
|
|
682
626
|
hs_labels_full = hskp.kpath["kpoints"]
|
|
683
|
-
hs_path_uniq = set(
|
|
684
|
-
[label for segment in hskp.kpath["path"] for label in segment]
|
|
685
|
-
)
|
|
627
|
+
hs_path_uniq = set([label for segment in hskp.kpath["path"] for label in segment])
|
|
686
628
|
|
|
687
|
-
hs_labels = {
|
|
688
|
-
k: hs_labels_full[k] for k in hs_path_uniq if k in hs_path_uniq
|
|
689
|
-
}
|
|
629
|
+
hs_labels = {k: hs_labels_full[k] for k in hs_path_uniq if k in hs_path_uniq}
|
|
690
630
|
|
|
691
631
|
shared_items = {
|
|
692
632
|
k: labels_dict[k]
|
|
693
633
|
for k in labels_dict
|
|
694
|
-
if k in hs_labels
|
|
695
|
-
and np.allclose(labels_dict[k], hs_labels[k], atol=1e-3)
|
|
634
|
+
if k in hs_labels and np.allclose(labels_dict[k], hs_labels[k], atol=1e-3)
|
|
696
635
|
}
|
|
697
636
|
|
|
698
|
-
if len(shared_items) == len(labels_dict) and len(shared_items) == len(
|
|
699
|
-
hs_labels
|
|
700
|
-
):
|
|
637
|
+
if len(shared_items) == len(labels_dict) and len(shared_items) == len(hs_labels):
|
|
701
638
|
bs_type = ptype
|
|
702
639
|
|
|
703
640
|
return bs_type
|
|
@@ -14,9 +14,9 @@ emmet/builders/materials/bonds.py,sha256=ZT-W3i0mX5tGRr1Aq4pHhxGZX-MMg58i-2L-QeG
|
|
|
14
14
|
emmet/builders/materials/chemenv.py,sha256=eQHDJDxG8AWK9KWEqfBuyeSVnS6cvS0hJMYZupUsUR0,1222
|
|
15
15
|
emmet/builders/materials/corrected_entries.py,sha256=I8lsE5mjI-LntrftoJrZnzPjHo48FTgxRNtwj-b9exM,11255
|
|
16
16
|
emmet/builders/materials/dielectric.py,sha256=StspDPLgl-rN87daz3T3jfnM2wXZkjZOP4RKbKld_NA,6524
|
|
17
|
-
emmet/builders/materials/elasticity.py,sha256=
|
|
17
|
+
emmet/builders/materials/elasticity.py,sha256=ETshFVSksTmDYyTkxjpL6E1btAfFEwmhKUOZM4EJNIM,15440
|
|
18
18
|
emmet/builders/materials/electrodes.py,sha256=7lUF943lojyJc6hBIuYMznp_0rfHHHu-jjmssTpDdA4,21992
|
|
19
|
-
emmet/builders/materials/electronic_structure.py,sha256=
|
|
19
|
+
emmet/builders/materials/electronic_structure.py,sha256=d2tQS2HN2JR2fonScfpuxEPmQFxmoJ-jouMchXrRPdo,24917
|
|
20
20
|
emmet/builders/materials/magnetism.py,sha256=Aw55dOeIXGOVQBYTYQN-q6VduZdOMAPfJvYKoD7vzl0,4578
|
|
21
21
|
emmet/builders/materials/optimade.py,sha256=8S9vSGC5TaSZfkNJvDqISWOKuIWDeiLoV48EalJTkkk,1433
|
|
22
22
|
emmet/builders/materials/oxidation_states.py,sha256=eYiMum3Jio6WdiJ0W_DHo9j7hOP-qeU6DyoW0MBTE6Q,1518
|
|
@@ -42,7 +42,7 @@ emmet/builders/qchem/molecules.py,sha256=myR8zaZg2GDFb6TFoHDUtvtbvBp4K55bkTC-mJw
|
|
|
42
42
|
emmet/builders/vasp/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
43
43
|
emmet/builders/vasp/materials.py,sha256=JnV_5Kd0qCU0hsqAcyhZwgMTYVcs54NmYKS9kNS9bhI,13334
|
|
44
44
|
emmet/builders/vasp/task_validator.py,sha256=9hiYdnG_Wz4zxzG6mrxjPIJbZTm_N-22UwpYPT5zXFE,3601
|
|
45
|
-
emmet_builders-0.51.
|
|
46
|
-
emmet_builders-0.51.
|
|
47
|
-
emmet_builders-0.51.
|
|
48
|
-
emmet_builders-0.51.
|
|
45
|
+
emmet_builders-0.51.12.dist-info/METADATA,sha256=k6Xkbdv2F1sb6hPq703p4x9hf4vYZl0zCa1SzZ2nA18,1450
|
|
46
|
+
emmet_builders-0.51.12.dist-info/WHEEL,sha256=pkctZYzUS4AYVn6dJ-7367OJZivF2e8RA9b_ZBjif18,92
|
|
47
|
+
emmet_builders-0.51.12.dist-info/top_level.txt,sha256=6GcpbmWPeFhNCTfDFilb8GQ4T1UQu4z9c5jpobjwE-Q,6
|
|
48
|
+
emmet_builders-0.51.12.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|