rdf module
Full Documentation for hippynn.molecular_dynamics.rdf
module.
Click here for a summary page.
- calculate_adf(positions, cutoffs, cells=None, species=None)[source]
Computes ADFs for given cutoffs. If species is not provided, also computes species triple specific ADFs.
- Parameters:
positions (np.ndarray) – Shape (n_frames, n_particles, 3).
cutoff (list[float]) – Maximum arm lengths on angles to consider.
cells (np.ndarray or None, optional) – Shape (n_frames, 3, 3) or (3, 3), no PBC if None, defaults to None.
species (np.ndarray or None, optional) – Shape (n_frames, n_particles) or (n_particles,), defaults to None.
- Returns:
A dictionary with keys - f”adf_values_all-all-all_cutoff_{cutoff}” (np.ndarray): y-values for plotting ADF of all positions for each value cutoff in cutoffs, shape (180,). - f”adf_values_{center}-{end1}-{end2}_cutoff_{cutoff}” (np.ndarray): Available only if species was provided. y-values for plotting ADF of all angles
with center of type center and ends of species end1 and end2 for all possible combinations triples of species species, and for each value cutoff in cutoffs, shape (180,).
- Return type:
dict
- calculate_rdf(positions: ndarray, cutoff: float, cells: ndarray = None, species: ndarray = None, n_bins: int = 300, lower_cutoff: float = 0)[source]
Computes the RDF. If species is not provided, also computes species pair specific RDFS.
- Parameters:
positions (np.ndarray) – Shape (n_frames, n_particles, 3).
cutoff (float) – Largest pair distance considered.
cells (np.ndarray or None, optional) – Shape (n_frames, 3, 3) or None to if no PBC, defaults to None.
species (np.ndarray or None, optional) – Shape (n_frames, n_particles) or (n_particles,), defaults to None.
n_bins (int, optional) – Number of bins for RDF(s), defaults to 300.
lower_cutoff (float, optional) – Smallest pair distance considered, defaults to 0.
- Returns:
A tuple containng - bin_centers (np.ndarray): x-values for plotting RDF, shape (n_bins,). - rdf (np.ndarray): y-values for plotting RDF, shape (n_bins,). - species_rdfs (dict(str, np.ndarray)): Only included if species is provided. Dictionary where the keys are pairs “rdf_values_i-j” for each
pair of species i and j, and the values are the RDF y-values for that species pair. The same x-values are used for all RDFs.
- Return type:
tuple
- check_KDTree_compatibility(cells, cutoff)[source]
cells must be collapsed to (3,) cell representations
- find_triples(jlist_pad, rijlist_pad)