bondcorr#
- bondcorr(universe, atom_types_a, atom_types_b, distance, dt=100, nblocks=None, corrlength=5000, gaplength=None)[source]#
Calculate the time correlation function (TCF) of a bond.
Tracks the survival probability of chemical bonds between two atom types over a block-averaged trajectory. A bond is considered broken as soon as its length exceeds the defined distance threshold.
- Parameters:
- universemda.Universe
The input MDAnalysis Universe to analyze.
- atom_types_astr or list
The atom type(s) for the first element forming the bond.
- atom_types_bstr or list
The atom type(s) for the second element forming the bond.
- distancefloat
The maximum cutoff distance to define a bond (in Angstroms).
- dtfloat, optional
The simulation timestep of the trajectory (in femtoseconds).
- nblocksint, optional
Number of blocks used for averaging. If None, as many as fit in the trajectory.
- corrlengthint, optional
Correlation length (number of frames per block).
- gaplengthint, optional
Number of frames between the start of consecutive blocks. Defaults to a fiftieth of the trajectory.
- Returns:
- pd.DataFrame
A DataFrame containing “t [ps]” (correlation time) and “TCF” (survival probability).
- Raises:
- ValueError
If corrlength, gaplength, or nblocks are too large for the available trajectory length.