mdtraj.compute_directors¶
-
mdtraj.
compute_directors
(traj, indices='chains')¶ Compute the characteristic vector describing the orientation of each group
In this definition, the long molecular axis is found from the inertia tensor, \(I_{ab}\), and is taken to be the eigenvector associated with the smallest eigenvalue of \(I_{ab}\).
See [1] for brief summary and discussion on other methods to obtain the director.
- Parameters
- trajTrajectory
Trajectory to compute orientation of.
- indices{‘chains’, ‘residues’, list of lists}, optional, default=’chains’
The group to consider. Users can pass their own indices as a list of lists with the “shape” (n_compounds, len(each_compound)). Recognized string keywords are ‘chains’ and ‘residues’.
- Returns
- directorsnp.ndarray, shape=(traj.n_frames, len(indices), 3), dtype=float64
Characteristic vectors describing the trajectory for each frame.
Notes
Since there is no preferred orientation of the director, the director \(n\) has the same meaning as \(-n\). Therefore, care should be taken to ensure the director is pointing in the direction you think it is, e.g., by contraining it to a hemisphere that makes physical sense.
References