emmet-builders 0.48.3__py3-none-any.whl → 0.48.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.
Potentially problematic release.
This version of emmet-builders might be problematic. Click here for more details.
- emmet/builders/abinit/phonon.py +2 -1
- emmet/builders/abinit/sound_velocity.py +10 -10
- emmet/builders/vasp/materials.py +1 -1
- {emmet_builders-0.48.3.dist-info → emmet_builders-0.48.5.dist-info}/METADATA +1 -1
- {emmet_builders-0.48.3.dist-info → emmet_builders-0.48.5.dist-info}/RECORD +7 -7
- {emmet_builders-0.48.3.dist-info → emmet_builders-0.48.5.dist-info}/WHEEL +0 -0
- {emmet_builders-0.48.3.dist-info → emmet_builders-0.48.5.dist-info}/top_level.txt +0 -0
emmet/builders/abinit/phonon.py
CHANGED
|
@@ -56,7 +56,8 @@ class PhononBuilder(Builder):
|
|
|
56
56
|
standard MongoDB document.
|
|
57
57
|
|
|
58
58
|
Args:
|
|
59
|
-
|
|
59
|
+
phonon_materials (Store): source Store of phonon materials documents
|
|
60
|
+
containing abinit_input and abinit_output.
|
|
60
61
|
ddb_source (Store): source Store of ddb files. Matching the data in the materials Store.
|
|
61
62
|
phonon (Store): target Store of the phonon properties
|
|
62
63
|
phonon_bs (Store): target Store for the phonon band structure. The document may
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import tempfile
|
|
2
|
-
import gridfs
|
|
3
2
|
import traceback
|
|
4
3
|
from typing import Optional, Dict, List, Iterator
|
|
5
4
|
|
|
@@ -16,7 +15,8 @@ from emmet.core.utils import jsanitize
|
|
|
16
15
|
class SoundVelocityBuilder(Builder):
|
|
17
16
|
def __init__(
|
|
18
17
|
self,
|
|
19
|
-
|
|
18
|
+
phonon_materials: Store,
|
|
19
|
+
ddb_source: Store,
|
|
20
20
|
sound_vel: Store,
|
|
21
21
|
query: Optional[dict] = None,
|
|
22
22
|
manager: Optional[TaskManager] = None,
|
|
@@ -27,14 +27,17 @@ class SoundVelocityBuilder(Builder):
|
|
|
27
27
|
the phonon calculations.
|
|
28
28
|
|
|
29
29
|
Args:
|
|
30
|
-
|
|
30
|
+
phonon_materials (Store): source Store of phonon materials documents
|
|
31
|
+
containing abinit_input and abinit_output.
|
|
32
|
+
ddb_source (Store): source Store of ddb files. Matching the data in the materials Store.
|
|
31
33
|
sound_vel (Store): target Store of the sound velocity
|
|
32
34
|
query (dict): dictionary to limit materials to be analyzed
|
|
33
35
|
manager (TaskManager): an instance of the abipy TaskManager. If None it will be
|
|
34
36
|
generated from user configuration.
|
|
35
37
|
"""
|
|
36
38
|
|
|
37
|
-
self.
|
|
39
|
+
self.phonon_materials = phonon_materials
|
|
40
|
+
self.ddb_source = ddb_source
|
|
38
41
|
self.sound_vel = sound_vel
|
|
39
42
|
self.query = query or {}
|
|
40
43
|
|
|
@@ -43,7 +46,7 @@ class SoundVelocityBuilder(Builder):
|
|
|
43
46
|
else:
|
|
44
47
|
self.manager = manager
|
|
45
48
|
|
|
46
|
-
super().__init__(sources=[
|
|
49
|
+
super().__init__(sources=[phonon_materials], targets=[sound_vel], **kwargs)
|
|
47
50
|
|
|
48
51
|
def get_items(self) -> Iterator[Dict]:
|
|
49
52
|
"""
|
|
@@ -71,15 +74,12 @@ class SoundVelocityBuilder(Builder):
|
|
|
71
74
|
# file ids to be fetched
|
|
72
75
|
projection["abinit_output.ddb_id"] = 1
|
|
73
76
|
|
|
74
|
-
# initialize the gridfs
|
|
75
|
-
ddbfs = gridfs.GridFS(self.materials.collection.database, "ddb_fs")
|
|
76
|
-
|
|
77
77
|
for m in mats:
|
|
78
|
-
item = self.
|
|
78
|
+
item = self.phonon_materials.query_one(properties=projection, criteria={self.phonon_materials.key: m})
|
|
79
79
|
|
|
80
80
|
# Read the DDB file and pass as an object. Do not write here since in case of parallel
|
|
81
81
|
# execution each worker will write its own file.
|
|
82
|
-
item["ddb_str"] =
|
|
82
|
+
item["ddb_str"] = self.ddb_source.get(item["abinit_output"]["ddb_id"]).read().decode("utf-8")
|
|
83
83
|
|
|
84
84
|
yield item
|
|
85
85
|
|
emmet/builders/vasp/materials.py
CHANGED
|
@@ -310,7 +310,7 @@ class MaterialsBuilder(Builder):
|
|
|
310
310
|
if (
|
|
311
311
|
transmuter is None
|
|
312
312
|
): # Do not include deformed tasks without transmuter information
|
|
313
|
-
self.logger.
|
|
313
|
+
self.logger.debug(
|
|
314
314
|
"Cannot find transmuter for deformation task {}. Excluding task.".format(
|
|
315
315
|
task.task_id
|
|
316
316
|
)
|
|
@@ -2,8 +2,8 @@ emmet/builders/__init__.py,sha256=y-ZREtieuFK3MaYvCBDMPf3YLxnsZG1VNho9lMjnRDU,22
|
|
|
2
2
|
emmet/builders/settings.py,sha256=xVIqpQjSxn--m6mbKJIr7g-nqoqZr1Vcxi3YNa3etOg,2766
|
|
3
3
|
emmet/builders/utils.py,sha256=VtA_77cBqzKBaA747FBbcPX3M0QmQE-l2nMLzlQwijw,5775
|
|
4
4
|
emmet/builders/abinit/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
|
-
emmet/builders/abinit/phonon.py,sha256=
|
|
6
|
-
emmet/builders/abinit/sound_velocity.py,sha256=
|
|
5
|
+
emmet/builders/abinit/phonon.py,sha256=PvWoSf6ZeMuO6jE1vL6iYXoWZCEyFucd2W0x7B8ELsY,29925
|
|
6
|
+
emmet/builders/abinit/sound_velocity.py,sha256=mqUVrHmmK2B7pLPhNcPlQIOAOM6IUdCgGTzUu5AD77A,5984
|
|
7
7
|
emmet/builders/feff/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
8
8
|
emmet/builders/feff/xas.py,sha256=JZAU69tZXI_JEkzNxwVruebcRVcTZJnQON3H0cbrnvg,2093
|
|
9
9
|
emmet/builders/materials/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -40,9 +40,9 @@ emmet/builders/molecules/vibration.py,sha256=C_2itk6hfCVrSQieYxNWAmArJ8zx385gs3A
|
|
|
40
40
|
emmet/builders/qchem/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
41
41
|
emmet/builders/qchem/molecules.py,sha256=ew1dT0JDvoIP1yUTWfoRkYox9g49fkOnAc636niK-Nk,25379
|
|
42
42
|
emmet/builders/vasp/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
43
|
-
emmet/builders/vasp/materials.py,sha256=
|
|
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.48.
|
|
46
|
-
emmet_builders-0.48.
|
|
47
|
-
emmet_builders-0.48.
|
|
48
|
-
emmet_builders-0.48.
|
|
45
|
+
emmet_builders-0.48.5.dist-info/METADATA,sha256=5TQMSHHR7JpdYZ1FEysdYn3kM2OVyxcvkLAUns_emqI,1449
|
|
46
|
+
emmet_builders-0.48.5.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
|
|
47
|
+
emmet_builders-0.48.5.dist-info/top_level.txt,sha256=6GcpbmWPeFhNCTfDFilb8GQ4T1UQu4z9c5jpobjwE-Q,6
|
|
48
|
+
emmet_builders-0.48.5.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|