Startools toolkit

Portion of this software uses startools toolkit developed by Peter Keller at Global Phasing Ltd.

pdbecif.globalphasing.startools

class pdbecif.globalphasing.startools.StarToken(token_type, token_value)

Class representing a token from STAR data.

property type

An integer (> 0) representing the type of this STAR token. It corresponds to the matching group of the STAR regular expression that matched the value.

property type_string

The type of this STAR token as a text mnemonic

property value

The value of this STAR token. If it is a quoted data value, it will have had any enclosing quotation removed (including the trailing newline in the case of semi-colon delimited text). The type of quoting will be indicated by the token type.

class pdbecif.globalphasing.startools.StarTokeniser

Simple wrapper around re.RegexObject.finditer() that emits StarToken instances

start_matching(cif)

Clear any existing state of this object, and prepare to start matching against the contents of a file. The parameter cif may be a string containing the pathname to a file (in which case it is opened in read only mode) or a file object