stacker.pairwise_distance.get_frame_average

stacker.pairwise_distance.get_frame_average#

get_frame_average(ssfs)[source]#

Calculates an average System Stacking Fingerprint (SSF) across multiple SSFs

Used to calculate an average SSF across multiple frames of a trajectory. Can average the result of get_residue_distance_for_trajectory

Parameters:
ssfsnumpy.typing.ArrayLike

List or array of 2D NumPy arrays representing a pairwise distance matrix of an MD structure. All 2D NumPy arrays must be of the same dimenstions. Output of get_residue_distance_for_trajectory()

Returns:
avg_framenumpy.typing.ArrayLike

A single 2D NumPy array representing a pairwise distance matrix where each position i,j is the average distance from residue i to j across all matrices in frames.

See also

get_residue_distance_for_trajectory

Calculates System Stacking Fingerprints (SSFs) for all residues across all frames of a trajectory

system_stacking_fingerprints

Alias for get_residue_distance_for_trajectory

Examples

>>> import stacker as st
>>> filtered_traj = st.filter_traj('stacker/testing/first10_5JUP_N2_tUAG_aCUA_+1GCU_nowat.mdcrd', 
...                             'stacker/testing/5JUP_N2_tUAG_aCUA_+1GCU_nowat.prmtop', 
...                             residues = '2-5,13-16,23-31,46-51,65-76,88-104,122-141,164-175,184-198,288-289,401-415,420-430', 
...                             atoms = {'C2','C4','C6'})
>>> ssfs = st.get_residue_distance_for_trajectory(filtered_traj, frames = '1-3', write_output = False)
>>> avg_ssf = st.get_frame_average(ssfs)
>>> avg_ssf.shape
[FILL]