jaxrts.helpers

Miscellaneous helper functions.

Module Attributes

orbital_map

Typically, we return quantities that differ per orbital in an jax.numpy.ndarray with 10 entries, the orbitals with n<=4.

Functions

bisection(func, a, b[, tolerance, max_iter, ...])

Find the root of a function func between the points a and b by bisection.

invert_dict(dictionary)

Invert a dictionary, so that it's keys become values, and the values are the keys of the returned dict.

mass_density_from_electron_density(n_e, Z, ...)

Calculate the mass density of a mixture from electron density.

mass_from_number_fraction(number_fractions, ...)

Calculate the mass fraction of a mixture.

orbital_array([n1s, n2s, n2p, n3s, n3p, ...])

Create an array with entries for each orbital.

partialclass(cls, *args, **kwds)

This is an equivalent to functools.partial, but for Classes.

secant_extrema_finding(func, xmin, xmax[, ...])

Use the secant method to find the extrema of a function within specified bounds.

timer(func[, custom_prefix, loglevel])

Simple timer wrapper.

Classes

JittableDict