PACT/PDB
Home Up

 

Module pdb_history

Pact/PDB files are self-defining, portable binary data files. The use of this module requires Pact. Protein DataBase files are a different kind of file also referred to as PDB files. This module does not have anything to do with them.

Tag-creating Functions

The usual way to create a tag whose history will be collected in a Pact/PDB file is PDBfile_tag::

pdbfile_tag (tagname, filename = '', col = collector)

If the filename is not given, it will be history_xxx.txt, where xxx is the value of the tag name tagname. This function returns a new instance of Tag with the medium being and instance of history_medium.Textfile. The tag is registered with the instance of HistoryCollector supplied as the argument col. The default is the standard collectory from module history.

Class PDBfile

A tag is a group of items that should be sampled at the same times and those samples written out to a history medium. Class PDBfile creates a history medium tied to a Pact/PDB file. A medium is an instance of a class conforming to history_medium.HistoryMedium. All attributes and methods are inherited from HistoryMedium and redefined appropriately..

PDBfile (filename = None)

returns an instance of a history medium based on a Pact/PDB file with the given name.If no file name is given at creation, set_name must be called before use.

set_name (name)

must be called when is_open is false. It sets the name of the text file to be used for future records.