IMP  2.1.0
The Integrative Modeling Platform
IMP.em2d.DominoModel.DominoModel Class Reference

Management of a model using DOMINO. More...

Public Member Functions

def add_branch_and_bound_assignments_table
 BranchAndBoundAssignmentsTable enumerate states based on provided filtered using the provided the subset filter tables.
 
def add_exclusion_filter_table
 ExclusionSubsetFilterTable ensures that two particles are not given the same state at the same time.
 
def add_restraint
 Adds a restraint to the model. More...
 
def add_restraint_score_filter_table
 Add a RestraintScoreSubsetFilterTable to DOMINO that allows to reject assignments that have score worse than the thresholds for the restraints.
 
def align_rigid_bodies_states
 Aligns the set of structures considered for DOMINO sampling. More...
 
def create_coarse_assembly
 Simplify the assembly with a coarse representation. More...
 
def create_merge_tree
 Creates a merge tree from the restraints that are set already.
 
def do_sampling
 Do Domino sampling. More...
 
def get_assignment_and_RFs
 Return a line with texts for an assignment and the the reference frames of the RigidBodies in the subset. More...
 
def get_assignment_info
 Info related to an assignment. More...
 
def get_assignment_scores
 Returns a list with the values for the restraints on a subset of the components of the assembly. More...
 
def get_assignment_text
 Get the formatted text for an assignment. More...
 
def get_assignments_with_heap
 Domino sampling that recovers the assignments for the root of the merge tree, but conserving only the best k scores for each vertex of the tree. More...
 
def get_restraint_value_for_assignment
 Recover the value of a restraint. More...
 
def get_restraints_for_native
 Get values of the restraints for the native structure. More...
 
def get_restraints_names_used
 Get the names of the restraints used for a subset. More...
 
def load_state
 Load the positions of the components given by the assignment. More...
 
def read_merge_tree
 Read and create a merge tree from a file. More...
 
def set_assembly
 Sets an assembly from a single PDB file. More...
 
def set_assembly_components
 Sets the components of an assembly, each one given as a separate PDB file. More...
 
def set_close_pairs_excluded_volume_restraint
 Creates an excluded volume restraint between all the components of the coarse assembly.See help for. More...
 
def set_complementarity_restraint
 Set a restraint for geometric complementarity between 2 components. More...
 
def set_connectivity_restraint
 Set a connectivity restraint between the elements of the assembly. More...
 
def set_em2d_restraint
 Set a Restraint computing the em2d score. More...
 
def set_native_assembly_for_benchmark
 Sets the native model for benchmark, by reading the native structure and set the rigid bodies. More...
 
def set_not_optimized
 Set a part of the model as not optimized (it does not move during the model optimization) More...
 
def set_pair_score_restraint
 Set a pair_score restraint between the coarse representation of two components. More...
 
def set_rb_states
 Add a set of reference frames as possible states for a rigid body. More...
 
def set_xlink_restraint
 Set a restraint on the maximum distance between 2 residues. More...
 
def setup_domino_sampler
 Creates a DOMINO sampler and adds the required filter tables.
 
def write_merge_tree
 Writes the current merge tree to file. More...
 
def write_monte_carlo_solution
 Write the solution of a MonteCarlo run. More...
 
def write_pdb_for_assignment
 Write the solution in the assignment. More...
 
def write_pdb_for_component
 Write one component of the assembly. More...
 
def write_pdb_for_configuration
 Write a file with a configuration for the model (configuration here means a configuration in DOMINO) More...
 
def write_pdb_for_reference_frames
 Write a PDB file with a solution given by a set of reference frames. More...
 
def write_pdbs_for_reference_frames
 Write a separate PDB for each of the elements. More...
 
def write_solutions_database
 Write the results of the DOMINO sampling to a SQLite database. More...
 
def write_subset
 Writes lines describing a subset (vertex of a merge tree) More...
 

Detailed Description

Note
This class is only available in Python.

Definition at line 35 of file DominoModel.py.

Member Function Documentation

def IMP.em2d.DominoModel.DominoModel.add_restraint (   self,
  r,
  name,
  weight,
  max_score = False 
)
Parameters
rAn IMP.kernel.Restraint object
nameName for the restraint
weightWeight for the restraint
max_scoreMaximum score allowed for the restraint. If max_score is False, there is no limit for the value of the restraint

