RDF Analyzer Analysis
Radial Distribution Function (RDF) analysis utilities.
This module provides single-frame and multi-frame RDF calculations for ReaxFF trajectories using either the FREUD or OVITO backends, as well as helper utilities for extracting RDF-derived structural descriptors.
Typical use cases include:
- computing total or partial RDFs for selected frames
- averaging RDFs across multiple frames
- extracting RDF-based properties such as peak positions or integrated areas
rdf_property_over_frames(handler, *, backend='ovito', frames=None, property='first_peak', r_max=None, bins=200, types_a=None, types_b=None)
Compute a single RDF-derived property for each simulation frame.
Works on
XmoloutHandler — xmolout
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
backend
|
('ovito', 'freud')
|
RDF backend to use. |
"ovito"
|
property
|
('first_peak', 'dominant_peak', 'area', 'excess_area')
|
RDF-based property to compute. |
"first_peak"
|
frames
|
iterable of int
|
Frame indices to include. |
None
|
types_a
|
iterable of str
|
Atom types defining partial RDF. |
None
|
types_b
|
iterable of str
|
Atom types defining partial RDF. |
None
|
Returns:
| Type | Description |
|---|---|
DataFrame
|
One row per frame with frame index, iteration, and property values. |
Examples:
>>> df = rdf_property_over_frames(xh, property="first_peak")
rdf_using_freud(handler, *, frames=None, types_a=None, types_b=None, r_max=None, bins=200, average=True, return_stack=False)
Compute RDFs across multiple frames using the FREUD backend.
Works on
XmoloutHandler — xmolout
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
frames
|
iterable of int
|
Frame indices to include. |
None
|
types_a
|
iterable of str
|
Atom types defining A–B RDF. |
None
|
types_b
|
iterable of str
|
Atom types defining A–B RDF. |
None
|
average
|
bool
|
If True, return the average RDF across frames. |
True
|
return_stack
|
bool
|
If True and |
False
|
Returns:
| Name | Type | Description |
|---|---|---|
r |
ndarray
|
Radial distances. |
g |
ndarray or list[ndarray]
|
Averaged RDF, last RDF, or stack of RDFs. |
Examples:
>>> r, g = rdf_using_freud(xh, frames=range(100), average=True)
rdf_using_ovito(handler, *, frames=None, r_max=4.0, bins=200, types_a=None, types_b=None, average=True, return_stack=False)
Compute RDFs across multiple frames using the OVITO backend.
Works on
XmoloutHandler — xmolout
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
frames
|
iterable of int
|
Frame indices to include. |
None
|
types_a
|
iterable of str
|
If provided, compute partial RDF. |
None
|
types_b
|
iterable of str
|
If provided, compute partial RDF. |
None
|
average
|
bool
|
Return the average RDF across frames. |
True
|
Returns:
| Name | Type | Description |
|---|---|---|
r |
ndarray
|
Radial distances. |
g |
ndarray or list[ndarray]
|
RDF data. |
Examples:
>>> r, g = rdf_using_ovito(xh, types_a=["Al"], types_b=["N"])