trajectoryΒΆ
Analyze a trajectory,topology pair, outputting a graphical dashboard.
FunctionsΒΆ
|
Calculate structural data and create figures for trajectory,topology file pairs. |
Module ContentsΒΆ
- ensemblify.analysis.trajectory.analyze_trajectory(trajectories, topologies, trajectory_ids, output_directory=None, ramachandran_data=True, distancematrices=True, contactmatrices=True, ssfrequencies=True, rg=True, dmax=True, eed=True, cm_dist=None, color_palette=None)ΒΆ
Calculate structural data and create figures for trajectory,topology file pairs.
- Parameters:
trajectories (
list[str] | str) β List of paths to .xtc trajectory files or string with the path to a single .xtc trajectory file.topologies (
list[str] | str) β List of paths to .pdb topology files or string with the path to a single .pdb topology file.trajectory_ids (
list[str] | str) β List of prefix trajectory identifiers to distinguish between calculated data files or string with a single prefix trajectory identifier.output_directory (
str, optional) β Path to directory where calculated data and created figures will be stored. If it does not exist, it is created. Defaults to current working directory.ramachandran_data (
bool, optional) β Whether to calculate a dihedral angles matrix for each trajectory,topology file pair.distancematrices (
bool, optional) β Whether to calculate an alpha carbon distance matrix for each trajectory,topology file pair and create the corresponding distance matrix interactive figure.contactmatrices (
bool, optional) β Whether to calculate a contact frequency matrix for each trajectory,topology file pair and create the corresponding contact map interactive figure.ssfrequencies (
bool, optional) β Whether to calculate a secondary structure assignment frequency matrix for each trajectory,topology file pair and create the corresponding secondary structure frequency interactive figure.rg (
bool, optional) β Whether to calculate and plot a probability distribution for the radius of gyration for each trajectory,topology file pair.dmax (
bool, optional) β Whether to calculate and plot a probability distribution for the maximum distance between any two alpha carbons for each trajectory,topology file pair.eed (
bool, optional) β Whether to calculate and plot a probability distribution for the distance between the N- and C-terminal for each trajectory,topology file pair.cm_dist (
dict[str,tuple[str,str]], optional) βMapping of arbitrary string identifiers to tuples containing two selection strings for creating MDAnalysis AtomGroups. A probability distribution for the center mass distance between the two AtomGroups will be calculated and plotted. For example, to calculate the distance between the centers of mass of two domains, one comprising residues 1-30 and the other comprising residues 110-140:
{βinter_domainβ : (βresid 1:30β, βresid 110:140β)}
If None, no center mass distances are calculated. See https://userguide.mdanalysis.org/stable/selections.html for more information about MDAnalysis selection strings.
color_palette (
list[str], optional) β List of color hexcodes, to associate one with each trajectory,topology pair in the created figures. If None, the default color palette is used.
- Returns:
Mapping of data identifiers to DataFrames containing the calculated analysis data for each frame of each given trajectory. For convenience, this is returned as a variable as well as saved to output directory.
- Return type:
dict[str,pd.DataFrame]