Definition at line 54 of file DominoModel.py.

def IMP.em2d.DominoModel.DominoModel.align_rigid_bodies_states (   self)

The function: 1) reads the possible reference frames that the rb_states_table stores for each rigid body. This table must be filled before using this function. Usually it is filled with the results from a previous Monte Carlo sampling. If the solutions from Monte Carlo seem to have the same structure but they are not aligned to each other, this function can help setting better starting positions to use with DOMINO. 2) Gets the first state for each of the rigid bodies and sets a reference structure using such states. 3) Aligns all the rest of the structures respect to the reference 4) Replaces the values of the reference frames stored in the rb_states_table with the new values obtained from the alignments. It does it for all states of a rigid body.

Note
: If this function is applied, the parameters "anchor" and "fixed" are ignored, as they are superseded by the use of the aligments calculated here.

Definition at line 76 of file DominoModel.py.

+ Here is the call graph for this function:

def IMP.em2d.DominoModel.DominoModel.create_coarse_assembly (   self,
  n_residues,
  write = False 
)
Parameters
n_residuesNumber of residues used for a coarse particle
writeIf True, write the coarse assembly to a format that Chimera can display

Definition at line 202 of file DominoModel.py.

def IMP.em2d.DominoModel.DominoModel.do_sampling (   self,
  mode = 'assignments_heap_container',
  params = None 
)
Parameters
modeThe mode used to recover solutions from domino. It can have the value "configuration", "assignments", or "assignments_heap_container". The mode "configuration" recovers all possible configurations (takes a while to generate them). The mode "assignments" only provides the assignments (state numbers) of the solutions. It is faster but requires generating the solutions afterwards The mode "assignments_heap_container" selects the best solutions after ecah merging in DOMINO, discarding the rest. In practice I used the mode "assignments_heap_container"
params

Definition at line 219 of file DominoModel.py.

+ Here is the call graph for this function:

def IMP.em2d.DominoModel.DominoModel.get_assignment_and_RFs (   self,
  assignment,
  subset 
)
Parameters
subsetSubset of components of the assembly
assignmentAssignment class with the states for the subset
Note
: see the get_assignment_assignment_text() note.

Definition at line 289 of file DominoModel.py.

def IMP.em2d.DominoModel.DominoModel.get_assignment_info (   self,
  assignment,
  subset 
)

Returns a list with text for the assignment and all the scores for the restraints

Parameters
subsetSubset of components of the assembly
assignmentAssignment class with the states for the subset

Definition at line 312 of file DominoModel.py.

+ Here is the call graph for this function:

def IMP.em2d.DominoModel.DominoModel.get_assignment_scores (   self,
  assignment,
  subset 
)
Parameters
subsetSubset of components of the assembly
assignmentAssignment class with the states for the subset

Definition at line 324 of file DominoModel.py.

def IMP.em2d.DominoModel.DominoModel.get_assignment_text (   self,
  assignment,
  subset 
)
Parameters
subsetSubset of components of the assembly
assignmentAssignment class with the states for the subset
Note
: The order in assignment and subset is not always the order of the rigid bodies in self.components_rbs. The function reorders the terms in the assignment so there is correspondence.

Definition at line 271 of file DominoModel.py.

def IMP.em2d.DominoModel.DominoModel.get_assignments_with_heap (   self,
  vertex,
  k = 0 
)
Parameters
[in]vertexVertex with the root of the current merge tree. This function is recursive.
[in]k

Definition at line 348 of file DominoModel.py.

+ Here is the call graph for this function:

def IMP.em2d.DominoModel.DominoModel.get_restraint_value_for_assignment (   self,
  assignment,
  name 
)
Parameters
nameof the restraint
assignmentAssignment class containing the assignment for the solution desired

Definition at line 389 of file DominoModel.py.

+ Here is the call graph for this function:

def IMP.em2d.DominoModel.DominoModel.get_restraints_for_native (   self,
  restraints_names 
)
Parameters
restraints_namesNames of the restraints requested
Returns
a list with the values of all scores, and the total score

Definition at line 868 of file DominoModel.py.

def IMP.em2d.DominoModel.DominoModel.get_restraints_names_used (   self,
  subset 
)
Parameters
subsetSubset of components of the assembly

Definition at line 861 of file DominoModel.py.

