:orphan: :mod:`atsim.potentials._modifiers` ================================== .. py:module:: atsim.potentials._modifiers Module Contents --------------- Functions ~~~~~~~~~ .. autoapisummary:: atsim.potentials._modifiers.modifier atsim.potentials._modifiers.is_modifier atsim.potentials._modifiers.sum atsim.potentials._modifiers.product atsim.potentials._modifiers.pow atsim.potentials._modifiers.spline atsim.potentials._modifiers.trans .. function:: modifier(func) .. function:: is_modifier(obj) .. function:: sum(potential_forms, potential_form_builder) Modifier that sums all the potential instances given as arguments. :param potential_forms: List of tuples that can be passed to `atsim.potentials.config._potential_form_builder.Potential_Form_Builder.create_potential_function()` to create potential callables. :param potential_form_builder: `atsim.potentials.config._potential_form_builder.Potential_Form_Builder` used to create potential instances. :returns: Potential callable sums that values from a number of potential instances. .. function:: product(potential_forms, potential_form_builder) Modifier that takes the product of the potential instances given as arguments. :param potential_forms: List of tuples that can be passed to `atsim.potentials.config._potential_form_builder.Potential_Form_Builder.create_potential_function()` to create potential callables. :param potential_form_builder: `atsim.potentials.config._potential_form_builder.Potential_Form_Builder` used to create potential instances. :returns: Potential callable that takes the product of a number of potential instances. .. function:: pow(potential_forms, potential_form_builder) Modifier that takes two arguments and raises the first potential-form to the power of the second. e.g. pow(as.buck 1000.0 0.2 32.0, as.constant 2.0) Would square the given Buckingham potential. :param potential_forms: List of tuples that can be passed to `atsim.potentials.config._potential_form_builder.Potential_Form_Builder.create_potential_function()` to create potential callables. :param potential_form_builder: `atsim.potentials.config._potential_form_builder.Potential_Form_Builder` used to create potential instances. :returns: Potential callable that takes the product of a number of potential instances. .. function:: spline(potential_forms, potential_form_builder) Modifier that smoothly splines between two potential forms by linking them with an intermediate spline. The `potential_forms` list must contain a single `PotentialFormInstanceTuple` entre. The tuple must only define three sections - potential form A -> spline -> potential form B. The extent of the spline is defined by where the middle region starts and potential form B starts. As a configuration string this might be defined as: `>0 as.zbl 14 8 >=0.8 exp_spline >=1.4 as.buck 180003 0.3 32.0` Which would create a `zbl` and Buckingham potential connected by a spline when `r` is between 0.8 and 1.4. At present the potential form label for the spline must be `exp_spline` or `buck4_spline`. :param potential_forms: List of tuples that can be passed to `atsim.potentials.config._potential_form_builder.Potential_Form_Builder.create_potential_function()` to create potential callables. :param potential_form_builder: `atsim.potentials.config._potential_form_builder.Potential_Form_Builder` used to create potential instances. :returns: Potential callable representing splined potentials. .. function:: trans(potential_forms, potential_form_builder) Modifier that takes two arguments the first is a potential form and the second must be an instance of as.constant. This modifier performs the operation: potential_form(r+X) where X is the value parameter for the as.constant argument. e.g. trans(as.buck 1000.0 0.2 32.0, as.constant 2.0) :param potential_forms: List of tuples that can be passed to `atsim.potentials.config._potential_form_builder.Potential_Form_Builder.create_potential_function()` to create potential callables. :param potential_form_builder: `atsim.potentials.config._potential_form_builder.Potential_Form_Builder` used to create potential instances. :returns: Potential callable transforms the input to the potential-form.