示例#1
0
ifs = DatasetReaderCube("ifs")
ifs.promote_parameter("data_in",
                      promoted_name="in",
                      title="System Input OERecord",
                      description="OERecord file name")

confGather = ConformerGatheringData("Gathering Conformer Records")
ligTrajCube = ParallelConfTrajsToLigTraj("ConfTrajsToLigTraj")
ligMMPBSA = ParallelConcatenateTrajMMPBSACube('ConcatenateTrajMMPBSACube')

ofs = DatasetWriterCube('ofs', title='OFS-Success')
ofs.promote_parameter("data_out",
                      promoted_name="out",
                      title="System Output OERecord",
                      description="OERecord file name")

fail = DatasetWriterCube('fail', title='Failures')
fail.promote_parameter("data_out", promoted_name="fail")

job.add_cubes(ifs, confGather, ligTrajCube, ligMMPBSA, ofs, fail)

ifs.success.connect(confGather.intake)
confGather.success.connect(ligTrajCube.intake)
ligTrajCube.success.connect(ligMMPBSA.intake)
ligMMPBSA.success.connect(ofs.intake)
ligMMPBSA.failure.connect(fail.intake)

if __name__ == "__main__":
    job.run()
示例#2
0
from {{cookiecutter.module_name}} import MyCube


# Declare and document floe
my_floe = WorkFloe('my_floe', title="My Floe")
my_floe.description = "Outputs the input records unchanged unless the parameter is set to false, in which case nothing " \
                   "is outputted"
my_floe.classification = [["Examples"]]
my_floe.tags = ["Examples", "I didn't edit the tags"]

# Declare Cubes
input_cube = DatasetReaderCube('input_cube')
switch_cube = MyCube('switch_cube')
output_cube = DatasetWriterCube('output_cube')

# Add cubes to floe
my_floe.add_cube(input_cube)
my_floe.add_cube(switch_cube)
my_floe.add_cube(output_cube)

# Promote parameters
input_cube.promote_parameter('data_in', promoted_name='in', title='Input data set of records')
switch_cube.promote_parameter('switch', promoted_name='switch', title="Switch controlling Output")
output_cube.promote_parameter('data_out', promoted_name='out', title='Output File of Molecules')

input_cube.success.connect(switch_cube.intake)
switch_cube.success.connect(output_cube.intake)

if __name__ == "__main__":
    my_floe.run()