IMP logo
IMP Reference Guide  2.17.0
The Integrative Modeling Platform
IMP.EMageFit.solutions_io Namespace Reference

Utility functions to store and retrieve solution information. More...

Detailed Description

Utility functions to store and retrieve solution information.

Classes

class  HeapRecord
 The heapq algorithm is a min-heap. More...
 
class  ResultsDB
 Class for managing the results of the experiments. More...
 

Functions

def gather_best_solution_results
 Reads a set of database files and merge them into a single file. More...
 
def gather_solution_results
 Reads a set of database files and puts them in a single file Makes sure to reorder all column names if necessary before merging. More...
 
def get_best_solution
 Recover the reference frame of the n-th best solution from a database. More...
 
def get_fields_string
 Get a list of fields and return a string with them. More...
 
def get_sorting_indices
 Return indices that sort the list ls. More...
 

Function Documentation

def IMP.EMageFit.solutions_io.gather_best_solution_results (   fns,
  fn_output,
  max_number = 50000,
  raisef = 0.1,
  orderby = 'em2d' 
)

Reads a set of database files and merge them into a single file.

Parameters
fnsList of files with databases
fn_outputThe database to create
max_numberMaximum number of records to keep, sorted according to orderby
raisefRatio of problematic database files tolerated before raising an error. This option is to tolerate some files of the databases being broken because the cluster fails, fill the disks, etc
orderbyCriterion used to sort the records NOTE: Makes sure to reorder all column names if necessary before merging The record for the native solution is only added once (from first file).
Note
This function is only available in Python.

Definition at line 62 of file solutions_io.py.

def IMP.EMageFit.solutions_io.gather_solution_results (   fns,
  fn_output,
  raisef = 0.1 
)

Reads a set of database files and puts them in a single file Makes sure to reorder all column names if necessary before merging.

Parameters
fnsList of database files
fn_outputName of the output database
raisefSee help for gather_best_solution_results()
Note
This function is only available in Python.

Definition at line 143 of file solutions_io.py.

def IMP.EMageFit.solutions_io.get_best_solution (   fn_database,
  Nth,
  fields = False,
  orderby = False,
  tbl = 'results' 
)

Recover the reference frame of the n-th best solution from a database.

The index Nth stars at 0

Note
This function is only available in Python.

Definition at line 195 of file solutions_io.py.

def IMP.EMageFit.solutions_io.get_fields_string (   fields)

Get a list of fields and return a string with them.

If there are no fields, return an *, indicating SQL that all the fields are requested

Parameters
fieldsA list of strings
Returns
a string
Note
This function is only available in Python.

Definition at line 219 of file solutions_io.py.

def IMP.EMageFit.solutions_io.get_sorting_indices (   ls)

Return indices that sort the list ls.

Note
This function is only available in Python.

Definition at line 188 of file solutions_io.py.