How to use the tasks collection in Mongodb to build the materials collection with MaterialsBuilder #1290
-
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
|
Hi @LuckRookie, I'm a little confused as to why your emmet/emmet-core/emmet/core/vasp/task_valid.py Lines 19 to 26 in 8a4fc37 your snippet is ostensibly doing that here, right: I am going to assume all of your workflows were successful since you are inserting them into mongo. If that's the case, can you just update your tasks collection and set all the |
Beta Was this translation helpful? Give feedback.
-
|
Although you may need to be doing |
Beta Was this translation helpful? Give feedback.



Yes it is reasonable to modify the dictionaries that result from
model_dumping a pydantic model. There are actually quite a few data types that pydantic doesn't know how to serialize, and simply skips (this is an irrelevant detail for your case, but this is because those data types don't define a__get_pydantic_core_schema__classmethod). Enums are a good example, there are also quite a few pymatgen classes as well that won't serialize correctly when callingmodel_dump.Emmet has a utility function that can help with this though:
emmet/emmet-core/emmet/core/utils.py
Line 352 in 8a4fc37
Rather than mess with manually ser…