jax_md_mod.custom_quantity.init_adf_nbrs

Contents

jax_md_mod.custom_quantity.init_adf_nbrs#

init_adf_nbrs(displacement_fn, adf_params, adf_species=None, smoothing_dr=0.01, r_init=None, nbrs_init=None, max_weight_multiplier=2.0)[source]#

Initializes a function to computes the angular distribution function (ADF).

Smoothens the histogram in radial direction via a Gaussian kernel (compare RDF function). In radial direction, triplets are weighted according to a Gaussian cumulative distribution function, such that triplets with both radii inside the cut-off band are weighted approximately 1 and the weights of triplets towards the band edges are smoothly reduced to 0.

For computational speed-up and reduced memory needs, r_init and nbrs_init can be provided to estimate the maximum number of triplets.

Warning

Currently, the user does not receive information whether overflow occurred.

Note

This function assumes that r_outer is smaller than the neighbor list cut-off. If this is not the case, a function computing all pairwise distances is necessary.

Parameters:
  • displacement_fn – Displacement function

  • adf_params (ADFParams) – Hyperparameters of the ADF

  • smoothing_dr (float) – Standard deviation of Gaussian smoothing in radial direction

  • r_init (Array) – Initial positions to estimate maximum number of triplets

  • nbrs_init (NeighborList) – Initial neighborlist to estimate maximum number of triplets

  • max_weight_multiplier (float) – Multiplier to increase maximum number of triplets

Returns:

Returns a function that takes a simulation state with neighborlist and computes the instantaneous adf.