ufjc.examples.asymptotics

An example module involving isotensional asymptotics.

This module contains a main function that allows the asymptotic approaches to be compared to exact approaches, when available, and otherwise to the numerical quadrature approach. The results are plotted using matplotlib. When executed at the command line, flags are passed as keyword arguments.

Example

Compare the asymptotic approaches to the exact approach for the EFJC model for a few nondimensional energy scales:

python -m ufjc.examples.asymptotics --varepsilon_list 10 25 100 1000
main(**kwargs)[source]

Main function for the module.

This is the main function, called when executing the module from the command line, also available when importing the module.

Parameters:

**kwargs – Arbitrary keyword arguments. Passed to uFJC instantiation.

Example

Compare the asymptotic approaches for many models and parameters:

>>> from ufjc.examples import asymptotics
>>> asymptotics.main(potential='harmonic',
...     varepsilon_list=[10, 25, 100, 1000])
>>> asymptotics.main(potential='log-squared',
...     varepsilon_list=[10, 25, 250])
>>> asymptotics.main(potential='morse',
...     varepsilon_list=[10, 25, 250])
>>> asymptotics.main(potential='lennard-jones',
...     varepsilon_list=[1, 2, 5, 15])
>>> asymptotics.main(potential='mie', n=10, m=4,
...     varepsilon_list=[1, 2, 5, 15])
>>> asymptotics.main(potential='polynomial',
...     coefficients=[1, 2, 3],
...     varepsilon_list=[10, 25, 100])
_images/ufjc-examples-asymptotics-1_00.png
_images/ufjc-examples-asymptotics-1_01.png
_images/ufjc-examples-asymptotics-1_02.png
_images/ufjc-examples-asymptotics-1_03.png
_images/ufjc-examples-asymptotics-1_04.png
_images/ufjc-examples-asymptotics-1_05.png

Example

Export .csv files for external use:

>>> from ufjc.examples import asymptotics
>>> asymptotics.main(potential='harmonic',
...     varepsilon_list=[10, 25, 100, 1000], csv=1)
>>> asymptotics.main(potential='morse',
...     varepsilon_list=[10, 25, 100, 1000], csv=1)