Analysis Reference¶
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)¶
| 
 | Compute RMSD of all conformations in target to a reference conformation. | 
| 
 | Compute RMSF of all conformations in target to a reference conformation. | 
| 
 | Compute Linear-Programming Root-Mean-Squared Deviation (LP-RMSD) of all conformations in target to a reference conformation. | 
| 
 | Superpose each conformation in this trajectory upon a reference | 
Hydrogen Bonding¶
| 
 | Identify hydrogen bonds based on cutoffs for the Donor-H…Acceptor distance and angle. | 
| 
 | Compute the Kabsch-Sander hydrogen bond energy between each pair of residues in every frame. | 
| 
 | Identify hydrogen bonds based on cutoffs for the Donor-H…Acceptor distance and angle according to the criterion outlined in [1]. | 
Secondary Structure¶
| 
 | Compute Dictionary of protein secondary structure (DSSP) secondary structure assignments | 
Shape Metrics¶
| 
 | Compute the gyration tensor of a trajectory. | 
Surface Area, Radius of Gyration and Inertia¶
| 
 | Compute the solvent accessible surface area of each atom or residue in each simulation frame. | 
| 
 | Compute the radius of gyration for every frame. | 
| 
 | Compute the inertia tensor of a trajectory. | 
Distances¶
| 
 | Compute the distances between pairs of atoms in each frame. | 
| 
 | Compute the displacement vector between pairs of atoms in each frame of a trajectory. | 
| 
 | Find (spatially) neighboring atoms in a trajectory. | 
| 
 | Compute the distance between pairs of residues in a trajectory. | 
| 
 | Distribution of reciprocal interatomic distances (DRID) representation of an MD trajectory | 
| 
 | Compute the center of mass for each frame. | 
| 
 | Reshape the contact distance to square contact maps | 
| 
 | Compute radial distribution functions for pairs in every frame. | 
Bond Angles and Dihedrals¶
| 
 | Compute the bond angles between the supplied triplets of indices in each frame of a trajectory. | 
| 
 | Compute the dihedral angles between the supplied quartets of atoms in each frame in a trajectory. | 
| 
 | Calculate the phi torsions of a trajectory. | 
| 
 | Calculate the psi torsions of a trajectory. | 
| 
 | Calculate the chi1 torsions of a trajectory. | 
| 
 | Calculate the chi2 torsions of a trajectory. | 
| 
 | Calculate the chi3 torsions of a trajectory. | 
| 
 | Calculate the chi4 torsions of a trajectory. | 
| 
 | Calculate the omega torsions of a trajectory. | 
NMR Observables¶
| 
 | Calculate the scalar coupling between HN and C_prime. | 
| 
 | Calculate the scalar coupling between HN and C_beta. | 
| 
 | Calculate the scalar coupling between HN and H_alpha. | 
| 
 | Predict chemical shifts of a trajectory using ShiftX2. | 
| 
 | Predict chemical shifts of a trajectory using ppm. | 
| 
 | Predict chemical shifts of a trajectory using SPARTA+. | 
| 
 | Reindex chemical shift output to use atom number (serial) indexing. | 
Thermodynamic Quantities¶
| 
 | Calculate the dipole moments of each frame in a trajectory. | 
| 
 | Calculate the static dielectric constant from a trajectory. | 
| 
 | Calculate the isothermal compressability. | 
| 
 | Calculate the thermal expansion coefficient. | 
| 
 | Calculate the mass density of each frame in a trajectory. | 
Order Parameters¶
| 
 | Compute the nematic order parameter of a group in every frame. | 
| 
 | Compute the characteristic vector describing the orientation of each group |