Back to index

python-biopython  1.60
Public Member Functions | Public Attributes
Bio.PDB.Dice.ChainSelector Class Reference

List of all members.

Public Member Functions

def __init__
def accept_model
def accept_chain
def accept_residue
def accept_atom

Public Attributes

 chain_id
 start
 end
 model_id

Detailed Description

Only accepts residues with right chainid
and between start and end. Remove hydrogens, waters and ligands.
Only use model 0 by default.

Definition at line 15 of file Dice.py.


Constructor & Destructor Documentation

def Bio.PDB.Dice.ChainSelector.__init__ (   self,
  chain_id,
  start,
  end,
  model_id = 0 
)

Definition at line 21 of file Dice.py.

00021 
00022     def __init__(self, chain_id, start, end, model_id=0):
00023         self.chain_id=chain_id
00024         self.start=start
00025         self.end=end
00026         self.model_id=0


Member Function Documentation

def Bio.PDB.Dice.ChainSelector.accept_atom (   self,
  atom 
)

Definition at line 51 of file Dice.py.

00051 
00052     def accept_atom(self, atom):
00053         # atoms - get rid of hydrogens
00054         name=atom.get_id()
00055         if _hydrogen.match(name):
00056             return 0
00057         else:
00058             return 1
00059 

def Bio.PDB.Dice.ChainSelector.accept_chain (   self,
  chain 
)

Definition at line 33 of file Dice.py.

00033 
00034     def accept_chain(self, chain):
00035         if chain.get_id()==self.chain_id:
00036             return 1
00037         return 0

def Bio.PDB.Dice.ChainSelector.accept_model (   self,
  model 
)

Definition at line 27 of file Dice.py.

00027 
00028     def accept_model(self, model):
00029         # model - only keep model 0
00030         if model.get_id()==self.model_id:
00031             return 1
00032         return 0

def Bio.PDB.Dice.ChainSelector.accept_residue (   self,
  residue 
)

Definition at line 38 of file Dice.py.

00038 
00039     def accept_residue(self, residue):
00040         # residue - between start and end
00041         hetatm_flag, resseq, icode=residue.get_id()
00042         if hetatm_flag!=" ":
00043             # skip HETATMS
00044             return 0
00045         if icode!=" ":
00046             warnings.warn("WARNING: Icode at %s" % residue.get_id(),
00047                           RuntimeWarning)
00048         if self.start<=resseq<=self.end:
00049             return 1
00050         return 0


Member Data Documentation

Definition at line 22 of file Dice.py.

Definition at line 24 of file Dice.py.

Definition at line 25 of file Dice.py.

Definition at line 23 of file Dice.py.


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