propertyestimator.workflow.decorators.protocol_input¶
-
propertyestimator.workflow.decorators.
protocol_input
(value_type, merge_behavior=<MergeBehaviour.ExactlyEqual: (0, )>)[source]¶ A custom decorator used to mark a protocol attribute as a possible input.
Examples
To mark an attribute as an input:
>>> from propertyestimator.substances import Substance >>> >>> @protocol_input(value_type=Substance) >>> def substance(self, value): >>> pass
To control how this input should behave when protocols are being / considered being merged, use the merge_behavior attribute:
>>> @protocol_input(value_type=int, merge_behavior=MergeBehaviour.GreatestValue) >>> def simulation_steps(self, value): >>> pass