Process Block
- class openmsimodel.subworkflow.process_block.ProcessBlock(name: str, process: Process | None, workflow: Workflow = None, material: Material | None = None, ingredients: dict | None = {}, measurements: dict | None = {}, _type: str = None)
Bases:
SubworkflowProcessBlock is a type of Subworkflow intended to represent consecutive BaseElements in the order of ‘Ingredients’, ‘Process’, ‘Material’, and ‘Measurements’. It is the natural order of GEMD objects, and of our BaseElements object, which are essentially GEMD wrappers. It is a loose class and can omit some elements of the block. It can be a powerful way to manipulate, link, dump, etc, GEMD objects together, while Blocks themselves can be linked with one another, facilitating repeat elements, linking for wide (i.e., many ingredients, many measurements) or vertical (i.e., long sequence of BaseElements) workflow, etc.
- link_within()
this functions links the specs and runs of the BaseElements in the current block.
- link_prior(prior_block: ProcessBlock, ingredient_name_to_link: str)
links the prior block’s material to current ingredient.
- Args:
prior_block (Block): prior block containing the material to link ingredient_name_to_link (str): name of the ingredient in current block to link to prior material
- link_posterior(posterior_block: ProcessBlock, ingredient_name_to_link: str)
link the posterior block’s ingredient to current material
- Args:
posterior_block (Block): posterior block containing the ingredient to link ingredient_name_to_link (str): _description_
- add_ingredient(ingredient: Ingredient)
add ingredient to block
- add_measurement(measurement: Measurement)
add measurement to block