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

Class P_discus

source code

structureparser.StructureParser --+
                                  |
                                 P_discus

Parser for DISCUS structure format.  The parser chokes
on molecule and generator records.



Instance Methods [hide private]
 
__init__(self) source code
 
parseLines(self, lines)
Parse list of lines in DISCUS format.
source code
 
toLines(self, stru)
Convert Structure stru to a list of lines in DISCUS format.
source code
 
linesIterator(self)
Iterator over self.lines, which increments self.nl...
source code
 
_parse_cell(self, words)
Process the cell record from DISCUS structure file.
source code
 
_parse_format(self, words)
Process the format record from DISCUS structure file.
source code
 
_parse_ncell(self, words)
Process the ncell record from DISCUS structure file.
source code
 
_parse_spcgr(self, words)
Process the spcgr record from DISCUS structure file.
source code
 
_parse_title(self, words)
Process the title record from DISCUS structure file.
source code
 
_parse_shape(self, words)
Process the shape record from DISCUS structure file.
source code
 
_parse_atom(self, words)
Process atom records in DISCUS structure file.
source code
 
_parse_unknown_record(self, words)
Process unknown record in DISCUS structure file.
source code
 
_parse_not_implemented(self, words)
Process the unimplemented records from DISCUS structure file.
source code

Inherited from structureparser.StructureParser: parse, parseFile, tostring

Method Details [hide private]

__init__(self)
(Constructor)

source code 
Overrides: structureparser.StructureParser.__init__

parseLines(self, lines)

source code 
Parse list of lines in DISCUS format.

Return PDFFitStructure instance or raise StructureFormatError.

Overrides: structureparser.StructureParser.parseLines

toLines(self, stru)

source code 
Convert Structure stru to a list of lines in DISCUS format.
Return list of strings.

Overrides: structureparser.StructureParser.toLines

linesIterator(self)

source code 
Iterator over self.lines, which increments self.nl
        

_parse_unknown_record(self, words)

source code 
Process unknown record in DISCUS structure file.
Silently ignores the line and adds it to self.ignored_lines
Raises StructureFormatError.

_parse_not_implemented(self, words)

source code 
Process the unimplemented records from DISCUS structure file.
Raises NotImplementedError.