def IMP.em2d.DominoModel.DominoModel.load_state (   self,
  assignment 
)
Parameters
assignmentAssignment class

Definition at line 339 of file DominoModel.py.

def IMP.em2d.DominoModel.DominoModel.read_merge_tree (   self,
  fn 
)

The format of the file is the format written by write merge_tree() It does not matter the order of the indices in the file, as they are sorted by this function. The only condition is that the index for the vertex that is the root of the tree MUST be the largest. This is guaranteed when creating a merge tree with create_merge_tree()

Parameters
fnFile containing the merge tree

Definition at line 530 of file DominoModel.py.

def IMP.em2d.DominoModel.DominoModel.set_assembly (   self,
  fn_pdb,
  names 
)

The function assumes that the components of the assembly are the chains of the PDB file.

Parameters
fn_pdbPDB with the file for the asembly
namesNames for each of the components (chains) of the asembly

Definition at line 477 of file DominoModel.py.

def IMP.em2d.DominoModel.DominoModel.set_assembly_components (   self,
  fn_pdbs,
  names 
)
Parameters
fn_pdbsList with the names of the pdb files
namesList with the names of the components of the assembly.

Definition at line 462 of file DominoModel.py.

def IMP.em2d.DominoModel.DominoModel.set_close_pairs_excluded_volume_restraint (   self,
  distance = 10,
  weight = 1.0,
  ratio = 0.05,
  stddev = 2,
  max_score = False 
)
Parameters
distanceMaximum distance tolerated between particles
weightWeight for the restraint
stddev
max_scoreMaximum value for the restraint. If the parameter is None, an automatic value is computed (using the ratio).
ratioFraction of the number of possible pairs of particles that are tolerated to overlap. The maximum score is modified according to this ratio. I have found that ratios of 0.05-0.1 work well allowing for some interpenetration
stddevStandard deviation used to approximate the HarmonicUpperBound function to a Gaussian

Definition at line 725 of file DominoModel.py.

+ Here is the call graph for this function:

def IMP.em2d.DominoModel.DominoModel.set_complementarity_restraint (   self,
  name1,
  name2,
  rname,
  max_sep_distance,
  max_penetration,
  weight,
  max_score = 10000000000.0 
)
Parameters
name1name of
name2- The restraint is applied to this components
rname- The name given to the restraint
max_sep_distance- maximum distance between molecules tolerated by the restraint
max_penetration- Maximum penetration allowd (angstrom)
weight
max_score

Definition at line 175 of file DominoModel.py.

+ Here is the call graph for this function:

def IMP.em2d.DominoModel.DominoModel.set_connectivity_restraint (   self,
  names,
  rname,
  distance = 10,
  weight = 1.0,
  max_score = None,
  n_pairs = 1,
  stddev = 2 
)
Parameters
namesList with all the elements to be connected
distanceMaximum distance tolerated by the restraint
rnameName for the restraint
weightWeight for the restraint
max_scoreMaximum score for the restraint
n_pairsNumber of pairs of particles used in the KClosePairScore of the connecitivity restraint
stddevStandard deviation used to approximate the HarmonicUpperBound function to a Gaussian

Definition at line 650 of file DominoModel.py.

+ Here is the call graph for this function:

def IMP.em2d.DominoModel.DominoModel.set_em2d_restraint (   self,
  name,
  fn_images_sel,
  pixel_size,
  resolution,
  n_projections,
  weight,
  max_score = False,
  mode = 'fast',
  n_optimized = 1 
)
Parameters
nameName for the restraint
fn_images_selSelection file with the names of the images used for the restraint
pixel_size- pixel size in the images
resolution- resolution used to downsample the projections of the model when projecting
weightWeight of the restraint
max_score- Maximum value tolerated for the restraint
n_projections- Number of projections to generate when projecting the model to do the coarse alignments
mode- Mode used for computing the restraints.
n_optimized- number of results from the coarse alignment that are refined with the Simplex algorithm to get a more accurate value for the restraint

Definition at line 678 of file DominoModel.py.

+ Here is the call graph for this function:

def IMP.em2d.DominoModel.DominoModel.set_native_assembly_for_benchmark (   self,
  params 
)

Definition at line 407 of file DominoModel.py.

def IMP.em2d.DominoModel.DominoModel.set_not_optimized (   self,
  name 
)
Parameters
nameof the component to optimized

