parkipy.ewald.SEParams

class parkipy.ewald.SEParams(
box_dict: dict,
tolerance: float,
periodicity: int,
rc: float,
window_P: int,
source_quantity: float,
xi: float,
grid_res: float,
A_fun: Callable[[float, float, float], float],
distributed: bool,
base_factor: int = 4,
window_shape_factor: float = 2.5,
ghost_dist: float = 0,
)

Data class for spectral Ewald (SE) parameters. Parameters are derived from the EwaldOptions data class and are derived from internal kernel specific computations. Please refer to a given kernel’s reference section for parameter derivation. This class is intended to be read-only.

Parameters:
  • box_dict (dict) – Dictionary containing information regarding the computational box. The 'box' key is the entire computational box, and distributed kernels will have additional keys 'slab box' and 'left' denoting rank specific local box parameters.

  • tolerance (float) – Ewald tolerance.

  • periodicity ({'0','1','2','3'}) – Periodicity of the computational box. Periodicity j means that box[i] is a periodic length for all i<j, with j=0 indicating free space.

  • rc (float) – Near field cutoff radius.

  • window_P (int) – Window function support size, measured in number of grid subintervals.

  • source_quantity (float) – Measure of charge neutrality, i.e. \(\sum_j q_j\). For kernels where this is irrelevant to to error analysis, we normalize this out by setting source_quantity=1.

  • xi (float) – Ewald splitting parameter, related to rc.

  • grid_res (float) – Number of (far-field) grid subintervals per unit length.

  • A_fun (Callable) – Kernel specific function used to calculate window_P

  • distributed (bool) – Flag indicating if parameters are for a distributed execution call

  • base_factor (int) – The far-field H grid is rounded to a multiple of base_factor in each direction. Used to control FFT efficiency. The default is 4.

  • window_shape_factor (float) – Window function parameter \(\beta\). The default is 2.5, which is the optimal parameter for the Kaiser-Bessel window function.

box

Length of the local computational box in each direction.

Type:

list[float]

glb_box

Length of the global computational box in each direction. Same as box for non-distributed executions.

Type:

list[float]

box_ext

Local computational box extended in the free directions to accommodate singularities in Fourier Green’s function

Type:

list[float]

glb_box_ext

Length of the global box extended in the free directions. Same as box_ext for non-distributed executions.

Type:

list[float]

h

Spacing of the H far-field grid. 1/grid_res.

Type:

float

grid_shape_ext

Number of grid points in each direction for the local extended far-field H grid.

Type:

list[int]

glb_grid_shape_ext

Number of grid points in each direction for the global extended far-field H grid. Same as grid_shape_ext for non-distributed executions.

Type:

list[int]

box_off

Difference between box[i] and box_ext[i] on both sides. Used to scale particles to the far-field H grid.

Type:

float

greens_truncation_R

Parameter for the modified Fourier Greens function in the free directions used in [1].

Type:

float

actual_upsampling

Factors to compute far-field H grid upsampling in the free directions for accurate solutions to the truncated Fourier Greens function.

Type:

list[float]

window_shape

window_shape_factor * window_p. Used to compute the Fourier transform of the Kaiser Bessel function.

Type:

float

kaiser_scaling

Scaling factor used to compute the exact Fourier transform of the Kaiser Bessel function.

Type:

float

References