Statistics gathering and printing class for ISD gibbs sampling.
Also manages the restart file (TODO).
TODO: check if everything was updated nicely
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. | |
| 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'.
| 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
| 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.