ion_utils#

Functions

cardinal_b_spline_values(x, order)

This is a helper function for Particle-Mesh Ewald scheme.

exponential_spline_b(m, N, order)

This is a helper function for Particle-Mesh Ewald scheme.

get_ion_charge(path)

Reads recpot file to extract ion charge.

interpolate_recpot(path, ks_interp)

Reads recpot file to get interpolated ion potential.

ion_interaction_sum(box_vecs, coords, ...)

Computes the ion-ion interaction energy using a real-space pairwise electrostatic summation in a uniform neutralizing background.

lattice_sum(box_vecs, shape, ...[, order])

Performs convolution of lattice with function \(f\) using FFTs and the convolution theorem.

structure_factor(box_vecs, shape, ...)

Computes, using the direct \(\mathcal{O}(N^2)\) method, the structure factor given by

structure_factor_spline(box_vecs, shape, ...)

Computes an approximate structure factor using the Particle-Mesh Ewald scheme based on cardinal B-splines, which is an \(\mathcal{O}(N\log N)\) scaling method.