IMP  2.3.0
The Integrative Modeling Platform
IMP.em2d.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  ClusterRecord
 Simple named tuple class. More...
 
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 neccesary 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 l. More...
 

Function Documentation

def IMP.em2d.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
orderbyCriterium used to sort the the records NOTE: Makes sure to reorder all column names if neccesary before merging The record for the native solution is only added once (from first file).

Definition at line 94 of file solutions_io.py.

def IMP.em2d.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 neccesary before merging.

Parameters
fnsList of database files
fn_outputName of the output database
raisefSee help for gather_best_solution_results()

Definition at line 177 of file solutions_io.py.

def IMP.em2d.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

Definition at line 229 of file solutions_io.py.

def IMP.em2d.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

Definition at line 253 of file solutions_io.py.

def IMP.em2d.solutions_io.get_sorting_indices (   l)

Return indices that sort the list l.

Definition at line 222 of file solutions_io.py.