stacker.residue_movement.collect_atom_locations_by_frame

stacker.residue_movement.collect_atom_locations_by_frame#

collect_atom_locations_by_frame(trj, residue, atom)[source]#

Creates a list of all atom locations for a particular atom and residue number per frame.

Curates a list coords_by_frame where coords_by_frame[i] is the (x, y, z) positions of a provided atom in a residue residue at the ith frame.

Parameters:
trjmd.Trajectory

Trajectory to analyze.

residueint

The 0-indexed residue number of the residue where atom_id is found (PDB Column 5).

atomstr

The name of the atom to get coordinates for (PDB Column 2).

Returns:
coords_by_framelist

List of (x, y, z) coordinates of atom_id in residue_num for each frame.

See also

Base

Python Class that represents a nucleotide base

calculate_bottaro_values_for_frame

Calculates the r, rho, and theta values as expressed in the Bottaro paper.

create_base_from_coords_list

Combines C2, C4, C6 positions with midpoint positions for a given frame

Notes

residue_num must be 0-indexed to match how mdtraj.Trajectory indexes residues.

Examples

>>> import stacker as st
>>> filtered_traj = st.filter_traj('testing/first10_5JUP_N2_tUAG_aCUA_+1GCU_nowat.mdcrd', 
...                              'testing/5JUP_N2_tUAG_aCUA_+1GCU_nowat.prmtop', 
...                              atoms = {'C2','C4','C6'})
>>> >>> st.collect_atom_locations_by_frame(filtered_traj, residue = 3, atom = "C2")
[(58.794, 59.636, 49.695), (59.185005, 58.797, 50.137), (59.379, 58.553005, 49.853), 
(58.76, 59.068, 49.681), (59.003, 59.054, 49.878002), (59.049, 58.967, 50.051), 
(59.219, 58.476006, 49.948), (58.948, 58.588005, 50.085), (58.922, 58.747, 49.766003), 
(59.124, 58.916, 49.978004)]