Package schrodinger :: Package application :: Package matsci :: Module shapes :: Class Sphere
[hide private]
[frames] | no frames]

Class Sphere

object --+
         |
        Sphere

Class to manage a sphere.

Instance Methods [hide private]
 
__init__(self, radius, center=[0.0, 0.0, 0.0])
Create an instance.
float
getVolume(self, radius)
Return the volume.
float
getSurfaceArea(self, radius)
Return the surface area.
bool
pointInside(self, point)
Return True if the query point is either on or inside of this sphere.

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

Class Variables [hide private]
  NAME = 'sphere'
  DEFAULT = [5.0]
  DESCRIPTION = ['radius']
  TYPE = 'basic'
  NUM_UNIQUE_EDGES = 0
hash(x)
  NUM_UNIQUE_FACES = 0
hash(x)
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, radius, center=[0.0, 0.0, 0.0])
(Constructor)

 

Create an instance.

Parameters:
  • radius (float) - the radius of the sphere
  • center (numpy.array) - the center of the sphere
Overrides: object.__init__

getVolume(self, radius)

 

Return the volume.

Parameters:
  • radius (float) - radius in Angstrom
Returns: float
volume in cubic Angstrom

getSurfaceArea(self, radius)

 

Return the surface area.

Parameters:
  • radius (float) - radius in Angstrom
Returns: float
surface area in square Angstrom

pointInside(self, point)

 

Return True if the query point is either on or inside of this sphere.

Parameters:
  • point (numpy.array) - the point in question
Returns: bool
True if the point in question is either on or inside this sphere, False otherwise