qimpy.math.RadialFunction
- class RadialFunction(r, dr, f=None, l=None)
Bases:
object
Set of radial functions in real and reciprocal space. For l > 0, the convention is to remove a factor of r^l in real space (f) and G^l in reciprocal space (f_tilde). This makes it convenient to work with solid harmonics that already contain these factors of r^l or G^l.
- Parameters:
r (Tensor)
dr (Tensor)
f (Tensor)
l (Tensor)
- __init__(r, dr, f=None, l=None)
Initialize real-space portion of radial function. Note that f should have a factor of r^l removed for correct subsequent behavior with transforms and solid harmonics.
- Parameters:
r (Tensor)
dr (Tensor)
f (ndarray | Tensor | None)
l (ndarray | Tensor | None)
- Return type:
None
Methods
Initialize real-space portion of radial function.
Initialize reciprocal space version of radial functions.
Attributes
reciprocal space spacing of (quintic) spline nodes
radial grid
radial grid integration weights (dr in 4 pi r^2 dr)
real-space values corresponding to r (n x len(r))
angular momentum for each function in f
max G till which reciprocal space versions are current
uniform reciprocal-space grid
reciprocal-space version of each f on G
quintic spline coefficients for f_tilde
- classmethod transform(radial_functions, Gmax, comm, name='')
Initialize reciprocal space version of radial functions. For efficiency, perform this together on all radial functions that share the same radial grid (r and dr) and parallelize the computation over MPI communicator comm.
- Parameters:
radial_functions (list[RadialFunction])
Gmax (float)
comm (Comm)
name (str)
- Return type:
None
- DG: float = 0.02
reciprocal space spacing of (quintic) spline nodes
- G: Tensor
uniform reciprocal-space grid
- Gmax: float
max G till which reciprocal space versions are current
- dr: Tensor
radial grid integration weights (dr in 4 pi r^2 dr)
- f: Tensor
real-space values corresponding to r (n x len(r))
- f_tilde: Tensor
reciprocal-space version of each f on G
- f_tilde_coeff: Tensor
quintic spline coefficients for f_tilde
- l: Tensor
angular momentum for each function in f
- r: Tensor
radial grid