stacker.pairwise_distance.system_stacking_fingerprints

stacker.pairwise_distance.system_stacking_fingerprints#

system_stacking_fingerprints(trj, frames={}, res1_atoms=('C2', 'C4', 'C6'), res2_atoms=('C2', 'C4', 'C6'), threads=1, write_output=True)[source]#

Alias for get_residue_distance_for_trajectory().

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

Calculates the distances between all pairs of residues for all frames of a trajectory. Outputs as a square matrix with all residues on each side. This is the data behind a System Stacking Fingerprint (SSF)

Parameters:
trjmd.Trajectory

Trajectory to analyze (must have a topology). Output of st.filter_traj() or mdtraj.load()

framesarray_like or str

list of frame indices to analyze (1-indexed). Accepts smart-indexed str representing a list of frames (e.g ‘1-5,6,39-48’) If empty, uses all frames.

res1_atomstuple, default=(“C2”, “C4”, “C6”)

Atom names whose positions are averaged to find the center of residue 1.

res2_atomstuple, default=(“C2”, “C4”, “C6”)

Atom names whose positions are averaged to find the center of residue 2.

threadsint, default=1

Number of threads to use for parallel processing.

write_outputbool, default=True

If True, displays a loading screen to standard output. Do not use if threads > 1.

Returns:
ssf_per_framearray_like

List where pairwise_distances[f] is the output of get_residue_distance_for_frame(trajectory, f, res1_atoms, res2_atoms).

See also

system_stacking_fingerprints

Alias for this function

get_residue_distance_for_frame

Calculates System Stacking Fingerprint (SSF) between all residues in a given frame.

filter_traj

Filters an input trajectory to only the specified atoms and residues

mdtraj.load

Load a trajectory+topology file

display_arrays_as_video

Displays this data as an SSF.

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)
>>> ssfs.shape
(3, 127, 127)