Package schrodinger :: Package analysis :: Package visanalysis :: Module vdcoordinateframe :: Class _VDCoordinateFrame
[hide private]
[frames] | no frames]

Class _VDCoordinateFrame

object --+
         |
        _VDCoordinateFrame

The _VDCoordinateFrame class is primarily a utility class. It acts as a container of three _VDAxis objects. These correspond to the X, Y and Z axes.

Instance Methods [hide private]
 
__init__(self, N, resolution, origin)
This function creates a new _VDCoordinateFrame object.
 
_get_N(self)
 
_get_resolution(self)
 
_get_origin(self)
 
_get_X(self)
 
_get_Y(self)
 
_get_Z(self)
 
_get_max(self)
bool
IsCompatible(self, cf)
This function can be used to test whether cf is compatible with this _VDCoordinateFrame.
iterable< float, 3 >
ToArrayCoordinate(self, world)
Converts the specified world-coordinate to the corresponding array-coordinate.
iterable< iterable< float, 3 > >
ToArrayCoordinateL(self, worldCoordinates)
Converts the specified set of world-coordinates to the corresponding array-coordinates.
iterable< float, 3 >
ToWorldCoordinate(self, array)
Converts the specified array-coordinate to the corresponding world-coordinate.
iterable< iterable< float, 3 > >
ToWorldCoordinateL(self, arrayCoordinates)
Converts the specified set of array-coordinates to the corresponding world-coordinates.
bool
InBounds(self, world)
Tests whether the world-coordinate corresponds to a position that is within the bounds of the array-coordinates.
iterator< iterable< int, 3 > >
ArrayCoordinates(self)
This function returns an iterator which allows the array-coordinates corresponding to this _VDCoordinateFrame to be traversed.
iterable< iterable< int, 3 >
getAllArrayCoordinates(self)
This function returns an object of the class iterable< iterable< int, 3 > >.
iterator< iterable< float, 3 > >
WorldCoordinates(self)
This function returns an iterator which allows the world-coordinates corresponding to this _VDCoordinateFrame to be traversed.
iterable< iterable< float, 3 > >
getAllWorldCoordinates(self)
This function returns an object of the class iterable< iterable< float, 3 > >.
iterator< tuple< iterable< int, 3 >, iterable< float, 3 > > >
Coordinates(self)
This function returns an iterator which allows the array-coordinates and world-coordinates corresponding to this _VDCoordinateFrame to be traversed.
_VDAxis
Axis(self, n)
This function allows access to the underlying _VDAxis object corresponding to n.

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

Properties [hide private]
  N
  resolution
  origin
  X
  Y
  Z
  max

Inherited from object: __class__

Method Details [hide private]

__init__(self, N, resolution, origin)
(Constructor)

 

This function creates a new _VDCoordinateFrame object.

N, resolution and origin are exposed as properties of the same name. The underlying _VDAxis objects are exposed as properties entitled X, Y and Z.

Parameters:
  • N (iterable< int, 3 >) - The number of array-coordinate points along the X, Y and Z axes respectively
  • resolution (iterable< float, 3 >) - The resolution to apply the X, Y and Z axes respectively. Specified in world-coordinate units
  • origin (iterable< float, 3 >) - The origin of the X, Y and Z axes respectively. Specified in world-coordinate units
Overrides: object.__init__

IsCompatible(self, cf)

 

This function can be used to test whether cf is compatible with this _VDCoordinateFrame. Compatible _VDCoordinateFrame objects have all three axes being compatible.

Parameters:
  • cf (_VDCoordinateFrame) - The coordinate-frame to be tested for compatibility with this _VDCoordinateFrame
Returns: bool
True if cf is compatible with this _VDCoordinateFrame

ToArrayCoordinate(self, world)

 

Converts the specified world-coordinate to the corresponding array-coordinate.

Parameters:
  • world (iterable< float, 3 >) - The world-coordinate to be converted X, Y, Z
Returns: iterable< float, 3 >
The array-coordinate corresponding to world. This need not be a valid array-coordinate

ToArrayCoordinateL(self, worldCoordinates)

 

Converts the specified set of world-coordinates to the corresponding array-coordinates.

Parameters:
  • worldCoordinates (iterable< iterable< float, 3 > >) - The set of world-coordinates to be converted
Returns: iterable< iterable< float, 3 > >
The array-coordinates corresponding to worldCoordinates.

ToWorldCoordinate(self, array)

 

Converts the specified array-coordinate to the corresponding world-coordinate.

Parameters:
  • array (iterable< float, 3 >) - The array-coordinate to be converted X, Y, Z
Returns: iterable< float, 3 >
The world-coordinate corresponding to array

ToWorldCoordinateL(self, arrayCoordinates)

 

Converts the specified set of array-coordinates to the corresponding world-coordinates.

Parameters:
  • arrayCoordinates (iterable< iterable< float, 3 > >) - The set of array-coordinates to be converted.
Returns: iterable< iterable< float, 3 > >
The world-coordinates corresponding to arrayCoordinates

InBounds(self, world)

 

Tests whether the world-coordinate corresponds to a position that is within the bounds of the array-coordinates.

Parameters:
  • world (iterable< float, 3>) - The world-coordinate to be tested X, Y, Z
Returns: bool
True if the world-coordinate is in bounds

ArrayCoordinates(self)

 

This function returns an iterator which allows the array-coordinates corresponding to this _VDCoordinateFrame to be traversed. The order of the traversal is not specified. The de-referenced iterator provides an object of the form iterable< int, 3 >, the X, Y and Z array-coordinates.

Returns: iterator< iterable< int, 3 > >
Array-coordinate iterator

getAllArrayCoordinates(self)

 

This function returns an object of the class iterable< iterable< int, 3 > >. This contains all of the valid array-coordinates. The ordering of entries in this object is guaranteed to be the same as that returned by self.getAllWorldCoordinates().

Returns: iterable< iterable< int, 3 >
The array-coordinates

WorldCoordinates(self)

 

This function returns an iterator which allows the world-coordinates corresponding to this _VDCoordinateFrame to be traversed. The order of traversal is not specified. The de-referenced iterator provides an object of the form iterable< float, 3 >, the X, Y and Z world-coordinates.

Returns: iterator< iterable< float, 3 > >
World-coordinate iterator

getAllWorldCoordinates(self)

 

This function returns an object of the class iterable< iterable< float, 3 > >. This contains all of the world-coordinates. The ordering of entries in this object is guaranteed to be the same as that returned by self.getAllArrayCoordinates().

Returns: iterable< iterable< float, 3 > >
The world-coordinates

Coordinates(self)

 

This function returns an iterator which allows the array-coordinates and world-coordinates corresponding to this _VDCoordinateFrame to be traversed. The order of traversal is not specified. The de-referenced iterator returns an object of the form tuple< iterable< int, 3 >, iterable< float, 3 > >, the X, Y, Z coordinates of the array and world respectively.

Returns: iterator< tuple< iterable< int, 3 >, iterable< float, 3 > > >
Array and world-coordinate iterator

Axis(self, n)

 

This function allows access to the underlying _VDAxis object corresponding to n. n may be 0, 1, 2 which equates to X, Y and Z.

Parameters:
  • n (int) - 0, 1, 2, retrieves the X, Y or Z _VDAxis respectively
Returns: _VDAxis
The requested axis

Property Details [hide private]

N

Get Method:
_get_N(self)

resolution

Get Method:
_get_resolution(self)

origin

Get Method:
_get_origin(self)

X

Get Method:
_get_X(self)

Y

Get Method:
_get_Y(self)

Z

Get Method:
_get_Z(self)

max

Get Method:
_get_max(self)