schrodinger.trajectory.prody.mode module¶
This module defines classes for handling mode data.
-
class
schrodinger.trajectory.prody.mode.
VectorBase
¶ Bases:
object
A base class for
Mode
andVector
.This base class defines some shared methods, such as scalar multiplication or addition of mode instances.
Defined operations are:
- Absolute value (abs(mode)) returns mode length
- Additive inverse (-mode)
- Mode addition (mode1 + mode2)
- Mode subtraction (mode1 - mode2)
- Scalar multiplication (x*mode or mode*x)
- Division by a scalar (mode/x)
- Dot product (mode1*mode2)
- Power (mode**x)
-
getArray
()¶ Return a copy of array.
-
numAtoms
()¶ Return number of atoms.
-
is3d
()¶ Return True if vector is 3d.
-
getArrayNx3
()¶ Return a copy of array with shape (N, 3).
-
numModes
()¶ Return 1.
-
class
schrodinger.trajectory.prody.mode.
Mode
(model, index)¶ Bases:
schrodinger.trajectory.prody.mode.VectorBase
A class to provide access to and operations on mode data.
-
is3d
()¶ Return True if mode instance is from a 3-dimensional model.
-
numAtoms
()¶ Return number of atoms.
-
numDOF
()¶ Return number of degrees of freedom (three times the number of atoms).
-
getTitle
()¶ A descriptive title for the mode instance.
-
getIndex
()¶ Return the index of the mode. Note that mode indices are zero-based.
-
getModel
()¶ Return the model that the mode instance belongs to.
-
getArray
()¶ Return a copy of the normal mode array (eigenvector).
-
getEigvec
()¶ Return a copy of the normal mode array (eigenvector).
-
-
class
schrodinger.trajectory.prody.mode.
Vector
(array, title='Unknown', is3d=True)¶ Bases:
schrodinger.trajectory.prody.mode.VectorBase
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 twoMode
instances results in aVector
instance.-
is3d
()¶ Return True if vector instance describes a 3-dimensional property, such as a deformation for a set of atoms.
-
getTitle
()¶ Get the descriptive title for the vector instance.
-
setTitle
(title)¶ Set the descriptive title for the vector instance.
-
getArray
()¶ Return a copy of array.
-
getNormed
()¶ Return mode after normalizing it.
-
numDOF
()¶ Return number of degrees of freedom.
-
numAtoms
()¶ Return number of atoms. For a 3-dimensional vector, returns length of the vector divided by 3.
-