Chem.Pharm3D.ExcludedVolume

Package Chem :: Package Pharm3D :: Module ExcludedVolume |
[hide private]
[frames] | no frames]

# Source Code for Module Chem.Pharm3D.ExcludedVolume

     1  # $Id: ExcludedVolume.py 742 2008-07-05 07:42:38Z glandrum $
     2  #
     3  # Copyright (C) 2004-2006 Rational Discovery LLC
     4  #
     5  #   @@ All Rights Reserved  @@
     6  #
     7 -class ExcludedVolume(object):
     8 -  def __init__(self, featInfo,index=-1,exclusionDist=3.0):
     9      """
    10      featInfo should be a sequence of ([indices],min,max) tuples
    11
    12      """
    13      self.index = index
    14      try:
    15        l = len(featInfo)
    16      except AttributeError:
    17        raise ValueError,'featInfo argument must be a sequence of sequences'
    18
    19      if not len(featInfo):
    20        raise ValueError,'featInfo argument must non-empty'
    21
    22      try:
    23        a,b,c = featInfo[0]
    24      except Type:
    25        raise ValueError,'featInfo elements must be 3-sequences'
    26      except ValueError:
    27        raise ValueError,'featInfo elements must be 3-sequences'
    28
    29      self.featInfo = featInfo[:]
    30      self.exclusionDist = exclusionDist
    31      self.pos = None
    32