Back to index

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

List of all members.

Public Member Functions

def __init__
def __eq__
def __ne__
def __repr__
def __str__
def __len__

Public Attributes

 data

Detailed Description

This class exists to support the PDB hetero codes.

Supports only the 3 alphameric code.
The annotation is available from http://alpha2.bmc.uu.se/hicup/

Definition at line 31 of file __init__.py.


Constructor & Destructor Documentation

def Bio.Crystal.Hetero.__init__ (   self,
  data 
)

Definition at line 38 of file __init__.py.

00038 
00039     def __init__(self, data):
00040         # Enforce string storage
00041         if type(data) != type(""):
00042             raise CrystalError('Hetero data must be an alphameric string')
00043         if data.isalnum() == 0:
00044             raise CrystalError('Hetero data must be an alphameric string')
00045         if len(data) > 3:
00046             raise CrystalError('Hetero data may contain up to 3 characters')
00047         if len(data) < 1:
00048             raise CrystalError('Hetero data must not be empty')
00049 
00050         self.data = data[:].lower()

Here is the caller graph for this function:


Member Function Documentation

def Bio.Crystal.Hetero.__eq__ (   self,
  other 
)

Definition at line 51 of file __init__.py.

00051 
00052     def __eq__(self, other):
00053         return self.data == other.data

Here is the caller graph for this function:

Definition at line 64 of file __init__.py.

00064 
00065     def __len__(self): return len(self.data)

def Bio.Crystal.Hetero.__ne__ (   self,
  other 
)
Returns true iff self is not equal to other.

Definition at line 54 of file __init__.py.

00054 
00055     def __ne__(self, other):
00056         """Returns true iff self is not equal to other."""
00057         return not self.__eq__(other)

Here is the call graph for this function:

Definition at line 58 of file __init__.py.

00058 
00059     def __repr__(self):
00060         return "%s" % self.data

Definition at line 61 of file __init__.py.

00061 
00062     def __str__(self):
00063         return "%s" % self.data

Here is the caller graph for this function:


Member Data Documentation

Definition at line 49 of file __init__.py.


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