Definition at line 709 of file DominoModel.py.

+ Here is the call graph for this function:

def IMP.em2d.DominoModel.DominoModel.set_pair_score_restraint (   self,
  name1,
  name2,
  restraint_name,
  distance = 10,
  weight = 1.0,
  n_pairs = 1,
  stddev = 2,
  max_score = None 
)
Parameters
name1Name of the first component
name2Name of the second component
restraint_nameName for the restraint
distanceMaximum distance tolerated between particles
weightWeight of the restraint
n_pairs
max_scoreMaximum value tolerated for the restraint
stddevStandard deviation used to approximate the HarmonicUpperBound function to a Gaussian

Definition at line 773 of file DominoModel.py.

+ Here is the call graph for this function:

def IMP.em2d.DominoModel.DominoModel.set_rb_states (   self,
  rb,
  transformations 
)
Parameters
rbThe rigid body
transformationsTransformations are used to build the reference frames for the rigid body.

Definition at line 430 of file DominoModel.py.

def IMP.em2d.DominoModel.DominoModel.set_xlink_restraint (   self,
  id1,
  chain1,
  residue1,
  id2,
  chain2,
  residue2,
  distance,
  weight,
  stddev,
  max_score = False 
)
Parameters
id1Name of the first component
chain1
residue1Residue number for the aminoacid in the first component.The number is the number in the PDB file, not the number relative to the beginning of the chain
id2Name of the second component
chain2
residue2Residue number for the aminoacid in the second component.
distanceMaximum distance tolerated
weightWeight of the restraint
stddevStandard deviation used to approximate the HarmonicUpperBound function to a Gaussian
max_scoreSee help for add_restraint(). If none is given, the maximum score is set to allow a maximum distance of 10 Angstrom greater than the parameter "distance".

Definition at line 131 of file DominoModel.py.

+ Here is the call graph for this function:

def IMP.em2d.DominoModel.DominoModel.write_merge_tree (   self,
  fn 
)

The format is: parent | child_left | child_right | labels

Parameters
fnFile for storing the merge tree

Definition at line 606 of file DominoModel.py.

+ Here is the call graph for this function:

def IMP.em2d.DominoModel.DominoModel.write_monte_carlo_solution (   self,
  fn_database 
)
Parameters
fn_databaseDatabase file with the solution. The database will contain only one record

Definition at line 962 of file DominoModel.py.

def IMP.em2d.DominoModel.DominoModel.write_pdb_for_assignment (   self,
  assignment,
  fn_pdb 
)
Parameters
assignmentAssignment class with the states for the subset
fn_pdbFile to write the model

Definition at line 903 of file DominoModel.py.

+ Here is the call graph for this function:

def IMP.em2d.DominoModel.DominoModel.write_pdb_for_component (   self,
  component_index,
  ref,
  fn_pdb 
)
Parameters
component_indexPosition of the component in the assembly
refReference frame of the component
fn_pdbOutput PDB

Definition at line 949 of file DominoModel.py.

def IMP.em2d.DominoModel.DominoModel.write_pdb_for_configuration (   self,
  n,
  fn_pdb 
)
Parameters
nIndex of the configuration desired.
fn_pdb

Definition at line 915 of file DominoModel.py.

def IMP.em2d.DominoModel.DominoModel.write_pdb_for_reference_frames (   self,
  RFs,
  fn_pdb 
)
Parameters
RFsReference frames for the elements of the complex
fn_pdbFile to write the solution

Definition at line 928 of file DominoModel.py.

def IMP.em2d.DominoModel.DominoModel.write_pdbs_for_reference_frames (   self,
  RFs,
  fn_base 
)
Parameters
RFsReference frames for the elements of the complex
fn_basebase string to buid the names of the PDBs files

Definition at line 938 of file DominoModel.py.

def IMP.em2d.DominoModel.DominoModel.write_solutions_database (   self,
  fn_database,
  max_number = None 
)
Parameters
fn_database
max_numberMaximum number of results to write

Definition at line 822 of file DominoModel.py.

+ Here is the call graph for this function:

def IMP.em2d.DominoModel.DominoModel.write_subset (   self,
  v,
  w 
)
Parameters
wA csv.writer
vVertex index

Definition at line 624 of file DominoModel.py.

+ Here is the call graph for this function:


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