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

Class PDBCleaner

source code

Remove HETAtoms from PDB, replace non-standard AA by closest standard AA. Remove non-standard atoms from standard AA residues (and more).

Instance Methods [hide private]
  __init__(self, fpdb, log=None)
  logWrite(self, msg, force=1)
  remove_multi_occupancies(self)
Keep only atoms with alternate A field (well, or no alternate).
  replace_non_standard_AA(self, amber=0, keep=[])
Replace amino acids with none standard names with standard amino acids according to MU.nonStandardAA
str __standard_res(self, resname)
Check if resname is a standard residue (according to MU.atomDic) if not return the closest standard residue (according to MU.nonStandardAA).
int remove_non_standard_atoms(self)
First missing standard atom triggers removal of standard atoms that follow in the standard order.
PDBModel process(self, keep_hetatoms=0, amber=0, keep_xaa=[])
Remove Hetatoms, waters.

Method Details [hide private]

__init__(self, fpdb, log=None)
(Constructor)

source code 
Parameters:
  • fpdb (str) - pdb file OR PDBModel
  • log (object) - LogFile object

logWrite(self, msg, force=1)

source code 

remove_multi_occupancies(self)

source code 

Keep only atoms with alternate A field (well, or no alternate).

replace_non_standard_AA(self, amber=0, keep=[])

source code 

Replace amino acids with none standard names with standard amino acids according to MU.nonStandardAA
Parameters:
  • amber (1||0) - don't rename HID, HIE, HIP, CYX, NME, ACE [0]
  • keep ([ str ]) - names of residues to keep

__standard_res(self, resname)

source code 

Check if resname is a standard residue (according to MU.atomDic) if not return the closest standard residue (according to MU.nonStandardAA).
Parameters:
  • resname (str) - 3-letter residue name
Returns: str
name of closest standard residue or resname itself

remove_non_standard_atoms(self)

source code 

First missing standard atom triggers removal of standard atoms that follow in the standard order. All non-standard atoms are removed too. Data about standard atoms are taken from MU.atomDic and symomym atom name is defined in MU.atomSynonyms.
Returns: int
number of atoms removed

process(self, keep_hetatoms=0, amber=0, keep_xaa=[])

source code 

Remove Hetatoms, waters. Replace non-standard names. Remove non-standard atoms.
Parameters:
  • keep_hetatoms (0||1) - option
  • amber (0||1) - don't rename amber residue names (HIE, HID, CYX,..)
  • keep_xaa ([ str ]) - names of non-standard residues to be kept
Returns: PDBModel
PDBModel (reference to internal)
Raises: