emmet-builders 0.84.7rc4__py3-none-any.whl → 0.84.8__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/abinit/phonon.py +11 -11
- emmet/builders/abinit/sound_velocity.py +10 -10
- emmet/builders/feff/xas.py +1 -2
- emmet/builders/materials/absorption_spectrum.py +4 -4
- emmet/builders/materials/alloys.py +2 -3
- emmet/builders/materials/chemenv.py +2 -3
- emmet/builders/materials/corrected_entries.py +8 -8
- emmet/builders/materials/dielectric.py +3 -4
- emmet/builders/materials/elasticity.py +25 -25
- emmet/builders/materials/electrodes.py +18 -18
- emmet/builders/materials/electronic_structure.py +16 -16
- emmet/builders/materials/magnetism.py +3 -3
- emmet/builders/materials/ml.py +9 -11
- emmet/builders/materials/optimade.py +3 -3
- emmet/builders/materials/piezoelectric.py +1 -2
- emmet/builders/materials/provenance.py +7 -7
- emmet/builders/materials/robocrys.py +2 -3
- emmet/builders/materials/substrates.py +8 -7
- emmet/builders/materials/thermo.py +10 -10
- emmet/builders/matscholar/missing_compositions.py +8 -8
- emmet/builders/mobility/migration_graph.py +5 -5
- emmet/builders/molecules/atomic.py +22 -23
- emmet/builders/molecules/bonds.py +12 -13
- emmet/builders/molecules/electric.py +11 -12
- emmet/builders/molecules/metal_binding.py +15 -17
- emmet/builders/molecules/orbitals.py +11 -12
- emmet/builders/molecules/redox.py +21 -22
- emmet/builders/molecules/summary.py +13 -13
- emmet/builders/molecules/thermo.py +14 -16
- emmet/builders/molecules/trajectory.py +18 -19
- emmet/builders/molecules/vibration.py +11 -12
- emmet/builders/qchem/molecules.py +29 -31
- emmet/builders/settings.py +7 -8
- emmet/builders/utils.py +5 -5
- emmet/builders/vasp/materials.py +11 -11
- emmet/builders/vasp/task_validator.py +3 -5
- {emmet_builders-0.84.7rc4.dist-info → emmet_builders-0.84.8.dist-info}/METADATA +1 -1
- emmet_builders-0.84.8.dist-info/RECORD +54 -0
- emmet_builders-0.84.7rc4.dist-info/RECORD +0 -54
- {emmet_builders-0.84.7rc4.dist-info → emmet_builders-0.84.8.dist-info}/WHEEL +0 -0
- {emmet_builders-0.84.7rc4.dist-info → emmet_builders-0.84.8.dist-info}/top_level.txt +0 -0
|
@@ -2,18 +2,17 @@ from collections import defaultdict
|
|
|
2
2
|
from datetime import datetime
|
|
3
3
|
from itertools import chain
|
|
4
4
|
from math import ceil
|
|
5
|
-
from typing import
|
|
5
|
+
from typing import Iterable, Iterator
|
|
6
6
|
|
|
7
7
|
from maggma.builders import Builder
|
|
8
8
|
from maggma.core import Store
|
|
9
9
|
from maggma.utils import grouper
|
|
10
10
|
|
|
11
|
-
from emmet.
|
|
12
|
-
from emmet.core.qchem.molecule import MoleculeDoc, evaluate_lot
|
|
11
|
+
from emmet.builders.settings import EmmetBuildSettings
|
|
13
12
|
from emmet.core.molecules.vibration import VibrationDoc
|
|
13
|
+
from emmet.core.qchem.molecule import MoleculeDoc, evaluate_lot
|
|
14
|
+
from emmet.core.qchem.task import TaskDocument
|
|
14
15
|
from emmet.core.utils import jsanitize
|
|
15
|
-
from emmet.builders.settings import EmmetBuildSettings
|
|
16
|
-
|
|
17
16
|
|
|
18
17
|
__author__ = "Evan Spotte-Smith"
|
|
19
18
|
|
|
@@ -44,8 +43,8 @@ class VibrationBuilder(Builder):
|
|
|
44
43
|
tasks: Store,
|
|
45
44
|
molecules: Store,
|
|
46
45
|
vibes: Store,
|
|
47
|
-
query:
|
|
48
|
-
settings:
|
|
46
|
+
query: dict | None = None,
|
|
47
|
+
settings: EmmetBuildSettings | None = None,
|
|
49
48
|
**kwargs,
|
|
50
49
|
):
|
|
51
50
|
self.tasks = tasks
|
|
@@ -91,7 +90,7 @@ class VibrationBuilder(Builder):
|
|
|
91
90
|
self.vibes.ensure_index("last_updated")
|
|
92
91
|
self.vibes.ensure_index("formula_alphabetical")
|
|
93
92
|
|
|
94
|
-
def prechunk(self, number_splits: int) -> Iterable[
|
|
93
|
+
def prechunk(self, number_splits: int) -> Iterable[dict]: # pragma: no cover
|
|
95
94
|
"""Prechunk the builder for distributed computation"""
|
|
96
95
|
|
|
97
96
|
temp_query = dict(self.query)
|
|
@@ -117,7 +116,7 @@ class VibrationBuilder(Builder):
|
|
|
117
116
|
query["species_hash"] = {"$in": list(hash_chunk)}
|
|
118
117
|
yield {"query": query}
|
|
119
118
|
|
|
120
|
-
def get_items(self) -> Iterator[
|
|
119
|
+
def get_items(self) -> Iterator[list[dict]]:
|
|
121
120
|
"""
|
|
122
121
|
Gets all items to process into vibration documents.
|
|
123
122
|
This does no datetime checking; relying on on whether
|
|
@@ -164,12 +163,12 @@ class VibrationBuilder(Builder):
|
|
|
164
163
|
|
|
165
164
|
yield molecules
|
|
166
165
|
|
|
167
|
-
def process_item(self, items:
|
|
166
|
+
def process_item(self, items: list[dict]) -> list[dict]:
|
|
168
167
|
"""
|
|
169
168
|
Process the tasks into VibrationDocs
|
|
170
169
|
|
|
171
170
|
Args:
|
|
172
|
-
items
|
|
171
|
+
items list[dict] : a list of MoleculeDocs in dict form
|
|
173
172
|
|
|
174
173
|
Returns:
|
|
175
174
|
[dict] : a list of new vibration docs
|
|
@@ -247,7 +246,7 @@ class VibrationBuilder(Builder):
|
|
|
247
246
|
|
|
248
247
|
return jsanitize([doc.model_dump() for doc in vibe_docs], allow_bson=True)
|
|
249
248
|
|
|
250
|
-
def update_targets(self, items:
|
|
249
|
+
def update_targets(self, items: list[list[dict]]):
|
|
251
250
|
"""
|
|
252
251
|
Inserts the new vibration docs into the vibes collection
|
|
253
252
|
|
|
@@ -1,25 +1,23 @@
|
|
|
1
1
|
from datetime import datetime
|
|
2
2
|
from itertools import chain, groupby
|
|
3
3
|
from math import ceil
|
|
4
|
-
from typing import Any,
|
|
4
|
+
from typing import Any, Iterable, Iterator, Set
|
|
5
5
|
|
|
6
6
|
import networkx as nx
|
|
7
|
-
|
|
8
7
|
from maggma.builders import Builder
|
|
9
8
|
from maggma.stores import Store
|
|
10
9
|
from maggma.utils import grouper
|
|
11
10
|
|
|
12
11
|
from emmet.builders.settings import EmmetBuildSettings
|
|
13
|
-
from emmet.core.
|
|
12
|
+
from emmet.core.qchem.calc_types import CalcType, LevelOfTheory, TaskType
|
|
14
13
|
from emmet.core.qchem.molecule import (
|
|
14
|
+
MoleculeDoc,
|
|
15
15
|
best_lot,
|
|
16
16
|
evaluate_lot,
|
|
17
17
|
evaluate_task_entry,
|
|
18
|
-
MoleculeDoc,
|
|
19
18
|
)
|
|
20
19
|
from emmet.core.qchem.task import TaskDocument
|
|
21
|
-
from emmet.core.
|
|
22
|
-
|
|
20
|
+
from emmet.core.utils import get_molecule_id, group_molecules, jsanitize, make_mol_graph
|
|
23
21
|
|
|
24
22
|
__author__ = "Evan Spotte-Smith <ewcspottesmith@lbl.gov>"
|
|
25
23
|
|
|
@@ -29,9 +27,9 @@ SETTINGS = EmmetBuildSettings()
|
|
|
29
27
|
|
|
30
28
|
def evaluate_molecule(
|
|
31
29
|
mol_doc: MoleculeDoc,
|
|
32
|
-
funct_scores:
|
|
33
|
-
basis_scores:
|
|
34
|
-
solvent_scores:
|
|
30
|
+
funct_scores: dict[str, int] = SETTINGS.QCHEM_FUNCTIONAL_QUALITY_SCORES,
|
|
31
|
+
basis_scores: dict[str, int] = SETTINGS.QCHEM_BASIS_QUALITY_SCORES,
|
|
32
|
+
solvent_scores: dict[str, int] = SETTINGS.QCHEM_SOLVENT_MODEL_QUALITY_SCORES,
|
|
35
33
|
):
|
|
36
34
|
"""
|
|
37
35
|
Helper function to order optimization calcs by
|
|
@@ -106,8 +104,8 @@ class MoleculesAssociationBuilder(Builder):
|
|
|
106
104
|
self,
|
|
107
105
|
tasks: Store,
|
|
108
106
|
assoc: Store,
|
|
109
|
-
query:
|
|
110
|
-
settings:
|
|
107
|
+
query: dict | None = None,
|
|
108
|
+
settings: EmmetBuildSettings | None = None,
|
|
111
109
|
**kwargs,
|
|
112
110
|
):
|
|
113
111
|
"""
|
|
@@ -146,7 +144,7 @@ class MoleculesAssociationBuilder(Builder):
|
|
|
146
144
|
self.assoc.ensure_index("task_ids")
|
|
147
145
|
self.assoc.ensure_index("formula_alphabetical")
|
|
148
146
|
|
|
149
|
-
def prechunk(self, number_splits: int) -> Iterable[
|
|
147
|
+
def prechunk(self, number_splits: int) -> Iterable[dict]: # pragma: no cover
|
|
150
148
|
"""Prechunk the molecule builder for distributed computation"""
|
|
151
149
|
|
|
152
150
|
temp_query = dict(self.query)
|
|
@@ -170,7 +168,7 @@ class MoleculesAssociationBuilder(Builder):
|
|
|
170
168
|
query["species_hash"] = {"$in": list(hash_chunk)}
|
|
171
169
|
yield {"query": query}
|
|
172
170
|
|
|
173
|
-
def get_items(self) -> Iterator[
|
|
171
|
+
def get_items(self) -> Iterator[list[TaskDocument]]:
|
|
174
172
|
"""
|
|
175
173
|
Gets all items to process into molecules (and other) documents.
|
|
176
174
|
This does no datetime checking; relying on on whether
|
|
@@ -252,7 +250,7 @@ class MoleculesAssociationBuilder(Builder):
|
|
|
252
250
|
|
|
253
251
|
yield to_yield
|
|
254
252
|
|
|
255
|
-
def process_item(self, tasks:
|
|
253
|
+
def process_item(self, tasks: list[TaskDocument]) -> list[dict]:
|
|
256
254
|
"""
|
|
257
255
|
Process the tasks into a MoleculeDoc
|
|
258
256
|
|
|
@@ -288,7 +286,7 @@ class MoleculesAssociationBuilder(Builder):
|
|
|
288
286
|
|
|
289
287
|
return jsanitize([mol.model_dump() for mol in molecules], allow_bson=True)
|
|
290
288
|
|
|
291
|
-
def update_targets(self, items:
|
|
289
|
+
def update_targets(self, items: list[list[dict]]):
|
|
292
290
|
"""
|
|
293
291
|
Inserts the new molecules into the molecules collection
|
|
294
292
|
|
|
@@ -314,8 +312,8 @@ class MoleculesAssociationBuilder(Builder):
|
|
|
314
312
|
self.logger.info("No items to update")
|
|
315
313
|
|
|
316
314
|
def filter_and_group_tasks(
|
|
317
|
-
self, tasks:
|
|
318
|
-
) -> Iterator[
|
|
315
|
+
self, tasks: list[TaskDocument]
|
|
316
|
+
) -> Iterator[list[TaskDocument]]:
|
|
319
317
|
"""
|
|
320
318
|
Groups tasks by identical structure
|
|
321
319
|
"""
|
|
@@ -363,8 +361,8 @@ class MoleculesBuilder(Builder):
|
|
|
363
361
|
self,
|
|
364
362
|
assoc: Store,
|
|
365
363
|
molecules: Store,
|
|
366
|
-
query:
|
|
367
|
-
settings:
|
|
364
|
+
query: dict | None = None,
|
|
365
|
+
settings: EmmetBuildSettings | None = None,
|
|
368
366
|
**kwargs,
|
|
369
367
|
):
|
|
370
368
|
"""
|
|
@@ -401,7 +399,7 @@ class MoleculesBuilder(Builder):
|
|
|
401
399
|
self.molecules.ensure_index("task_ids")
|
|
402
400
|
self.molecules.ensure_index("formula_alphabetical")
|
|
403
401
|
|
|
404
|
-
def prechunk(self, number_splits: int) -> Iterable[
|
|
402
|
+
def prechunk(self, number_splits: int) -> Iterable[dict]: # pragma: no cover
|
|
405
403
|
"""Prechunk the molecule builder for distributed computation"""
|
|
406
404
|
|
|
407
405
|
temp_query = dict(self.query)
|
|
@@ -450,7 +448,7 @@ class MoleculesBuilder(Builder):
|
|
|
450
448
|
query["species_hash"] = {"$in": list(hash_chunk)}
|
|
451
449
|
yield {"query": query}
|
|
452
450
|
|
|
453
|
-
def get_items(self) -> Iterator[
|
|
451
|
+
def get_items(self) -> Iterator[list[dict]]:
|
|
454
452
|
"""
|
|
455
453
|
Gets all items to process into molecules (and other) documents.
|
|
456
454
|
This does no datetime checking; relying on on whether
|
|
@@ -520,12 +518,12 @@ class MoleculesBuilder(Builder):
|
|
|
520
518
|
|
|
521
519
|
yield assoc
|
|
522
520
|
|
|
523
|
-
def process_item(self, items:
|
|
521
|
+
def process_item(self, items: list[dict]) -> list[dict]:
|
|
524
522
|
"""
|
|
525
523
|
Process the tasks into a MoleculeDoc
|
|
526
524
|
|
|
527
525
|
Args:
|
|
528
|
-
tasks
|
|
526
|
+
tasks list[dict] : a list of task docs
|
|
529
527
|
|
|
530
528
|
Returns:
|
|
531
529
|
[dict] : a list of new molecule docs
|
|
@@ -556,18 +554,18 @@ class MoleculesBuilder(Builder):
|
|
|
556
554
|
levels_of_theory = dict()
|
|
557
555
|
solvents = dict()
|
|
558
556
|
lot_solvents = dict()
|
|
559
|
-
unique_calc_types: Set[
|
|
560
|
-
unique_task_types: Set[
|
|
561
|
-
unique_levels_of_theory: Set[
|
|
557
|
+
unique_calc_types: Set[str | CalcType] = set()
|
|
558
|
+
unique_task_types: Set[str | TaskType] = set()
|
|
559
|
+
unique_levels_of_theory: Set[str | LevelOfTheory] = set()
|
|
562
560
|
unique_solvents: Set[str] = set()
|
|
563
561
|
unique_lot_solvents: Set[str] = set()
|
|
564
562
|
origins = list()
|
|
565
563
|
entries = list()
|
|
566
|
-
best_entries:
|
|
564
|
+
best_entries: dict[str, Any] = dict()
|
|
567
565
|
constituent_molecules = list()
|
|
568
566
|
similar_molecules = list()
|
|
569
567
|
|
|
570
|
-
base_doc:
|
|
568
|
+
base_doc: MoleculeDoc | None = None
|
|
571
569
|
|
|
572
570
|
# Grab best doc for each solvent
|
|
573
571
|
# A doc is given a solvent based on how the molecule was optimized
|
|
@@ -658,7 +656,7 @@ class MoleculesBuilder(Builder):
|
|
|
658
656
|
[mol.model_dump() for mol in complete_mol_docs], allow_bson=True
|
|
659
657
|
)
|
|
660
658
|
|
|
661
|
-
def update_targets(self, items:
|
|
659
|
+
def update_targets(self, items: list[list[dict]]):
|
|
662
660
|
"""
|
|
663
661
|
Inserts the new molecules into the molecules collection
|
|
664
662
|
|
|
@@ -691,7 +689,7 @@ class MoleculesBuilder(Builder):
|
|
|
691
689
|
else:
|
|
692
690
|
self.logger.info("No items to update")
|
|
693
691
|
|
|
694
|
-
def group_mol_docs(self, assoc:
|
|
692
|
+
def group_mol_docs(self, assoc: list[MoleculeDoc]) -> Iterator[list[MoleculeDoc]]:
|
|
695
693
|
"""
|
|
696
694
|
Groups molecules by:
|
|
697
695
|
- highest level of theory
|
|
@@ -711,7 +709,7 @@ class MoleculesBuilder(Builder):
|
|
|
711
709
|
|
|
712
710
|
# Group by charge and spin
|
|
713
711
|
for c_s, group in groupby(sorted(assoc, key=charge_spin), key=charge_spin):
|
|
714
|
-
subgroups:
|
|
712
|
+
subgroups: list[dict[str, Any]] = list()
|
|
715
713
|
for mol_doc in group:
|
|
716
714
|
mol_graph = make_mol_graph(mol_doc.molecule)
|
|
717
715
|
mol_hash = mol_doc.species_hash
|
emmet/builders/settings.py
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
"""
|
|
2
2
|
Settings for defaults in the build pipelines for the Materials Project
|
|
3
3
|
"""
|
|
4
|
-
from typing import List
|
|
5
4
|
|
|
6
5
|
from pydantic.fields import Field
|
|
7
6
|
|
|
8
7
|
from emmet.core.provenance import Author, History
|
|
8
|
+
from emmet.core.qchem.calc_types import TaskType as QChemTaskType
|
|
9
9
|
from emmet.core.settings import EmmetSettings
|
|
10
10
|
from emmet.core.vasp.calc_types import TaskType as VaspTaskType
|
|
11
|
-
from emmet.core.qchem.calc_types import TaskType as QChemTaskType
|
|
12
11
|
|
|
13
12
|
|
|
14
13
|
class EmmetBuildSettings(EmmetSettings):
|
|
@@ -18,28 +17,28 @@ class EmmetBuildSettings(EmmetSettings):
|
|
|
18
17
|
EMMET_CONFIG_FILE to point to the json with emmet settings
|
|
19
18
|
"""
|
|
20
19
|
|
|
21
|
-
BUILD_TAGS:
|
|
20
|
+
BUILD_TAGS: list[str] = Field(
|
|
22
21
|
[], description="Tags for calculations to build materials"
|
|
23
22
|
)
|
|
24
|
-
EXCLUDED_TAGS:
|
|
23
|
+
EXCLUDED_TAGS: list[str] = Field(
|
|
25
24
|
[],
|
|
26
25
|
description="Tags to exclude from materials",
|
|
27
26
|
)
|
|
28
27
|
|
|
29
|
-
DEPRECATED_TAGS:
|
|
28
|
+
DEPRECATED_TAGS: list[str] = Field(
|
|
30
29
|
[], description="Tags for calculations to deprecate"
|
|
31
30
|
)
|
|
32
31
|
|
|
33
|
-
NON_COMMERCIAL_TAGS:
|
|
32
|
+
NON_COMMERCIAL_TAGS: list[str] = Field(
|
|
34
33
|
[], description="Tages for which to add BY-NC as license data in builder_meta"
|
|
35
34
|
)
|
|
36
35
|
|
|
37
|
-
VASP_ALLOWED_VASP_TYPES:
|
|
36
|
+
VASP_ALLOWED_VASP_TYPES: list[VaspTaskType] = Field(
|
|
38
37
|
[t.value for t in VaspTaskType],
|
|
39
38
|
description="Allowed task_types to build materials from",
|
|
40
39
|
)
|
|
41
40
|
|
|
42
|
-
QCHEM_ALLOWED_TASK_TYPES:
|
|
41
|
+
QCHEM_ALLOWED_TASK_TYPES: list[QChemTaskType] = Field(
|
|
43
42
|
[
|
|
44
43
|
"Single Point",
|
|
45
44
|
"Force",
|
emmet/builders/utils.py
CHANGED
|
@@ -7,7 +7,7 @@ from gzip import GzipFile
|
|
|
7
7
|
from io import BytesIO
|
|
8
8
|
from itertools import chain, combinations
|
|
9
9
|
from pathlib import Path
|
|
10
|
-
from typing import Any, Literal,
|
|
10
|
+
from typing import Any, Literal, Set
|
|
11
11
|
|
|
12
12
|
import orjson
|
|
13
13
|
from botocore.exceptions import ClientError
|
|
@@ -65,7 +65,7 @@ def get_hop_cutoff(
|
|
|
65
65
|
algorithm: str = "min_distance",
|
|
66
66
|
min_hop_distance: float = 1,
|
|
67
67
|
max_hop_distance: float = 7,
|
|
68
|
-
) ->
|
|
68
|
+
) -> float | None:
|
|
69
69
|
"""
|
|
70
70
|
A function to get an appropriate hop distance cutoff for a given migration
|
|
71
71
|
graph structure which can be used for MigrationGraph.with_distance()
|
|
@@ -165,7 +165,7 @@ def query_open_data(
|
|
|
165
165
|
key: str,
|
|
166
166
|
monty_decode: bool = True,
|
|
167
167
|
s3_resource: Any = None,
|
|
168
|
-
) ->
|
|
168
|
+
) -> dict | None:
|
|
169
169
|
"""Query a Materials Project AWS S3 Open Data bucket directly with boto3
|
|
170
170
|
|
|
171
171
|
Args:
|
|
@@ -173,7 +173,7 @@ def query_open_data(
|
|
|
173
173
|
prefix (str): Full set of file prefixes
|
|
174
174
|
key (str): Key for file
|
|
175
175
|
monty_decode (bool): Whether to monty decode or keep as dictionary. Defaults to True.
|
|
176
|
-
s3_resource (
|
|
176
|
+
s3_resource (Any | None): S3 resource. One will be instantiated if none are provided
|
|
177
177
|
|
|
178
178
|
Returns:
|
|
179
179
|
dict: MontyDecoded data or None
|
|
@@ -222,7 +222,7 @@ class HiddenPrints:
|
|
|
222
222
|
|
|
223
223
|
def get_potcar_stats(
|
|
224
224
|
method: Literal["potcar", "pymatgen", "stored"] = "potcar",
|
|
225
|
-
path_to_stored_stats:
|
|
225
|
+
path_to_stored_stats: str | os.PathLike | Path | None = None,
|
|
226
226
|
) -> dict[str, Any]:
|
|
227
227
|
"""
|
|
228
228
|
Get the POTCAR stats used in MP calculations to validate POTCARs.
|
emmet/builders/vasp/materials.py
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
from datetime import datetime
|
|
2
2
|
from itertools import chain
|
|
3
3
|
from math import ceil
|
|
4
|
-
from typing import
|
|
4
|
+
from typing import Iterable, Iterator
|
|
5
5
|
|
|
6
6
|
from maggma.builders import Builder
|
|
7
7
|
from maggma.stores import Store
|
|
8
8
|
from maggma.utils import grouper
|
|
9
9
|
|
|
10
10
|
from emmet.builders.settings import EmmetBuildSettings
|
|
11
|
+
from emmet.core.tasks import TaskDoc
|
|
11
12
|
from emmet.core.utils import group_structures, jsanitize, undeform_structure
|
|
12
13
|
from emmet.core.vasp.calc_types import TaskType
|
|
13
14
|
from emmet.core.vasp.material import MaterialsDoc
|
|
14
|
-
from emmet.core.tasks import TaskDoc
|
|
15
15
|
|
|
16
16
|
__author__ = "Shyam Dwaraknath <shyamd@lbl.gov>"
|
|
17
17
|
|
|
@@ -38,9 +38,9 @@ class MaterialsBuilder(Builder):
|
|
|
38
38
|
self,
|
|
39
39
|
tasks: Store,
|
|
40
40
|
materials: Store,
|
|
41
|
-
task_validation:
|
|
42
|
-
query:
|
|
43
|
-
settings:
|
|
41
|
+
task_validation: Store | None = None,
|
|
42
|
+
query: dict | None = None,
|
|
43
|
+
settings: EmmetBuildSettings | None = None,
|
|
44
44
|
**kwargs,
|
|
45
45
|
):
|
|
46
46
|
"""
|
|
@@ -84,7 +84,7 @@ class MaterialsBuilder(Builder):
|
|
|
84
84
|
self.task_validation.ensure_index("task_id")
|
|
85
85
|
self.task_validation.ensure_index("valid")
|
|
86
86
|
|
|
87
|
-
def prechunk(self, number_splits: int) -> Iterable[
|
|
87
|
+
def prechunk(self, number_splits: int) -> Iterable[dict]: # pragma: no cover
|
|
88
88
|
"""Prechunk the materials builder for distributed computation"""
|
|
89
89
|
temp_query = dict(self.query)
|
|
90
90
|
temp_query["state"] = "successful"
|
|
@@ -114,7 +114,7 @@ class MaterialsBuilder(Builder):
|
|
|
114
114
|
for formula_chunk in grouper(to_process_forms, N):
|
|
115
115
|
yield {"query": {"formula_pretty": {"$in": list(formula_chunk)}}}
|
|
116
116
|
|
|
117
|
-
def get_items(self) -> Iterator[
|
|
117
|
+
def get_items(self) -> Iterator[list[dict]]:
|
|
118
118
|
"""
|
|
119
119
|
Gets all items to process into materials documents.
|
|
120
120
|
This does no datetime checking; relying on whether
|
|
@@ -213,7 +213,7 @@ class MaterialsBuilder(Builder):
|
|
|
213
213
|
|
|
214
214
|
yield tasks
|
|
215
215
|
|
|
216
|
-
def process_item(self, items:
|
|
216
|
+
def process_item(self, items: list[dict]) -> list[dict]:
|
|
217
217
|
"""
|
|
218
218
|
Process the tasks into a list of materials
|
|
219
219
|
|
|
@@ -273,7 +273,7 @@ class MaterialsBuilder(Builder):
|
|
|
273
273
|
|
|
274
274
|
return jsanitize([mat.model_dump() for mat in materials], allow_bson=True)
|
|
275
275
|
|
|
276
|
-
def update_targets(self, items:
|
|
276
|
+
def update_targets(self, items: list[list[dict]]):
|
|
277
277
|
"""
|
|
278
278
|
Inserts the new task_types into the task_types collection
|
|
279
279
|
|
|
@@ -297,8 +297,8 @@ class MaterialsBuilder(Builder):
|
|
|
297
297
|
self.logger.info("No items to update")
|
|
298
298
|
|
|
299
299
|
def filter_and_group_tasks(
|
|
300
|
-
self, tasks:
|
|
301
|
-
) -> Iterator[
|
|
300
|
+
self, tasks: list[TaskDoc], task_transformations: list[dict | None]
|
|
301
|
+
) -> Iterator[list[TaskDoc]]:
|
|
302
302
|
"""
|
|
303
303
|
Groups tasks by structure matching
|
|
304
304
|
"""
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
from typing import Dict, Optional
|
|
2
|
-
|
|
3
1
|
from maggma.builders import MapBuilder
|
|
4
2
|
from maggma.core import Store
|
|
5
3
|
|
|
@@ -15,9 +13,9 @@ class TaskValidator(MapBuilder):
|
|
|
15
13
|
self,
|
|
16
14
|
tasks: Store,
|
|
17
15
|
task_validation: Store,
|
|
18
|
-
potcar_stats:
|
|
19
|
-
settings:
|
|
20
|
-
query:
|
|
16
|
+
potcar_stats: dict[CalcType, dict[str, str]] | None = None,
|
|
17
|
+
settings: EmmetBuildSettings | None = None,
|
|
18
|
+
query: dict | None = None,
|
|
21
19
|
**kwargs,
|
|
22
20
|
):
|
|
23
21
|
"""
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
emmet/builders/__init__.py,sha256=y-ZREtieuFK3MaYvCBDMPf3YLxnsZG1VNho9lMjnRDU,221
|
|
2
|
+
emmet/builders/settings.py,sha256=BcVjKgBUyJ0ntAbqaq_t7tAL3ocNS4Vyms_lesQ0cb4,2880
|
|
3
|
+
emmet/builders/utils.py,sha256=6oI0-Fdhg0kgecnbS4PDgShs4hZQNh_-owq26I9YibE,10883
|
|
4
|
+
emmet/builders/abinit/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
|
+
emmet/builders/abinit/phonon.py,sha256=1prLeHyR10pg03K9v5LU9X44ZGhzEp-kRoqRw7bV15E,32013
|
|
6
|
+
emmet/builders/abinit/sound_velocity.py,sha256=w79Htwl6RAXjmvjcq9yCNmvHSuTEprUXUbrUDL4LeE4,6999
|
|
7
|
+
emmet/builders/feff/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
8
|
+
emmet/builders/feff/xas.py,sha256=wQnO0IcxAclYY4fVoyc4sDqs1Cx7vFzMq-_oIHnk3EU,2068
|
|
9
|
+
emmet/builders/materials/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10
|
+
emmet/builders/materials/absorption_spectrum.py,sha256=i_MlMjFMQVIv03KjteddMk_DEteGl3vr-a_EBdZHSj0,6641
|
|
11
|
+
emmet/builders/materials/alloys.py,sha256=ZAGvwWiPImOvmoHHn3tmSEx07r9gEwU3K249h_YeqAw,14194
|
|
12
|
+
emmet/builders/materials/basic_descriptors.py,sha256=IVCkN0vjkoNis2d_OUezVhPzGpaVcP6IkX123UwB6oQ,5845
|
|
13
|
+
emmet/builders/materials/bonds.py,sha256=TFfkfKG1-7zcim9gPJqRz1UcyVN_px0889VWhSICc5g,1847
|
|
14
|
+
emmet/builders/materials/chemenv.py,sha256=ZTR6_VyAif3yvcSy8xagBkmKczZsDD3LC77RMKi4E0U,1191
|
|
15
|
+
emmet/builders/materials/corrected_entries.py,sha256=n-TpinKzlmeyFpHd_Ienp02Soav440tomOphsCvk_70,12373
|
|
16
|
+
emmet/builders/materials/dielectric.py,sha256=gR1DH9AJdcyiPyZ5co6HVMROKBKrWbRvN8QdPbvQ2BE,6508
|
|
17
|
+
emmet/builders/materials/elasticity.py,sha256=xpxbHhSrLJ-n3_4OmL8anF0YypVrHJ-EgEb5Zaz0gAs,16206
|
|
18
|
+
emmet/builders/materials/electrodes.py,sha256=__YsXb6brJMVJ4z7oNFIgGTygKTKLIju4JwzwhtQesc,23741
|
|
19
|
+
emmet/builders/materials/electronic_structure.py,sha256=S_LRIg5N9mrP81Xu_KM9YOage_DpbDfPuT12LV1CGT0,29431
|
|
20
|
+
emmet/builders/materials/magnetism.py,sha256=hjfOnjwZn0OOvao3Cx6n_9iys26i2Qjm1S8wco5Exo0,4586
|
|
21
|
+
emmet/builders/materials/ml.py,sha256=OD_ImpSI4eY2F4sf3zId3pIISRmGDxOXXx8UdP7iUEs,3494
|
|
22
|
+
emmet/builders/materials/optimade.py,sha256=nNiESdRc_5O8LyK1zQwIyTTM-qIVgR64UOf5APE2T_w,5145
|
|
23
|
+
emmet/builders/materials/oxidation_states.py,sha256=ptTfakXk1bjexniBzx87XCutiuRiolFpnMZETsJlj6I,1670
|
|
24
|
+
emmet/builders/materials/piezoelectric.py,sha256=oHWr4fcpSgCCh_dqgpKSWJqnhb-lxvgx0Tz2tzrTQvw,7689
|
|
25
|
+
emmet/builders/materials/provenance.py,sha256=8ITrBNguaGw3I6ZynG-E-C5vplVPBdicpsUulGfgJxg,9027
|
|
26
|
+
emmet/builders/materials/robocrys.py,sha256=6nVAgqsk2T9VdibCR2eZeVosqwJ2lEt_Yr_4hzotEIA,1257
|
|
27
|
+
emmet/builders/materials/similarity.py,sha256=SIqdmPgs3f7oUQCeu0IBh26y_evYWc0EOEvbIALl-0s,5414
|
|
28
|
+
emmet/builders/materials/substrates.py,sha256=mNHulQjYY_b1B1DePckI9yiLH4_Y3EkQQNMFXGLUJpU,6126
|
|
29
|
+
emmet/builders/materials/summary.py,sha256=gQ4iVeu5FHbXsaCx4Wh81wx8uIJ4brzZYzD7ngUlQhk,8019
|
|
30
|
+
emmet/builders/materials/thermo.py,sha256=1MQkfHpul1aeKccUA8lmcsHO-6YpHhegR2krzWRJ98k,10891
|
|
31
|
+
emmet/builders/matscholar/missing_compositions.py,sha256=rQZELoRXXS-Ew7UPeCwBr1qynI56px1m12VWUYfKKm0,8638
|
|
32
|
+
emmet/builders/mobility/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
33
|
+
emmet/builders/mobility/migration_graph.py,sha256=BxVh3homd9GEniB33_dJ1e2wmRvMnievHHPRs6fnbBw,3899
|
|
34
|
+
emmet/builders/molecules/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
35
|
+
emmet/builders/molecules/atomic.py,sha256=9pyClWlyorHohNPTxhm8NJyxw3SL5gpjWYVq_Bj9j3U,20798
|
|
36
|
+
emmet/builders/molecules/bonds.py,sha256=LMoGpucaizd1L9cR-o975FSh4Kjxq9mbWw0g_qXyNkU,12071
|
|
37
|
+
emmet/builders/molecules/electric.py,sha256=vDnxDj-AzNgxZWx54AyMrscWqa2HnLaQHjXeO_eOpNA,10036
|
|
38
|
+
emmet/builders/molecules/metal_binding.py,sha256=6lqqkBmO-7B5jSkhjwbChru-7Fdc-tcFh_FELMiXjdQ,23275
|
|
39
|
+
emmet/builders/molecules/orbitals.py,sha256=5Bp2HpzTJ7WPKQ8k4P73-IlJJHVIoYLbkhYnNpdz-0o,10031
|
|
40
|
+
emmet/builders/molecules/redox.py,sha256=z9dkv8wrPv7UP8TCkrNc2cL-e3ZSlVWfemLiJyqK1wg,18406
|
|
41
|
+
emmet/builders/molecules/summary.py,sha256=R9eLa_z1zWALIJ-QOJM9AYFlQHpxAyLME2fcQQ6Sdbg,13820
|
|
42
|
+
emmet/builders/molecules/thermo.py,sha256=_9bIh1cjNoryGvSKJVGxTWIRkIAp5Ee-W_PAyA_MsRw,19844
|
|
43
|
+
emmet/builders/molecules/trajectory.py,sha256=If3pLny_Nt17z33a4lQZ_7He-s8vKIp73GUCq6ljO18,18128
|
|
44
|
+
emmet/builders/molecules/vibration.py,sha256=Nodt5gLJGCjiFItv77EY4sIXl2BzxJLUMxmny4OxdUE,9491
|
|
45
|
+
emmet/builders/qchem/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
46
|
+
emmet/builders/qchem/molecules.py,sha256=c9SkxwjXO8FSphwW777v8BB4DrXqopwerAl8iadg7fI,26318
|
|
47
|
+
emmet/builders/vasp/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
48
|
+
emmet/builders/vasp/materials.py,sha256=skjMPX7JaMU3w5LkuiXIGb1avJuIfEXQ2ksG7Rq2m6k,12885
|
|
49
|
+
emmet/builders/vasp/mp_potcar_stats.json.gz,sha256=x3bn4gSMj1U_3bR2qKIaBtbJlYT-EJgoUIMFTA9bvaU,338957
|
|
50
|
+
emmet/builders/vasp/task_validator.py,sha256=nK5GkFySwVFwLciP9-w2JcSN6uJhKthSpxHzpTEeqHU,2878
|
|
51
|
+
emmet_builders-0.84.8.dist-info/METADATA,sha256=S5wiq2CkiHNC5f91aLvxKW6e26pBVzVGSh5ps2rVxR4,2358
|
|
52
|
+
emmet_builders-0.84.8.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
53
|
+
emmet_builders-0.84.8.dist-info/top_level.txt,sha256=6GcpbmWPeFhNCTfDFilb8GQ4T1UQu4z9c5jpobjwE-Q,6
|
|
54
|
+
emmet_builders-0.84.8.dist-info/RECORD,,
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
emmet/builders/__init__.py,sha256=y-ZREtieuFK3MaYvCBDMPf3YLxnsZG1VNho9lMjnRDU,221
|
|
2
|
-
emmet/builders/settings.py,sha256=MR9uTHEir8AO-tCTSSiFDrmDcJQMmIbguIwN278MxUg,2904
|
|
3
|
-
emmet/builders/utils.py,sha256=Cb1WzXJsG_81TvCb1wE5uKxRjI7hxpiUSq_mxsNvEco,10923
|
|
4
|
-
emmet/builders/abinit/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
|
-
emmet/builders/abinit/phonon.py,sha256=OW_Bu5QfItoqZdCvSQQS5zp2TQVgx-JvZpiTmcI-f9o,32054
|
|
6
|
-
emmet/builders/abinit/sound_velocity.py,sha256=Qdw-dd0d3TqnZYVozm8FtAljFJcXkX1pdwSsYdQqyu0,7030
|
|
7
|
-
emmet/builders/feff/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
8
|
-
emmet/builders/feff/xas.py,sha256=E69d131hVCFWx6AuEoq7jZyTDARRFE1Gd_wtoXTP8qA,2098
|
|
9
|
-
emmet/builders/materials/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10
|
-
emmet/builders/materials/absorption_spectrum.py,sha256=pV7aC7CPBgraAizErQ_cd3yMFy5ASHl4GbikfuZInGk,6666
|
|
11
|
-
emmet/builders/materials/alloys.py,sha256=PKOXW-A9lFbISM7JjZi_O3fJhI45-6XPFiRmogID0uY,14244
|
|
12
|
-
emmet/builders/materials/basic_descriptors.py,sha256=IVCkN0vjkoNis2d_OUezVhPzGpaVcP6IkX123UwB6oQ,5845
|
|
13
|
-
emmet/builders/materials/bonds.py,sha256=TFfkfKG1-7zcim9gPJqRz1UcyVN_px0889VWhSICc5g,1847
|
|
14
|
-
emmet/builders/materials/chemenv.py,sha256=IK_dX9yTX5iVB254IM4k-HH7XQSNDrVKQF3RAJRqOMk,1228
|
|
15
|
-
emmet/builders/materials/corrected_entries.py,sha256=s8I0TAAg0Kn9Sc5K07mV1tOy2Iym_ANutZrJYkr4H9A,12417
|
|
16
|
-
emmet/builders/materials/dielectric.py,sha256=wxL2qo5zBoD5q2DvwHMnVPNrWnD7bHiNZUplI86_jvE,6528
|
|
17
|
-
emmet/builders/materials/elasticity.py,sha256=Lpp5uE0A3Te_ab_3wFKYON9u05BizkZn7_ddQM4cLbM,16266
|
|
18
|
-
emmet/builders/materials/electrodes.py,sha256=wbDB-DpnX_V6xdQXKj7tQzIfq5JvqfJDw78QPNDVLDo,23768
|
|
19
|
-
emmet/builders/materials/electronic_structure.py,sha256=5jFPJOuF3OQ_CrpD8B0kkHcd3b0ZwCLoerbMvUYmP1g,29421
|
|
20
|
-
emmet/builders/materials/magnetism.py,sha256=JRy2ljJwNuzCybeJIp9oyfL5b70cCViwGFJDY2RDxuA,4605
|
|
21
|
-
emmet/builders/materials/ml.py,sha256=9IGHJUjwRMrzwXp0_218QS-LAmXEoqmyFqWoxY3UmZM,3599
|
|
22
|
-
emmet/builders/materials/optimade.py,sha256=I2JU2rdyqFVCD3QxiwK6N4B3R5JfK_OZiF3DebYfxBo,5164
|
|
23
|
-
emmet/builders/materials/oxidation_states.py,sha256=ptTfakXk1bjexniBzx87XCutiuRiolFpnMZETsJlj6I,1670
|
|
24
|
-
emmet/builders/materials/piezoelectric.py,sha256=pm7wqlynIZwmDNIcM6EiL1A_t7G5UVri2o59hKkxcfg,7726
|
|
25
|
-
emmet/builders/materials/provenance.py,sha256=tQCUGNgRrQ5UwJGA7kZ-jnnOher0lzMCOzr_KUxGEsI,9062
|
|
26
|
-
emmet/builders/materials/robocrys.py,sha256=EV8srouNdoR3WFsVXMQ-t803tuQOyGR8OJyNkHEy44E,1294
|
|
27
|
-
emmet/builders/materials/similarity.py,sha256=SIqdmPgs3f7oUQCeu0IBh26y_evYWc0EOEvbIALl-0s,5414
|
|
28
|
-
emmet/builders/materials/substrates.py,sha256=LTy44CMGVBBr0XY47gkd7jNY8aFM8npTRnWeUu0hk5c,6144
|
|
29
|
-
emmet/builders/materials/summary.py,sha256=gQ4iVeu5FHbXsaCx4Wh81wx8uIJ4brzZYzD7ngUlQhk,8019
|
|
30
|
-
emmet/builders/materials/thermo.py,sha256=7e_adWq33EocaEgaWkkukDba1V7CHVfzz7Y_eMS-I7I,10922
|
|
31
|
-
emmet/builders/matscholar/missing_compositions.py,sha256=RGQOEhfmJ6YMbjD4osLWqs7chdgVLZegXuLXK_crqeQ,8663
|
|
32
|
-
emmet/builders/mobility/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
33
|
-
emmet/builders/mobility/migration_graph.py,sha256=WEXtPSn0UE5Q8mnvJ-T19FB3_LrZ3ojvNyRBs1PXWRg,3923
|
|
34
|
-
emmet/builders/molecules/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
35
|
-
emmet/builders/molecules/atomic.py,sha256=DBG_FScwT7YU1GgI69yRrR3_wUoWBwiP1uBvbL7xP3Y,20839
|
|
36
|
-
emmet/builders/molecules/bonds.py,sha256=aHp9U_LX3sZvdTIaZj2T8PG_wTFYqw6nOcYC-4MiI0E,12103
|
|
37
|
-
emmet/builders/molecules/electric.py,sha256=ldoLSfIAjue6YQlyXkgJRXLcfh178goiarjI_f_EtH4,10065
|
|
38
|
-
emmet/builders/molecules/metal_binding.py,sha256=kimYsmQWdmukRRX2_GgVywCNRhNHz_-fp2oMYJTVMrg,23308
|
|
39
|
-
emmet/builders/molecules/orbitals.py,sha256=nIsmx0m6Zi402opHE6OoEljGgQ2714p1Gig8Py1IXrU,10060
|
|
40
|
-
emmet/builders/molecules/redox.py,sha256=52er0zK_IVQ0UYUh7svml-zwlvOtbptz1D8ZYCglfI0,18448
|
|
41
|
-
emmet/builders/molecules/summary.py,sha256=7KHsnc9PBstps6s-hK4mYrWOBHt26_PTPKsCSFw3018,13848
|
|
42
|
-
emmet/builders/molecules/thermo.py,sha256=MutvuYJsU0Hj5Qaa_Z7qnikM6mkPSBPNE4RG8JK4qes,19874
|
|
43
|
-
emmet/builders/molecules/trajectory.py,sha256=oKrmWtKJ6mC0d1uJRE7g72X97kkS7JQ7nMhupVOUEUU,18163
|
|
44
|
-
emmet/builders/molecules/vibration.py,sha256=_FA-tRixghsJdlls6oO9U2abxCHWqWv5SucbxpP5mVQ,9520
|
|
45
|
-
emmet/builders/qchem/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
46
|
-
emmet/builders/qchem/molecules.py,sha256=qI8WFOJ69FMPu9hxGzoFR4V3y4qO7UhtzVZwG9AWPpw,26382
|
|
47
|
-
emmet/builders/vasp/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
48
|
-
emmet/builders/vasp/materials.py,sha256=PAqx-_-Z7y4uw87SPJuP9mgeZXIlZe0A2WiA47VFZWw,12929
|
|
49
|
-
emmet/builders/vasp/mp_potcar_stats.json.gz,sha256=x3bn4gSMj1U_3bR2qKIaBtbJlYT-EJgoUIMFTA9bvaU,338957
|
|
50
|
-
emmet/builders/vasp/task_validator.py,sha256=bmRTDiOWof4rpHVg3ksoxocN9xxieYu7IE-ylMjYOVs,2922
|
|
51
|
-
emmet_builders-0.84.7rc4.dist-info/METADATA,sha256=m6g9bc74b9sUO7K1z3HIWcIRVcTjDPJa337aX9vtqtI,2361
|
|
52
|
-
emmet_builders-0.84.7rc4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
53
|
-
emmet_builders-0.84.7rc4.dist-info/top_level.txt,sha256=6GcpbmWPeFhNCTfDFilb8GQ4T1UQu4z9c5jpobjwE-Q,6
|
|
54
|
-
emmet_builders-0.84.7rc4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|