This module contains functions for principal components analysis. It can be used to calculate principal components from a trajectory, graphically display the principal components, reconstruct a trajectory from a chosen set of components and so on.
Calculates the principal components for each atom and projects the trajectory on them. It returns:
- The list of principal axes in which the ith element is a 3x3 matrix
with in its columns the principal axes for the ith atom in ev. - The positions projected on the principal axes
This function calculates the principal components for the positions of the N atoms in ev, i.e the 3N eigenvalues and eigenvectors. Specifically it performs an svd decomposition A=U*S*V Return: a tuple (U,S,V,mean_atom_pos,atom_pos_list) containing:
-The unitary matrix U containing the eigenvectors in its columns -The singular values S, so that S*S are the eigenvalues -The unitary matrix V -A list of the average positions for each atoms in pc_sele -A list with all the positions for each atom and each frame.