Analysis Functions
Trajectory analysis is the heart of MDTraj. These functions can be used to run
a variety of analyses on mdtraj.Trajectory objects.
It’s usually as simple as
>>> import mdtraj as md
>>> t = md.load('trajectory.pdb')
>>> print(md.compute_phi(t))
Root-mean-square deviation (RMSD)
rmsd(target, reference[, frame, ...]) |
Compute RMSD of all conformations in target to a reference conformation. |
lprmsd(target, reference[, frame, ...]) |
Compute Linear-Programming Root-Mean-Squared Deviation (LP-RMSD) of all conformations in target to a reference conformation. |
Trajectory.superpose(reference[, frame, ...]) |
Superpose each conformation in this trajectory upon a reference |
Hydrogen Bonding
baker_hubbard(traj[, freq, exclude_water, ...]) |
Identify hydrogen bonds based on cutoffs for the Donor-H...Acceptor distance and angle. |
kabsch_sander(traj) |
Compute the Kabsch-Sander hydrogen bond energy between each pair of residues in every frame. |
wernet_nilsson(traj[, exclude_water, periodic]) |
Identify hydrogen bonds based on cutoffs for the Donor-H...Acceptor distance and angle according to the criterion outlined in [1]. |
Secondary Structure
compute_dssp(traj[, simplified]) |
Compute Dictionary of protein secondary structure (DSSP) secondary structure assignments |
Surface Area, Radius of Gyration and Inertia
shrake_rupley(traj[, probe_radius, ...]) |
Compute the solvent accessible surface area of each atom or residue in each simulation frame. |
compute_rg(traj[, masses]) |
Compute the radius of gyration for every frame. |
compute_inertia_tensor(traj) |
Compute the inertia tensor of a trajectory. |
Distances
compute_distances(traj, atom_pairs[, ...]) |
Compute the distances between pairs of atoms in each frame. |
compute_displacements(traj, atom_pairs[, ...]) |
Compute the displacement vector between pairs of atoms in each frame of a trajectory. |
compute_neighbors(traj, cutoff, query_indices) |
Find (spatially) neighboring atoms in a trajectory. |
compute_contacts(traj[, contacts, scheme, ...]) |
Compute the distance between pairs of residues in a trajectory. |
compute_drid(traj[, atom_indices]) |
Distribution of reciprocal interatomic distances (DRID) representation |
compute_center_of_mass(traj) |
Compute the center of mass for each frame. |
geometry.squareform(distances, residue_pairs) |
Reshape the contact distance to square contact maps |
compute_rdf(traj[, pairs, r_range, ...]) |
Compute radial distribution functions for pairs in every frame. |
Bond Angles and Dihedrals
compute_angles(traj, angle_indices[, ...]) |
Compute the bond angles between the supplied triplets of indices in each frame of a trajectory. |
compute_dihedrals(traj, indices[, periodic, opt]) |
Compute the dihedral angles between the supplied quartets of atoms in each frame in a trajectory. |
compute_phi(traj[, periodic, opt]) |
Calculate the phi torsions of a trajectory. |
compute_psi(traj[, periodic, opt]) |
Calculate the psi torsions of a trajectory. |
compute_chi1(traj[, periodic, opt]) |
Calculate the chi1 torsions of a trajectory. |
compute_chi2(traj[, periodic, opt]) |
Calculate the chi2 torsions of a trajectory. |
compute_chi3(traj[, periodic, opt]) |
Calculate the chi3 torsions of a trajectory. |
compute_chi4(traj[, periodic, opt]) |
Calculate the chi4 torsions of a trajectory. |
compute_omega(traj[, periodic, opt]) |
Calculate the omega torsions of a trajectory. |