jax_md_mod.custom_quantity.init_sigma_born#
- init_sigma_born(energy_fn_template, reference_box=None)[source]#
Initialiizes a function that computes the Born contribution to the stress tensor.
sigma^B_ij = d U / d epsilon_ij
Can also be computed to compute the stress tensor at kbT = 0, when called on the state of minimum energy. This function requires that energy_fn takes a box keyword argument, usually alongside periodic_general boundary conditions.
- Parameters:
energy_fn_template – A function that takes energy parameters as input and returns an energy function
ref_box_tensor – The transformation T of general periodic boundary conditions. If None, box_tensor needs to be provided as ‘box’ during function call, e.g. for the NPT ensemble.
- Returns:
A function that takes a simulation state with neighbor list, energy_params and box (if applicable) and returns the instantaneous Born contribution to the stress tensor.