custom_quantity#

A collection of functions evaluating quantiities of trajectories. For easiest integration into chemtain, functions should be compatible with traj_util.quantity_traj. Functions provided to quantity_traj need to take the state and additional kwargs.

Common Quantities#

energy_wrapper(energy_fn_template[, ...])

Wrapper around energy_fn to allow energy computation via traj_util.quantity_traj.

kinetic_energy_wrapper(state, **unused_kwargs)

Wrapper around kinetic_energy to allow kinetic energy computation via traj_util.quantity_traj.

total_energy_wrapper(energy_fn_template)

Wrapper around energy_fn to allow total energy computation via traj_util.quantity_traj.

temperature(state[, mask])

Temperature function that is consistent with quantity_traj interface.

volume(state, **kwargs)

Returns volume of a single snapshot.

density(state, **unused_kwargs)

Returns density of a single snapshot of the NPT ensemble.

Structural Quantities#

Intra-Molecular#

init_bond_angle_distribution(...[, ...])

Initializes a function computing a dihedral distribution.

init_bond_dihedral_distribution(...[, smoothing])

Initializes a function computing a dihedral distribution.

init_rmsd(reference_positions, ...[, idx, ...])

Initializes the root mean squared distance from a reference structure.

init_local_structure_index(displacement_fn)

Initializes function to compute the local structure index (LSI).

init_bond_length(displacement_fn, bonds[, ...])

Initializes a function that computes bond lengths for given atom pairs.

estimate_bond_constants(positions, bonds, ...)

Calculates the equlibrium harmonic bond constants from given positions.

angular_displacement(positions, ...[, degrees])

Computes the dihedral angle for all quadruple of atoms given in idxs.

dihedral_displacement(positions, ...[, degrees])

Computes the dihedral angle for all quadruple of atoms given in idxs.

Inter-Molecular#

init_rdf(displacement_fn, rdf_params[, ...])

Initializes a function that computes the radial distribution function (RDF) for a single state.

init_adf_nbrs(displacement_fn, adf_params[, ...])

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

init_tcf_nbrs(displacement_fn, tcf_params[, ...])

Initializes a function to compute the triplet correlation function (TCF).

init_tetrahedral_order_parameter(displacement_fn)

Initializes a function that computes the tetrahedral order parameter q for a single state.

init_velocity_autocorrelation(num_lags)

Returns the velocity autocorrelation function (VACF).

self_diffusion_green_kubo(traj_state, ...)

Green-Kubo formulation to compute self-diffusion D via the velocity autocorrelation function (VACF).

kinetic_energy_tensor(state)

Computes the kinetic energy tensor of a single snapshot.

virial_potential_part(energy_fn, state, ...)

Interaction part of the virial pressure tensor for a single snaphot based on the formulation of Chen at al.

init_virial_stress_tensor(energy_fn_template)

Initializes a function that computes the virial stress tensor for a single state.

init_pressure(energy_fn_template[, ...])

Initializes a function that computes the pressure for a single state.

energy_under_strain(epsilon, energy_fn, ...)

Potential energy of a state after applying linear strain epsilon.

init_sigma_born(energy_fn_template[, ...])

Initialiizes a function that computes the Born contribution to the stress tensor.

init_stiffness_tensor_stress_fluctuation(...)

Initializes all functions necessary to compute the elastic stiffness tensor via the stress fluctuation method in the NVT ensemble.

States#

RDFParams(reference, rdf_bin_centers, ...)

Hyperparameters to initialize the radial distribution function (RDF).

ADFParams(reference, adf_bin_centers, sigma, ...)

Hyperparameters to initialize a angular distribution function (ADF).

TCFParams(reference, sigma_tcf, volume, ...)

Hyperparameters to initialize a triplet correlation function (TFC).

BondAngleParams(reference, sigma, bonds, ...)

BondDihedralParams(reference, sigma, bonds, ...)