Back to index

python-biopython  1.60
Public Member Functions | Public Attributes
Bio.Crystal.Crystal Class Reference

List of all members.

Public Member Functions

def __init__
def fix
def __repr__
def __str__
def tostring
def __len__
def __getitem__
def __setitem__
def __delitem__
def clear
def copy
def keys
def items
def values
def __contains__
def has_key
def get
def setdefault
def popitem

Public Attributes

 data

Detailed Description

Definition at line 210 of file __init__.py.


Constructor & Destructor Documentation

def Bio.Crystal.Crystal.__init__ (   self,
  data = {} 
)

Definition at line 211 of file __init__.py.

00211 
00212     def __init__(self, data = {}):
00213         # Enforcestorage
00214         if type(data) != type({}):
00215             raise CrystalError('Crystal must be a dictionary')
00216         self.data = data
00217         self.fix()

Here is the caller graph for this function:


Member Function Documentation

def Bio.Crystal.Crystal.__contains__ (   self,
  value 
)

Definition at line 265 of file __init__.py.

00265 
    def __contains__(self, value): return value in self.data

Here is the caller graph for this function:

def Bio.Crystal.Crystal.__delitem__ (   self,
  key 
)

Definition at line 258 of file __init__.py.

00258 
    def __delitem__(self, key): del self.data[key]
def Bio.Crystal.Crystal.__getitem__ (   self,
  key 
)

Definition at line 249 of file __init__.py.

00249 
    def __getitem__(self, key): return self.data[key]

Here is the caller graph for this function:

Definition at line 248 of file __init__.py.

00248 
    def __len__(self): return len(self.data)

Definition at line 229 of file __init__.py.

00229 
00230     def __repr__(self):
00231         output = ''
00232         keys = self.data.keys()
00233         keys.sort()
00234         for key in keys:
00235             output = output +  '%s : %s\n' % (key, self.data[ key ])
00236         return output

def Bio.Crystal.Crystal.__setitem__ (   self,
  key,
  item 
)

Definition at line 250 of file __init__.py.

00250 
00251     def __setitem__(self, key, item):
00252         if isinstance(item, Chain):
00253             self.data[key] = item
00254         elif type(item) == type(''):
00255             self.data[ key ] = Chain(item)
00256         else:
00257             raise TypeError

Definition at line 237 of file __init__.py.

00237 
00238     def __str__(self):
00239         output = ''
00240         keys = self.data.keys()
00241         keys.sort()
00242         for key in keys:
00243             output = output +  '%s : %s\n' % (key, self.data[ key ])
00244         return output

Here is the caller graph for this function:

def Bio.Crystal.Crystal.clear (   self)

Definition at line 259 of file __init__.py.

00259 
    def clear(self): self.data.clear()
def Bio.Crystal.Crystal.copy (   self)

Definition at line 260 of file __init__.py.

00260 
00261     def copy(self):
        return copy.copy(self)

Here is the caller graph for this function:

def Bio.Crystal.Crystal.fix (   self)

Definition at line 218 of file __init__.py.

00218 
00219     def fix(self):
00220         data = self.data
00221         for key in data:
00222             element = data[key]
00223             if isinstance(element, Chain):
00224                 pass
00225             elif type(element) == type(''):
00226                 data[key] = Chain(element)
00227             else:
00228                 raise TypeError

def Bio.Crystal.Crystal.get (   self,
  key,
  failobj = None 
)

Definition at line 267 of file __init__.py.

00267 
00268     def get(self, key, failobj=None):
        return self.data.get(key, failobj)

Here is the caller graph for this function:

def Bio.Crystal.Crystal.has_key (   self,
  key 
)

Definition at line 266 of file __init__.py.

00266 
    def has_key(self, key): return key in self.data
def Bio.Crystal.Crystal.items (   self)

Definition at line 263 of file __init__.py.

00263 
    def items(self): return self.data.items()

Here is the caller graph for this function:

def Bio.Crystal.Crystal.keys (   self)

Definition at line 262 of file __init__.py.

00262 
    def keys(self): return self.data.keys()

Here is the caller graph for this function:

Definition at line 273 of file __init__.py.

00273 
00274     def popitem(self):
00275         return self.data.popitem()
def Bio.Crystal.Crystal.setdefault (   self,
  key,
  failobj = None 
)

Definition at line 269 of file __init__.py.

00269 
00270     def setdefault(self, key, failobj=None):
00271         if key not in self.data:
00272             self.data[key] = failobj
        return self.data[key]

Definition at line 245 of file __init__.py.

00245 
00246     def tostring(self):
00247         return self.data

Here is the caller graph for this function:

Definition at line 264 of file __init__.py.

00264 
    def values(self): return self.data.values()

Here is the caller graph for this function:


Member Data Documentation

Definition at line 215 of file __init__.py.


The documentation for this class was generated from the following file: