Package Bio :: Package PDB :: Module Vector' :: Class Vector
[hide private]
[frames] | no frames]

Class Vector

source code

object --+
         |
        Vector

3D vector

Instance Methods [hide private]
 
__add__(self, other)
Return Vector+other Vector or scalar
source code
 
__contains__(self, i) source code
 
__div__(self, x)
Return Vector(coords/a)
source code
 
__getitem__(self, i) source code
 
__init__(self, x, y=None, z=None)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
__mul__(self, other)
Return Vector.Vector (dot product)
source code
 
__neg__(self)
Return Vector(-x, -y, -z)
source code
 
__pow__(self, other)
Return VectorxVector (cross product) or Vectorxscalar
source code
 
__repr__(self)
repr(x)
source code
 
__setitem__(self, i, value) source code
 
__sub__(self, other)
Return Vector-other Vector or scalar
source code
 
angle(self, other)
Return angle between two vectors
source code
 
copy(self)
Return a deep copy of the Vector
source code
 
get_array(self)
Return (a copy of) the array of coordinates
source code
 
left_multiply(self, matrix)
Return Vector=Matrix x Vector
source code
 
norm(self)
Return vector norm
source code
 
normalize(self)
Normalize the Vector
source code
 
normalized(self)
Return a normalized copy of the Vector
source code
 
normsq(self)
Return square of vector norm
source code
 
right_multiply(self, matrix)
Return Vector=Vector x Matrix
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, x, y=None, z=None)
(Constructor)

source code 
x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

__repr__(self)
(Representation operator)

source code 
repr(x)

Overrides: object.__repr__
(inherited documentation)