Biskit :: ChainCleaner :: ChainCleaner :: Class ChainCleaner
[hide private]
[frames] | no frames]

Class ChainCleaner

source code

Take with each call to next() one chain from ChainSeparator; Return this chain with completed residues.

Instance Methods [hide private]
  __init__(self, chainSeparator)
Clean up separate chains.
list of str _res2Terminal(self, aName_list)
Tweak list of allowed atom names to one expected for a C-terminal residue.
  _addMissing(self, residue, atom_name)
Add atom with given name to residue.
chain object _completeResidues(self, chain)
Look for missing or unknown atom names, add missing atoms, report unknown atoms.
chain object _checkOccupancy(self, chain)
Check and report atoms with ocupancies that is not 100% Scientific.PDB.IO will only take one of the atoms even if there are alternate locations indicated in the PDB-file.
chain object _find_and_change(self, chain, oldAtomName, residueNum, newAtomName)
Change name of atoms in specified residue.
chain object _correct_Cterm(self, chain)
Terminal amino acid can't have atom type O and OXT - have to be OT1 and OT2
chain object OR None next(self)
Obtain next chain from ChainSeparator; Add missing atoms.

Method Details [hide private]

__init__(self, chainSeparator)
(Constructor)

source code 

Clean up separate chains.
Parameters:
  • chainSeparator (module) - ChainSeparator

_res2Terminal(self, aName_list)

source code 

Tweak list of allowed atom names to one expected for a C-terminal residue.
Parameters:
  • aName_list (list of strings) - list of allowed atom names e.g. ['N','CA','C','O','CB']
Returns: list of str
e.g. ['N','CA','C','OT1','CB','OT2']

_addMissing(self, residue, atom_name)

source code 

Add atom with given name to residue.
Parameters:
  • residue (object) - Scientific.IO.PDB.Residue object
  • atom_name (str) - atom name

_completeResidues(self, chain)

source code 

Look for missing or unknown atom names, add missing atoms, report unknown atoms.
Parameters:
  • chain (object) - Scientific.IO.PDB.PeptideChain object
Returns: chain object
Scientific.IO.PDB.PeptideChain object

_checkOccupancy(self, chain)

source code 

Check and report atoms with ocupancies that is not 100% Scientific.PDB.IO will only take one of the atoms even if there are alternate locations indicated in the PDB-file. The code below does only check for none 100% occupancies and report them to the log-file.
Parameters:
  • chain (chain object) - Scientific.IO.PDB.PeptideChain object
Returns: chain object
Scientific.IO.PDB.PeptideChain object

_find_and_change(self, chain, oldAtomName, residueNum, newAtomName)

source code 

Change name of atoms in specified residue.
Parameters:
  • chain (chain object) - Scientific.IO.PDB.PeptideChain object
  • oldAtomName (str) - atom name
  • residueNum (int) - residue number
  • newAtomName (str) - atom name
Returns: chain object
Scientific.IO.PDB.PeptideChain object

_correct_Cterm(self, chain)

source code 

Terminal amino acid can't have atom type O and OXT - have to be OT1 and OT2
Parameters:
  • chain (chain object) - Scientific.IO.PDB.PeptideChain object
Returns: chain object
Scientific.IO.PDB.PeptideChain object

next(self)

source code 

Obtain next chain from ChainSeparator; Add missing atoms.
Returns: chain object OR None
Scientific.IO.PDB.PeptideChain, completed chain OR if no chain is left