def get_sub_workchain_builder(self, scale_factor, previous_workchain=None): """Return the builder for the relax workchain.""" structure = scale_structure(self.inputs.structure, scale_factor) process_class = WorkflowFactory(self.inputs.sub_process_class) builder = process_class.get_inputs_generator().get_builder( structure, previous_workchain=previous_workchain, **self.inputs.generator_inputs ) builder._update(**self.inputs.get('sub_process', {})) # pylint: disable=protected-access return builder
def get_sub_workchain_builder(self, distance, previous_workchain=None): """Return the builder for the relax workchain.""" molecule = set_distance(self.inputs.molecule, distance) process_class = WorkflowFactory(self.inputs.sub_process_class) builder = process_class.get_inputs_generator().get_builder( molecule, previous_workchain=previous_workchain, **self.inputs.generator_inputs ) builder._update(**self.inputs.get('sub_process', {})) # pylint: disable=protected-access distance_node = molecule.creator.inputs.distance return builder, distance_node