Package diffpy :: Package Structure :: Package Parsers :: Module P_pdb :: Class P_pdb
[hide private]
[frames] | no frames]

Class P_pdb

source code

structureparser.StructureParser --+
                                  |
                                 P_pdb

Simple parser for PDB format.
The parser understands following PDB records: TITLE, CRYST1, SCALE1,
SCALE2, SCALE3, ATOM, SIGATM, ANISOU, SIGUIJ, TER, HETATM, END

Static data members:

orderOfRecords -- order of PDB record labels
validRecords   -- dictionary of valid PDB records



Instance Methods [hide private]
 
__init__(self) source code
 
parseLines(self, lines)
Parse list of lines in PDB format.
source code
 
titleLines(self, stru)
build lines corresponding to TITLE record
source code
 
cryst1Lines(self, stru)
build lines corresponding to CRYST1 record
source code
 
atomLines(self, stru, idx)
build ATOM records and possibly SIGATM, ANISOU or SIGUIJ records...
source code
 
toLines(self, stru)
Convert Structure stru to a list of lines in PDFFit format.
source code

Inherited from structureparser.StructureParser: parse, parseFile, tostring

Class Variables [hide private]
  orderOfRecords = ['HEADER', 'OBSLTE', 'TITLE', 'CAVEAT', 'COMP...
  validRecords = {'ANISOU': None, 'ATOM': None, 'AUTHOR': None, ...
Method Details [hide private]

__init__(self)
(Constructor)

source code 
Overrides: structureparser.StructureParser.__init__

parseLines(self, lines)

source code 
Parse list of lines in PDB format.

Return Structure instance or raise StructureFormatError.

Overrides: structureparser.StructureParser.parseLines

atomLines(self, stru, idx)

source code 
build ATOM records and possibly SIGATM, ANISOU or SIGUIJ records
for structure stru atom number aidx

toLines(self, stru)

source code 
Convert Structure stru to a list of lines in PDFFit format.

Return list of strings.

Overrides: structureparser.StructureParser.toLines

Class Variable Details [hide private]

orderOfRecords

Value:
['HEADER',
 'OBSLTE',
 'TITLE',
 'CAVEAT',
 'COMPND',
 'SOURCE',
 'KEYWDS',
 'EXPDTA',
...

validRecords

Value:
{'ANISOU': None,
 'ATOM': None,
 'AUTHOR': None,
 'CAVEAT': None,
 'CISPEP': None,
 'COMPND': None,
 'CONECT': None,
 'CRYST1': None,
...