ovo.core.logic.design_logic

Module Contents

Functions

get_design_jobs_table

Get pandas DataFrame with job and pool metadata and workflow parameter information.

get_pools_table

format_pool_status

get_workflows_table

Get pandas DataFrame with workflow parameter information for each pool.

submit_design_workflow

Submit a design workflow to the scheduler and create a Pool and DesignJob in the DB.

get_log

Get the log of a design job from the scheduler.

process_results

Process the results of a design job and return the pool object.

update_acceptance_thresholds

Update the accepted designs in a pool based on the given acceptance thresholds.

update_accepted_design_ids

set_designs_accepted

Update the accepted field of designs based on the given thresholds (does not save to DB)

collect_storage_paths

Collect storage paths from designs based on fields returned by DesignWorkflow.get_download_fields().

API

ovo.core.logic.design_logic.get_design_jobs_table(project_id: str = None, round_ids: list[str] = None, update=True, **pool_filters) pandas.DataFrame

Get pandas DataFrame with job and pool metadata and workflow parameter information.

ovo.core.logic.design_logic.get_pools_table(project_id: str = None, round_ids: list[str] = None)
ovo.core.logic.design_logic.format_pool_status(job: ovo.core.database.models.DesignJob, processed: bool, update_status: bool = True)
ovo.core.logic.design_logic.get_workflows_table(jobs: list[ovo.core.database.models.DesignJob])

Get pandas DataFrame with workflow parameter information for each pool.

ovo.core.logic.design_logic.submit_design_workflow(workflow: ovo.core.database.models.Workflow, scheduler_key: str, round_id: str, pool_name: str, pool_description: str, return_existing: bool = True, pipeline_name: str = None) tuple[ovo.core.database.models.DesignJob, ovo.core.database.models.Pool]

Submit a design workflow to the scheduler and create a Pool and DesignJob in the DB.

Parameters:
  • workflow – Workflow object to submit

  • scheduler_key – Key of the scheduler to use

  • round_id – ID of the Round to associate the Pool with

  • pool_name – Name of the Pool to create

  • pool_description – Description of the Pool to create

  • return_existing – If a Pool with the same name and parameters already exists in this round, return it instead of raising an error

  • pipeline_name – Override the pipeline name to submit, e.g. ovo.rfdiffusion-end-to-end or a github url with @version

Returns:

Tuple of (DesignJob, Pool)

ovo.core.logic.design_logic.get_log(design_job: ovo.core.database.models.DesignJob, tail: int = None) str

Get the log of a design job from the scheduler.

ovo.core.logic.design_logic.process_results(design_job: ovo.core.database.models.DesignJob, callback: Callable = None, wait=True) ovo.core.database.models.Pool

Process the results of a design job and return the pool object.

This downloads/copies the workflow results into Storage and saves the Design and DescriptorValue objects to the database.

ovo.core.logic.design_logic.update_acceptance_thresholds(pools: list[ovo.core.database.models.Pool], acceptance_thresholds: dict[str, ovo.core.database.models.Threshold])

Update the accepted designs in a pool based on the given acceptance thresholds.

Save the Design objects and the DesignJob.workflow.acceptance_thresholds to the DB.

ovo.core.logic.design_logic.update_accepted_design_ids(pool_ids: list[str], accepted_design_ids: list[str])
ovo.core.logic.design_logic.set_designs_accepted(designs: list[ovo.core.database.models.Design], descriptor_values: list[ovo.core.database.models.DescriptorValue], thresholds: dict[str, ovo.core.database.models.Threshold])

Update the accepted field of designs based on the given thresholds (does not save to DB)

ovo.core.logic.design_logic.collect_storage_paths(download_fields: dict[str, tuple[ovo.core.database.models.Base, str]], design_ids: list) list[str]

Collect storage paths from designs based on fields returned by DesignWorkflow.get_download_fields().