Package csb :: Package bio :: Package io :: Module wwpdb :: Class StructureProvider
[frames] | no frames]

Class StructureProvider

source code

object --+
         |
        StructureProvider
Known Subclasses:

Base class for all PDB data source providers.

Concrete classes need to implement the find method, which abstracts the retrieval of a PDB structure file by a structure identifier. This is a hook method called internally by get, but subclasses can safely override both find and {get} to in order to achieve completely custom behavior.

Nested Classes
  __metaclass__
Metaclass for defining Abstract Base Classes (ABCs).
Instance Methods
 
__getitem__(self, id) source code
str or None
find(self, id)
Attempt to discover a PDB file, given a specific PDB id.
source code
csb.bio.Structure
get(self, id, model=None)
Discover, parse and return the PDB structure, corresponding to the specified id.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables
  __abstractmethods__ = frozenset(['find'])
Properties

Inherited from object: __class__

Method Details

find(self, id)

source code 

Attempt to discover a PDB file, given a specific PDB id.

Parameters:
  • id (str) - structure identifier (e.g. 1x80)
Returns: str or None
path and file name on success, None otherwise

get(self, id, model=None)

source code 

Discover, parse and return the PDB structure, corresponding to the specified id.

Parameters:
  • id (str) - structure identifier (e.g. 1x80)
  • model (str) - optional model identifier
Returns: csb.bio.Structure
Raises: