Normal Mode

This module defines classes for handling mode data.

class Mode(model, index)[source]

A class to provide access to and operations on mode data.

Initialize mode object as part of an NMA model.

Parameters:
  • model (NMA, GNM, or PCA) – a normal mode analysis instance
  • index (int) – index of the mode
getArray()[source]

Returns a copy of the normal mode array (eigenvector).

getArrayNx3()

Returns a copy of array with shape (N, 3).

getEigval()[source]

Returns normal mode eigenvalue. For PCA and EDA models built using coordinate data in Å, unit of eigenvalues is Å2. For ANM and GNM, on the other hand, eigenvalues are in arbitrary or relative units but they correlate with stiffness of the motion along associated eigenvector.

getEigvals()

Returns normal mode eigenvalue. For PCA and EDA models built using coordinate data in Å, unit of eigenvalues is Å2. For ANM and GNM, on the other hand, eigenvalues are in arbitrary or relative units but they correlate with stiffness of the motion along associated eigenvector.

getEigvec()

Returns a copy of the normal mode array (eigenvector).

getEigvecs()

Returns a copy of the normal mode array (eigenvector).

getIndex()[source]

Returns the index of the mode. Note that mode indices are zero-based.

getModel()[source]

Returns the model that the mode instance belongs to.

getTitle()[source]

A descriptive title for the mode instance.

getVariance()[source]

Returns variance along the mode. For PCA and EDA models built using coordinate data in Å, unit of variance is Å2. For ANM and GNM, on the other hand, variance is the inverse of the eigenvalue, so it has arbitrary or relative units.

getVariances()

Returns variance along the mode. For PCA and EDA models built using coordinate data in Å, unit of variance is Å2. For ANM and GNM, on the other hand, variance is the inverse of the eigenvalue, so it has arbitrary or relative units.

is3d()[source]

Returns True if mode instance is from a 3-dimensional model.

numAtoms()[source]

Returns number of atoms.

numDOF()[source]

Returns number of degrees of freedom.

numEntries()[source]

Returns number of entries in the eigenvector.

numModes()

Returns 1.

class Vector(array, title='Unknown', is3d=True)[source]

A class to provide operations on a modified mode array. This class holds only mode array (i.e. eigenvector) data, and has no associations with an NMA instance. Scalar multiplication of Mode instance or addition of two Mode instances results in a Vector instance.

Instantiate with a name, an array, and a 3d flag.

getArray()[source]

Returns a copy of array.

getArrayNx3()

Returns a copy of array with shape (N, 3).

getNormed()[source]

Returns mode after normalizing it.

getTitle()[source]

Get the descriptive title for the vector instance.

is3d()[source]

Returns True if vector instance describes a 3-dimensional property, such as a deformation for a set of atoms.

numAtoms()[source]

Returns number of atoms. For a 3-dimensional vector, returns length of the vector divided by 3.

numDOF()[source]

Returns number of degrees of freedom.

numEntries()[source]

Returns number of entries in the vector.

numModes()

Returns 1.

setTitle(title)[source]

Set the descriptive title for the vector instance.