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)
-
__slots__
= []¶
-
__abs__
()¶
-
__neg__
()¶
-
__div__
(other)¶
-
__idiv__
(other)¶
-
__mul__
(other)¶ Return scaled mode or dot product between modes.
-
__rmul__
(other)¶ Return scaled mode or dot product between modes.
-
__imul__
(other)¶
-
__add__
(other)¶
-
__radd__
(other)¶
-
__iadd__
(other)¶
-
__sub__
(other)¶
-
__rsub__
(other)¶
-
__isub__
(other)¶
-
__pow__
(other)¶
-
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__
¶ alias of
builtins.type
-
__delattr__
¶ Implement delattr(self, name).
-
__dir__
() → list¶ default dir() implementation
-
__eq__
¶ Return self==value.
-
__format__
()¶ default object formatter
-
__ge__
¶ Return self>=value.
-
__getattribute__
¶ Return getattr(self, name).
-
__gt__
¶ Return self>value.
-
__hash__
¶ Return hash(self).
-
__init__
¶ Initialize self. See help(type(self)) for accurate signature.
-
__init_subclass__
()¶ This method is called when a class is subclassed.
The default implementation does nothing. It may be overridden to extend subclasses.
-
__le__
¶ Return self<=value.
-
__lt__
¶ Return self<value.
-
__module__
= 'schrodinger.trajectory.prody.mode'¶
-
__ne__
¶ Return self!=value.
-
__new__
()¶ Create and return a new object. See help(type) for accurate signature.
-
__reduce__
()¶ helper for pickle
-
__reduce_ex__
()¶ helper for pickle
-
__repr__
¶ Return repr(self).
-
__setattr__
¶ Implement setattr(self, name, value).
-
__sizeof__
() → int¶ size of object in memory, in bytes
-
__str__
¶ Return str(self).
-
__subclasshook__
()¶ Abstract classes can override this to customize issubclass().
This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).
-
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.
-
__slots__
= ['_model', '_index']¶
-
__init__
(model, index)¶ Initialize mode object as part of an NMA model.
Parameters:
-
__len__
()¶
-
__repr__
()¶ Return repr(self).
-
__str__
()¶ Return str(self).
-
__int__
()¶
-
__float__
()¶
-
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).
-
getEigval
()¶ Return normal mode eigenvalue. For
PCA
andEDA
models built using coordinate data in Å, unit of eigenvalues is |A2|. ForANM
andGNM
, on the other hand, eigenvalues are in arbitrary or relative units but they correlate with stiffness of the motion along associated eigenvector.
-
getVariance
()¶ Return variance along the mode. For
PCA
andEDA
models built using coordinate data in Å, unit of variance is |A2|. ForANM
andGNM
, on the other hand, variance is the inverse of the eigenvalue, so it has arbitrary or relative units.
-
__abs__
()¶
-
__add__
(other)¶
-
__class__
¶ alias of
builtins.type
-
__delattr__
¶ Implement delattr(self, name).
-
__dir__
() → list¶ default dir() implementation
-
__div__
(other)¶
-
__eq__
¶ Return self==value.
-
__format__
()¶ default object formatter
-
__ge__
¶ Return self>=value.
-
__getattribute__
¶ Return getattr(self, name).
-
__gt__
¶ Return self>value.
-
__hash__
¶ Return hash(self).
-
__iadd__
(other)¶
-
__idiv__
(other)¶
-
__imul__
(other)¶
-
__init_subclass__
()¶ This method is called when a class is subclassed.
The default implementation does nothing. It may be overridden to extend subclasses.
-
__isub__
(other)¶
-
__le__
¶ Return self<=value.
-
__lt__
¶ Return self<value.
-
__module__
= 'schrodinger.trajectory.prody.mode'¶
-
__mul__
(other)¶ Return scaled mode or dot product between modes.
-
__ne__
¶ Return self!=value.
-
__neg__
()¶
-
__new__
()¶ Create and return a new object. See help(type) for accurate signature.
-
__pow__
(other)¶
-
__radd__
(other)¶
-
__reduce__
()¶ helper for pickle
-
__reduce_ex__
()¶ helper for pickle
-
__rmul__
(other)¶ Return scaled mode or dot product between modes.
-
__rsub__
(other)¶
-
__setattr__
¶ Implement setattr(self, name, value).
-
__sizeof__
() → int¶ size of object in memory, in bytes
-
__sub__
(other)¶
-
__subclasshook__
()¶ Abstract classes can override this to customize issubclass().
This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).
-
getArrayNx3
()¶ Return a copy of array with shape (N, 3).
-
numModes
()¶ Return 1.
-
-
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.-
__slots__
= ['_title', '_array', '_is3d']¶
-
__init__
(array, title='Unknown', is3d=True)¶ Instantiate with a name, an array, and a 3d flag.
-
__len__
()¶
-
__repr__
()¶ Return repr(self).
-
__str__
()¶ Return str(self).
-
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.
-
__abs__
()¶
-
__add__
(other)¶
-
__class__
¶ alias of
builtins.type
-
__delattr__
¶ Implement delattr(self, name).
-
__dir__
() → list¶ default dir() implementation
-
__div__
(other)¶
-
__eq__
¶ Return self==value.
-
__format__
()¶ default object formatter
-
__ge__
¶ Return self>=value.
-
__getattribute__
¶ Return getattr(self, name).
-
__gt__
¶ Return self>value.
-
__hash__
¶ Return hash(self).
-
__iadd__
(other)¶
-
__idiv__
(other)¶
-
__imul__
(other)¶
-
__init_subclass__
()¶ This method is called when a class is subclassed.
The default implementation does nothing. It may be overridden to extend subclasses.
-
__isub__
(other)¶
-
__le__
¶ Return self<=value.
-
__lt__
¶ Return self<value.
-
__module__
= 'schrodinger.trajectory.prody.mode'¶
-
__mul__
(other)¶ Return scaled mode or dot product between modes.
-
__ne__
¶ Return self!=value.
-
__neg__
()¶
-
__new__
()¶ Create and return a new object. See help(type) for accurate signature.
-
__pow__
(other)¶
-
__radd__
(other)¶
-
__reduce__
()¶ helper for pickle
-
__reduce_ex__
()¶ helper for pickle
-
__rmul__
(other)¶ Return scaled mode or dot product between modes.
-
__rsub__
(other)¶
-
__setattr__
¶ Implement setattr(self, name, value).
-
__sizeof__
() → int¶ size of object in memory, in bytes
-
__sub__
(other)¶
-
__subclasshook__
()¶ Abstract classes can override this to customize issubclass().
This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).
-
getArrayNx3
()¶ Return a copy of array with shape (N, 3).
-
numModes
()¶ Return 1.
-