-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change how electrode flow retrieves charge density data #1055
base: main
Are you sure you want to change the base?
Conversation
@esoteric-ephemera does it make sense to add the data to tge datastore for other parts of the workflow? It will surely fail at some point |
It should work in this setup because the charge density is only used in one part of the flow ( Maybe @jmmshn has thoughts on this - don't want to break the flow logic |
@@ -204,7 +202,8 @@ def get_insertion_electrode_doc( | |||
|
|||
@job | |||
def get_inserted_structures( | |||
chg: VolumetricData, | |||
prev_dir: Path | str, | |||
get_charge_density: Callable, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
get_charge_density: Callable, | |
get_charge_density: Callable[[str | Path, VolumetricData] |
@@ -213,7 +212,8 @@ def get_inserted_structures( | |||
|
|||
Parameters | |||
---------- | |||
chg: The charge density. | |||
prev_dir: The previous directory where the static calculation was performed. | |||
get_charge_density: A function to get the charge density from a task document. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
get_charge_density: A function to get the charge density from a task document. | |
get_charge_density: A function to get the charge density from a run directory. |
@esoteric-ephemera, copying the file over was kind of a fireworks-related hack. |
20e0c81
to
d532d7f
Compare
Small change in the electrode insertion workflow to avoid needing large object storage: Currently there's a
get_charge_density_job
function which does not point its output to e.g. GridFS. That causes problems when trying to store a CHGCAR in normal mongo storesI've moved the
get_charge_density_job
withinget_inserted_structures
so that the charge density is not stored when generating inserted structures (it still may be stored in the user's GridFS from the static calc)Another solution would be just adding a
data=[Chgcar]
kwarg to theget_charge_density_job
function, but I think it makes more sense to removeget_charge_density_job