Package Biskit :: Module PDBParser :: Class PDBParser
[hide private]
[frames] | no frames]

Class PDBParser

source code


**Abstract** base class for parsers that generate PDBModel objects from different source formats.

Instance Methods [hide private]
  __init__(self, log=None)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
  update(self, model, source, skipRes=None, lookHarder=0)
Update empty or missing fields of model from the source.
bool needsUpdate(self, model)
This function is called by update() to decide whether or not to open the source.
PDBModel parse2new(self, source, disconnect=False, skipRes=None)
Create a new PDBModel from the source.

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__


Static Methods [hide private]
bool supports(source)
Override!
str description()
Override!

Properties [hide private]

Inherited from object: __class__


Method Details [hide private]

__init__(self, log=None)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature
Parameters:
  • log (

    Biskit.LogFile.LogFile

    Override if needed. Call parent method in overriding class!
    ) - Log for warnings [default log to STDERR]
Overrides: object.__init__

supports(source)
Static Method

source code 

Override!

The method is static and can thus be called directly with the parser class rather than with an instance:

>>> if PDBParser.supports('myfile.pdb'):
>>>     ...
Returns: bool
True if the given source is supported by this parser implementation
Decorators:

description()
Static Method

source code 

Override!

The method is static and can thus be called directly with the parser class rather than with an instance:

>>> if PDBParser.description('myfile.pdb'):
>>>     ...
Returns: str
short free text description of the supported format
Decorators:

update(self, model, source, skipRes=None, lookHarder=0)

source code 

Update empty or missing fields of model from the source. The model will be connected to the source via model.source. Override!
Parameters:
  • model (PDBModel) - existing model
  • source (str || file || PDBModel) - source PDB file or pickled PDBModel or PDBModel object
  • skipRes ([ str ]) - list residue names that should not be parsed
  • lookHarder (1 || 0) - check source for additional profiles that are not yet known for the model [False]

needsUpdate(self, model)

source code 

This function is called by update() to decide whether or not to open the source. Override if needed.
Parameters:
  • model (PDBModel) - model
Returns: bool
true, if the model needs to be updated from its source

parse2new(self, source, disconnect=False, skipRes=None)

source code 

Create a new PDBModel from the source.
Parameters:
  • source (str || file || PDBModel) - source PDB file or pickled PDBModel or PDBModel object
  • disconnect (bool) - do *not* associate new model with the source [False]
  • skipRes ([ str ]) - list residues that should not be parsed
Returns: PDBModel
new model (always of type PDBModel, regardless of source type)