atsim.potentials._multi_range_potential_form

Module Contents

Classes

Multi_Range_Defn(range_type, start, potential_form, **kwargs)
Multi_Range_Potential_Form(*range_defns, **kwargs) Class allowing the creation of composite potential forms.
Multi_Range_Potential_Form_Deriv(*range_defns, **kwargs) Sub-class of Multi_Range_Potential_Form which additionally provides .deriv() method
Multi_Range_Potential_Form_Deriv2(*range_defns, **kwargs) Sub-class of Multi_Range_Potential_Form which additionally provides .deriv() and .deriv2() methods

Functions

create_Multi_Range_Potential_Form(*range_tuples, **kwargs) Creates Multi_Range_Potential_Form or sub-class instance, from list of Multi_Range_Defn
class atsim.potentials._multi_range_potential_form.Multi_Range_Defn(range_type, start, potential_form, **kwargs)[source]

Bases: object

range_type[source]
start[source]
potential_form[source]
has_deriv[source]

Returns True if the potential callable provides an analytical derivative through a .deriv() method.

has_deriv2[source]

Returns True if the potential callable provides an analytical derivative through a .deriv2() method.

deriv(self, r)[source]
deriv2(self, r)[source]
atsim.potentials._multi_range_potential_form.create_Multi_Range_Potential_Form(*range_tuples, **kwargs)[source]

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.

Parameters:
  • range_tuples – List of Multi_Range_Defn instances.
  • kwargs – Keyword arguments passed to Multi_Range_Potential_Form constructor.
Returns:

See above

class atsim.potentials._multi_range_potential_form.Multi_Range_Potential_Form(*range_defns, **kwargs)[source]

Bases: 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

range_defns[source]
__call__(self, r)[source]
class atsim.potentials._multi_range_potential_form.Multi_Range_Potential_Form_Deriv(*range_defns, **kwargs)[source]

Bases: atsim.potentials._multi_range_potential_form.Multi_Range_Potential_Form

Sub-class of Multi_Range_Potential_Form which additionally provides .deriv() method

deriv(self, r)[source]
class atsim.potentials._multi_range_potential_form.Multi_Range_Potential_Form_Deriv2(*range_defns, **kwargs)[source]

Bases: 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

deriv2(self, r)[source]