Thank you, thats exactly the funtion I was looking for. I checked the json file after uploading to the database and it in fact has all the tags I put in using that function.
If its no too much to ask could you please also let me know how to query the database using those tags?
For example, I have done 21 different slab calculations, and all of them as tags - {“system”: “surface”, “bulk”: “__different_based_on_the_bulk_system_of_the_slab”, “term”: “__different_based_on_what_term_i_used”}
Now, if I want to query final energy of only those calculations that has the criteria {“system”: “surface”, “bulk”: “NiO”, “term”: “110”} how can I achieve this using mgdb command. I tried following the example in the website but putting this as dict under --crit did not
(atomate_env) login2.stampede2(1366) mgdb query -c /work/03554/tg828535/stampede2/atomate/config/db.json --crit {"system"} --props task_id formula_pretty output.energy
Criteria {system} is not a valid JSON string!
(atomate_env) login2.stampede2(1367) mgdb query -c /work/03554/tg828535/stampede2/atomate/config/db.json --crit {“system”: “surface”} --props task_id formula_pretty output.energy
usage: mgdb [-h] {init,optimize,insert,query,stats} …
mgdb: error: unrecognized arguments: surface}
``
Or, do I need to use the query_engine to achieve this?
Regards,
Jonayat
···
On Friday, January 26, 2018 at 11:52:11 AM UTC-5, Anubhav Jain wrote:
Hi
I am not sure if you are familiar with the “powerups” module but this allows you to do various things like what you request.
The specific powerup that will do what you want is:
atomate.vasp.powerups.add_additional_fields_to_taskdocs
e.g.,
new_wf = add_additional_fields_to_taskdocs(original_wf, {“my_key”: “my_value”})
Then add new_wf to the LaunchPad. “my_key” will show up as field in the task document after running
Best,
Anubhav
On Fri, Jan 26, 2018 at 1:06 AM, ASM Jonayat [email protected] wrote:
Hello,
I want to add some tags (as dict) to the vasp results I am generating using atomate and uploading the mLab (MongoDB). I found that metadata can be added to workflow using wf_metadata parameter with get_wf(). But these tags do not get uploaded to the database (or I don’t know how to query them - I download the json from mlab database, did not find the tags in there either).
I think one of the main reason for keeping database would be easy query. So, I am assuming this is something that is already builtin but I haven’t figured it out yet. Can anyone help me with this? I want to know how to put tags (as dicts) to my vasp results and how I can use those tags to query results from the database.
Regards,
ASM Jonayat
MNE, PSU
–
You received this message because you are subscribed to the Google Groups “atomate” group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/atomate/4cd909b6-8343-440c-b979-b784816bd2fd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
–
Best,
Anubhav