:orphan: :mod:`atsim.potentials._multi_range_potential_form` =================================================== .. py:module:: atsim.potentials._multi_range_potential_form Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: atsim.potentials._multi_range_potential_form.Multi_Range_Defn atsim.potentials._multi_range_potential_form.Multi_Range_Potential_Form atsim.potentials._multi_range_potential_form.Multi_Range_Potential_Form_Deriv atsim.potentials._multi_range_potential_form.Multi_Range_Potential_Form_Deriv2 Functions ~~~~~~~~~ .. autoapisummary:: atsim.potentials._multi_range_potential_form.create_Multi_Range_Potential_Form .. py:class:: Multi_Range_Defn(range_type, start, potential_form, **kwargs) Bases: :class:`object` .. attribute:: range_type .. attribute:: start .. attribute:: potential_form .. attribute:: has_deriv Returns True if the potential callable provides an analytical derivative through a `.deriv()` method. .. attribute:: has_deriv2 Returns True if the potential callable provides an analytical derivative through a `.deriv2()` method. .. method:: deriv(self, r) .. method:: deriv2(self, r) .. function:: create_Multi_Range_Potential_Form(*range_tuples, **kwargs) Creates Multi_Range_Potential_Form or sub-class instance, from list of Multi_Range_Defn instances in `range_tuples`. If any Multi_Range_Defn object's `.has_deriv2` are True then an instance of Multi_Range_Potential_Form_Deriv2 is returned. If any Multi_Range_Defn object's `.has_deriv` property is True but all `.has_deriv2` are False then an instance of Multi_Range_Potential_Form_Deriv is returned. If non of the Multi_Range_Defn objects provide analytical deriv or deriv2 methods, return Multi_Range_Potential_Form. :param range_tuples: List of Multi_Range_Defn instances. :param kwargs: Keyword arguments passed to Multi_Range_Potential_Form constructor. :return: See above .. py:class:: Multi_Range_Potential_Form(*range_defns, **kwargs) Bases: :class:`object` Class allowing the creation of composite potential forms. This allows different potential functions to be defined for different distance ranges when the potential is called .. attribute:: range_defns .. method:: __call__(self, r) .. py:class:: Multi_Range_Potential_Form_Deriv(*range_defns, **kwargs) Bases: :class:`atsim.potentials._multi_range_potential_form.Multi_Range_Potential_Form` Sub-class of Multi_Range_Potential_Form which additionally provides .deriv() method .. method:: deriv(self, r) .. py:class:: Multi_Range_Potential_Form_Deriv2(*range_defns, **kwargs) Bases: :class:`atsim.potentials._multi_range_potential_form.Multi_Range_Potential_Form_Deriv` Sub-class of Multi_Range_Potential_Form which additionally provides .deriv() and .deriv2() methods .. method:: deriv2(self, r)