Package bmrblib :: Module base_classes :: Class BaseSaveframe
[hide private]
[frames] | no frames]

Class BaseSaveframe

source code


The base class for the saveframe classes.

Instance Methods [hide private]
 
__init__(self, datanodes)
Initialise the class, placing the pystarlib data nodes into the namespace.
source code
int
add(self, **keywords)
Add data to the saveframe.
source code
str
create_title(self)
Create the saveframe title.
source code
tuple
extract_data(self, datanode)
Read all the tags from the datanodes.
source code
list
find_mapping(self, datanode)
Determine the mapping between the tag categories of the NMR-STAR file and the bmrblib class.
source code
tuple
loop(self)
Loop over the saveframes, yielding the data.
source code
 
pre_ops(self)
A dummy method for performing no saveframe specific operations prior to XML creation.
source code
dict
read(self)
Read all the data from the saveframe.
source code
 
reset(self)
Reset all data structures to None.
source code
Method Details [hide private]

__init__(self, datanodes)
(Constructor)

source code 

Initialise the class, placing the pystarlib data nodes into the namespace.

Parameters:
  • datanodes (list) - The pystarlib data nodes object.

add(self, **keywords)

source code 

Add data to the saveframe.

If the keywords are within the tag dictionary structure as the variable name, then the data will be checked, translated and stored in that variable. If not, then a warning will be given.

Returns: int
The saveframe count.

create_title(self)

source code 

Create the saveframe title.

Returns: str
The title.

extract_data(self, datanode)

source code 

Read all the tags from the datanodes.

Parameters:
  • datanode (Datanode instance) - The datanode.
Returns: tuple
The data.

find_mapping(self, datanode)

source code 

Determine the mapping between the tag categories of the NMR-STAR file and the bmrblib class.

Parameters:
  • datanode (Datanode instance) - The datanode.
Returns: list
The mapping structure.

loop(self)

source code 

Loop over the saveframes, yielding the data.

Returns: tuple
The saveframe data.

read(self)

source code 

Read all the data from the saveframe.

Returns: dict
A dictionary of all the data.