jax_md_mod.custom_quantity.estimate_bond_constants

jax_md_mod.custom_quantity.estimate_bond_constants#

estimate_bond_constants(positions, bonds, displacement_fn)[source]#

Calculates the equlibrium harmonic bond constants from given positions.

Can be used to estimate the bond constants from an atomistic simulation to be used as a coarse-grained prior.

Parameters:
  • positions – Position vector of size [Ntimestep x Natoms x spatial_dim] or [N_atoms x spatial_dim]

  • bonds – (n_bonds, 2) array defining IDs of bonded particles

  • displacement_fn – Displacement function

Returns:

Tuple (eq_distances, eq_variances) of harmonic bond coefficients.