IMP logo
Public Member Functions | Public Attributes
IMP.isd.Statistics.Statistics Class Reference

Detailed Description

Statistics gathering and printing class for ISD gibbs sampling.

Also manages the restart file (TODO).

TODO: check if everything was updated nicely

List of all members.

Public Member Functions

def __init__
def add_category
 creates a logging entry for a simulation substep of the gibbs sampler.
def add_coordinates
 adds a placeholder for coordinates
def add_entry
 add an entry for the statistics file
def compress_file
def format_titles
def get_entry_category
def get_formatted_entries
def increment_counter
 increments the counter of category 'key' by 'value' steps.
def new_stage
def prepare_line
def should_wrap_line
def update
 updates an entry and change its value to value
def update_coordinates
 updates the coordinates of key:name entry.
def write_stats
 Writes statistics to the stats file and writes/appends trajectories.

Public Attributes

 add_numbers_to_titles
 append
 categories
 comment_marker
 compress
 coordinates
 entries
 num_entries_per_line
 prefix
 rate
 repeat_title
 separate_lines
 separator
 statfile
 trajrate
 wrap_stats
 write_title

Member Function Documentation

def IMP.isd.Statistics.Statistics.add_category (   self,
  name = None 
)

creates a logging entry for a simulation substep of the gibbs sampler.

Each category has its own counter, initialized to zero. The global category does not need to be created, it's already created by the init method, and its key is 'global'.

  • name: an optional name, must be string. Returns: a unique key to refer to this category, which will start with the optional name.
def IMP.isd.Statistics.Statistics.add_coordinates (   self,
  key,
  name 
)

adds a placeholder for coordinates

def IMP.isd.Statistics.Statistics.add_entry (   self,
  key,
  name = None,
  entry = None 
)

add an entry for the statistics file

  • key: which category it belongs to (key returned by add_category) You must specify at least one of the two following:
  • name: a name for this entry
  • entry: an instance of the Entry class. Arguments: - name only: must already have an entry by that name.
    • entry only: name is set to the entry title and added. If it didn't exist before it is stored as well.
    • name and entry: name is used instead of the title.
    • nothing: raises an error. Currently, not providing entry only makes sense for the counter since there is no method to create an entry without adding it to the statistics file.
def IMP.isd.Statistics.Statistics.increment_counter (   self,
  key,
  value 
)

increments the counter of category 'key' by 'value' steps.

def IMP.isd.Statistics.Statistics.update (   self,
  key,
  name,
  value 
)

updates an entry and change its value to value

def IMP.isd.Statistics.Statistics.update_coordinates (   self,
  key,
  name,
  value 
)

updates the coordinates of key:name entry.

Format should match with the format specified at init time (pdb or cdf)

def IMP.isd.Statistics.Statistics.write_stats (   self)

Writes statistics to the stats file and writes/appends trajectories.

Only does that if the global step matches the output rate. Trajectories are written more sparsely, see trajrate. Returns: True if data was written, False if not.


The documentation for this class was generated from the following file:

Generated on Tue May 22 2012 23:33:36 for IMP by doxygen 1.8.1