Source code for schrodinger.pipeline.compiled_functions

"""
Code for pipeline that should only be distibuted in compiled form.

"""

from pymmlibs import mmpipeline_initialize


[docs]def pipeline_init_wrapper(stage_jobs): # for LIGPREP-1732 from schrodinger.pipeline.stages import ligprep as ligprep_stage_module from schrodinger.pipeline.stages import phase as phase_stage_module ligprep_stages = [] phase_stage_present = False for stagejob in stage_jobs: if isinstance(stagejob.stageobj, ligprep_stage_module.LigPrepStage): ligprep_stages.append(stagejob.stageobj) if isinstance(stagejob.stageobj, phase_stage_module.DBManageStage): phase_stage_present = True if phase_stage_present and len(ligprep_stages) == 1: return mmpipeline_initialize() else: return None