Refactoring of WorkGraphs and input schema#71
Open
t-reents wants to merge 8 commits into
Open
Conversation
Moreover, some small restructuring related to the utils.
uniqueness analysis This simplifies the several stages of relaxation in the big inpainting workflow. Moreover, it makes it easier to enable symmetry refinement and uniqueness analysis at different stages of the workflow.
The input schema was significantly adjusted and the inpainting WorkGraph was also updated to adopt the `task.graph` approach.
This was
linked to
issues
May 27, 2026
t-reents
commented
May 27, 2026
t-reents
commented
May 27, 2026
Comment on lines
+58
to
+59
| code_label: AiiDA code label for all inner pythonjob tasks. If | ||
| ``None``, aiida-pythonjob locates ``python3`` automatically. |
Collaborator
Author
There was a problem hiding this comment.
I should differentiate the different codes. The relaxation is likely on a remote machine, whereas the other post-processing ones can run locally
|
|
||
| wg = WorkGraph() | ||
| @task.graph | ||
| def InpaintingWorkGraph(inputs: XtalPaintConfig): |
Collaborator
Author
There was a problem hiding this comment.
Again, each task should potentially receive individual options/computational resources
| usempi=inp_opts.withmpi, | ||
| metadata={ | ||
| "call_link_label": "inpainting", | ||
| "options": inp_opts.model_dump(exclude={"withmpi"}), |
Collaborator
Author
There was a problem hiding this comment.
This should be fixed. The AiiDA withmpi should still be in the options
| # Post-relaxation steps | ||
| refine: bool = False | ||
| refinement_symprec: float = 0.01 | ||
| refinement_primitive: bool = False |
Collaborator
Author
There was a problem hiding this comment.
Why not using the RefinementConfig?
| return self.params.model_dump(exclude={"elements_to_relax"}) | ||
|
|
||
|
|
||
| class RelaxationConfig(RelaxationGraphConfig): |
Collaborator
Author
There was a problem hiding this comment.
Rename, to make clear that it's a specific part of the Inpainting workflow.
| default_code_label: Optional[str] = None | ||
| inpainting_code_label: Optional[str] = None | ||
| relax_code_label: Optional[str] = None | ||
| candidate_generation_code_label: Optional[str] = None |
Collaborator
Author
There was a problem hiding this comment.
Also add uniqueness and refinement code label?
| code=orm.load_code(code_label) if code_label else None, | ||
| as_graph_outputs=True, | ||
| # --- Pre-refinement (before relaxation) --- | ||
| if inputs.pre_refinement is not None: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.