Vec3¶
- class openmm.vec3.Vec3(x, y, z)¶
Vec3 is a 3-element tuple that supports many math operations.
- __init__()¶
Initialize self. See help(type(self)) for accurate signature.
Methods
__init__
()Initialize self.
count
(value)index
(value, [start, [stop]])Raises ValueError if the value is not present.
Attributes
Alias for field number 0
Alias for field number 1
Alias for field number 2
- static __new__(cls, x, y, z)¶
Create a new Vec3.
- __getnewargs__()¶
Support for pickle protocol 2: http://docs.python.org/2/library/pickle.html#pickling-and-unpickling-normal-class-instances
- __add__(other)¶
Add two Vec3s.
- __radd__(other)¶
Add two Vec3s.
- __sub__(other)¶
Add two Vec3s.
- __rsub__(other)¶
Add two Vec3s.
- __mul__(other)¶
Multiply a Vec3 by a constant.
- __rmul__(other)¶
Multiply a Vec3 by a constant.
- __div__(other)¶
Divide a Vec3 by a constant.
- __truediv__(other)¶
Divide a Vec3 by a constant.
- __repr__()¶
Return a nicely formatted representation string
- count(value) → integer – return number of occurrences of value¶
- index(value[, start[, stop]]) → integer – return first index of value.¶
Raises ValueError if the value is not present.
- property x¶
Alias for field number 0
- property y¶
Alias for field number 1
- property z¶
Alias for field number 2