rdkit.Chem.Pharm3D.ExcludedVolume

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

# Source Code for Module rdkit.Chem.Pharm3D.ExcludedVolume

     1  # $Id$
     2  #
     3  # Copyright (C) 2004-2006 Rational Discovery LLC
     4  #
     5  #   @@ All Rights Reserved @@
     6  #  This file is part of the RDKit.
     7  #  The contents are covered by the terms of the BSD license
     8  #  which is included in the file license.txt, found at the root
     9  #  of the RDKit source tree.
    10  #
    11 -class ExcludedVolume(object):
    12 -  def __init__(self, featInfo,index=-1,exclusionDist=3.0):
    13      """
    14      featInfo should be a sequence of ([indices],min,max) tuples
    15
    16      """
    17      self.index = index
    18      try:
    19        l = len(featInfo)
    20      except AttributeError:
    21        raise ValueError('featInfo argument must be a sequence of sequences')
    22
    23      if not len(featInfo):
    24        raise ValueError('featInfo argument must non-empty')
    25
    26      try:
    27        a,b,c = featInfo[0]
    28      except Type:
    29        raise ValueError('featInfo elements must be 3-sequences')
    30      except ValueError:
    31        raise ValueError('featInfo elements must be 3-sequences')
    32
    33      self.featInfo = featInfo[:]
    34      self.exclusionDist = exclusionDist
    35      self.pos = None
    36