IMP Reference Guide
2.6.0
The Integrative Modeling Platform
|
Management of a model using DOMINO. More...
Management of a model using DOMINO.
Definition at line 37 of file domino_model.py.
Public Member Functions | |
def | add_branch_and_bound_assignments_table |
BranchAndBoundAssignmentsTable enumerate states based on provided filtered using the provided the subset filter tables. More... | |
def | add_exclusion_filter_table |
ExclusionSubsetFilterTable ensures that two particles are not given the same state at the same time. More... | |
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. More... | |
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. More... | |
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 | get_scoring_function |
Get a ScoringFunction that includes all restraints. 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. More... | |
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... | |
def IMP.EMageFit.domino_model.DominoModel.add_branch_and_bound_assignments_table | ( | self | ) |
BranchAndBoundAssignmentsTable enumerate states based on provided filtered using the provided the subset filter tables.
Definition at line 498 of file domino_model.py.
def IMP.EMageFit.domino_model.DominoModel.add_exclusion_filter_table | ( | self | ) |
ExclusionSubsetFilterTable ensures that two particles are not given the same state at the same time.
Definition at line 512 of file domino_model.py.
def IMP.EMageFit.domino_model.DominoModel.add_restraint | ( | self, | |
r, | |||
name, | |||
weight, | |||
max_score = False |
|||
) |
Adds a restraint to the model.
r | An IMP.Restraint object |
name | Name for the restraint |
weight | Weight for the restraint |
max_score | Maximum score allowed for the restraint. If max_score is False, there is no limit for the value of the restraint |
Definition at line 58 of file domino_model.py.
def IMP.EMageFit.domino_model.DominoModel.add_restraint_score_filter_table | ( | self | ) |
Add a RestraintScoreSubsetFilterTable to DOMINO that allows to reject assignments that have score worse than the thresholds for the restraints.
Definition at line 454 of file domino_model.py.
def IMP.EMageFit.domino_model.DominoModel.align_rigid_bodies_states | ( | self | ) |
Aligns the set of structures considered for DOMINO sampling.
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.
Definition at line 78 of file domino_model.py.
def IMP.EMageFit.domino_model.DominoModel.create_coarse_assembly | ( | self, | |
n_residues | |||
) |
Simplify the assembly with a coarse representation.
n_residues | Number of residues used for a coarse particle |
Definition at line 217 of file domino_model.py.
def IMP.EMageFit.domino_model.DominoModel.create_merge_tree | ( | self | ) |
Creates a merge tree from the restraints that are set already.
Definition at line 595 of file domino_model.py.
def IMP.EMageFit.domino_model.DominoModel.do_sampling | ( | self, | |
mode = 'assignments_heap_container' , |
|||
params = None |
|||
) |
Do Domino sampling.
mode | The 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 each merging in DOMINO, discarding the rest. In practice I used the mode "assignments_heap_container" |
params |
Definition at line 233 of file domino_model.py.
def IMP.EMageFit.domino_model.DominoModel.get_assignment_and_RFs | ( | self, | |
assignment, | |||
subset | |||
) |
Return a line with texts for an assignment and the the reference frames of the RigidBodies in the subset.
subset | Subset of components of the assembly |
assignment | Assignment class with the states for the subset |
Definition at line 298 of file domino_model.py.
def IMP.EMageFit.domino_model.DominoModel.get_assignment_info | ( | self, | |
assignment, | |||
subset | |||
) |
Info related to an assignment.
Returns a list with text for the assignment and all the scores for the restraints
subset | Subset of components of the assembly |
assignment | Assignment class with the states for the subset |
Definition at line 321 of file domino_model.py.
def IMP.EMageFit.domino_model.DominoModel.get_assignment_scores | ( | self, | |
assignment, | |||
subset | |||
) |
Returns a list with the values for the restraints on a subset of the components of the assembly.
subset | Subset of components of the assembly |
assignment | Assignment class with the states for the subset |
Definition at line 333 of file domino_model.py.
def IMP.EMageFit.domino_model.DominoModel.get_assignment_text | ( | self, | |
assignment, | |||
subset | |||
) |
Get the formatted text for an assignment.
subset | Subset of components of the assembly |
assignment | Assignment class with the states for the subset |
Definition at line 281 of file domino_model.py.
def IMP.EMageFit.domino_model.DominoModel.get_assignments_with_heap | ( | self, | |
vertex, | |||
k = 0 |
|||
) |
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.
[in] | vertex | Vertex with the root of the current merge tree. This function is recursive. |
[in] | k |
Definition at line 355 of file domino_model.py.
def IMP.EMageFit.domino_model.DominoModel.get_restraint_value_for_assignment | ( | self, | |
assignment, | |||
name | |||
) |
Recover the value of a restraint.
name | of the restraint |
assignment | Assignment class containing the assignment for the solution desired |
Definition at line 396 of file domino_model.py.
def IMP.EMageFit.domino_model.DominoModel.get_restraints_for_native | ( | self, | |
restraints_names | |||
) |
Get values of the restraints for the native structure.
restraints_names | Names of the restraints requested |
Definition at line 876 of file domino_model.py.
def IMP.EMageFit.domino_model.DominoModel.get_restraints_names_used | ( | self, | |
subset | |||
) |
Get the names of the restraints used for a subset.
subset | Subset of components of the assembly |
Definition at line 869 of file domino_model.py.
def IMP.EMageFit.domino_model.DominoModel.get_scoring_function | ( | self | ) |
Get a ScoringFunction that includes all restraints.
Definition at line 967 of file domino_model.py.
def IMP.EMageFit.domino_model.DominoModel.load_state | ( | self, | |
assignment | |||
) |
Load the positions of the components given by the assignment.
assignment | Assignment class |
Definition at line 347 of file domino_model.py.
def IMP.EMageFit.domino_model.DominoModel.read_merge_tree | ( | self, | |
fn | |||
) |
Read and create a merge tree from a file.
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()
fn | File containing the merge tree |
Definition at line 537 of file domino_model.py.
def IMP.EMageFit.domino_model.DominoModel.set_assembly | ( | self, | |
fn_pdb, | |||
names | |||
) |
Sets an assembly from a single PDB file.
The function assumes that the components of the assembly are the chains of the PDB file.
fn_pdb | PDB with the file for the assembly |
names | Names for each of the components (chains) of the assembly |
Definition at line 484 of file domino_model.py.
def IMP.EMageFit.domino_model.DominoModel.set_assembly_components | ( | self, | |
fn_pdbs, | |||
names | |||
) |
Sets the components of an assembly, each one given as a separate PDB file.
fn_pdbs | List with the names of the pdb files |
names | List with the names of the components of the assembly. |
Definition at line 469 of file domino_model.py.
def IMP.EMageFit.domino_model.DominoModel.set_close_pairs_excluded_volume_restraint | ( | self, | |
distance = 10 , |
|||
weight = 1.0 , |
|||
ratio = 0.05 , |
|||
stddev = 2 , |
|||
max_score = False |
|||
) |
Creates an excluded volume restraint between all the components of the coarse assembly.See help for.
distance | Maximum distance tolerated between particles |
weight | Weight for the restraint |
stddev | |
max_score | Maximum value for the restraint. If the parameter is None, an automatic value is computed (using the ratio). |
ratio | Fraction 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 |
stddev | Standard deviation used to approximate the HarmonicUpperBound function to a Gaussian |
Definition at line 728 of file domino_model.py.
def IMP.EMageFit.domino_model.DominoModel.set_complementarity_restraint | ( | self, | |
name1, | |||
name2, | |||
rname, | |||
max_sep_distance, | |||
max_penetration, | |||
weight, | |||
max_score = 10000000000.0 |
|||
) |
Set a restraint for geometric complementarity between 2 components.
name1 | name 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 allowed (angstrom) |
weight | |
max_score |
Definition at line 191 of file domino_model.py.
def IMP.EMageFit.domino_model.DominoModel.set_connectivity_restraint | ( | self, | |
names, | |||
rname, | |||
distance = 10 , |
|||
weight = 1.0 , |
|||
max_score = None , |
|||
n_pairs = 1 , |
|||
stddev = 2 |
|||
) |
Set a connectivity restraint between the elements of the assembly.
names | List with all the elements to be connected |
distance | Maximum distance tolerated by the restraint |
rname | Name for the restraint |
weight | Weight for the restraint |
max_score | Maximum score for the restraint |
n_pairs | Number of pairs of particles used in the KClosePairScore of the connectivity restraint |
stddev | Standard deviation used to approximate the HarmonicUpperBound function to a Gaussian |
Definition at line 653 of file domino_model.py.
def IMP.EMageFit.domino_model.DominoModel.set_em2d_restraint | ( | self, | |
name, | |||
fn_images_sel, | |||
pixel_size, | |||
resolution, | |||
n_projections, | |||
weight, | |||
max_score = False , |
|||
mode = 'fast' , |
|||
n_optimized = 1 |
|||
) |
Set a Restraint computing the em2d score.
name | Name for the restraint |
fn_images_sel | Selection 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 |
weight | Weight 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 682 of file domino_model.py.
def IMP.EMageFit.domino_model.DominoModel.set_native_assembly_for_benchmark | ( | self, | |
params | |||
) |
Sets the native model for benchmark, by reading the native structure and set the rigid bodies.
Definition at line 414 of file domino_model.py.
def IMP.EMageFit.domino_model.DominoModel.set_not_optimized | ( | self, | |
name | |||
) |
Set a part of the model as not optimized (it does not move during the model optimization)
name | of the component to optimized |
Definition at line 712 of file domino_model.py.
def IMP.EMageFit.domino_model.DominoModel.set_pair_score_restraint | ( | self, | |
name1, | |||
name2, | |||
restraint_name, | |||
distance = 10 , |
|||
weight = 1.0 , |
|||
n_pairs = 1 , |
|||
stddev = 2 , |
|||
max_score = None |
|||
) |
Set a pair_score restraint between the coarse representation of two components.
name1 | Name of the first component |
name2 | Name of the second component |
restraint_name | Name for the restraint |
distance | Maximum distance tolerated between particles |
weight | Weight of the restraint |
n_pairs | |
max_score | Maximum value tolerated for the restraint |
stddev | Standard deviation used to approximate the HarmonicUpperBound function to a Gaussian |
Definition at line 777 of file domino_model.py.
def IMP.EMageFit.domino_model.DominoModel.set_rb_states | ( | self, | |
rb, | |||
transformations | |||
) |
Add a set of reference frames as possible states for a rigid body.
rb | The rigid body |
transformations | Transformations are used to build the reference frames for the rigid body. |
Definition at line 437 of file domino_model.py.
def IMP.EMageFit.domino_model.DominoModel.set_xlink_restraint | ( | self, | |
id1, | |||
chain1, | |||
residue1, | |||
id2, | |||
chain2, | |||
residue2, | |||
distance, | |||
weight, | |||
stddev, | |||
max_score = False |
|||
) |
Set a restraint on the maximum distance between 2 residues.
id1 | Name of the first component |
chain1 | |
residue1 | Residue 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 |
id2 | Name of the second component |
chain2 | |
residue2 | Residue number for the aminoacid in the second component. |
distance | Maximum distance tolerated |
weight | Weight of the restraint |
stddev | Standard deviation used to approximate the HarmonicUpperBound function to a Gaussian |
max_score | See 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 139 of file domino_model.py.
def IMP.EMageFit.domino_model.DominoModel.setup_domino_sampler | ( | self | ) |
Creates a DOMINO sampler and adds the required filter tables.
Definition at line 521 of file domino_model.py.
def IMP.EMageFit.domino_model.DominoModel.write_merge_tree | ( | self, | |
fn | |||
) |
Writes the current merge tree to file.
The format is: parent | child_left | child_right | labels
fn | File for storing the merge tree |
Definition at line 611 of file domino_model.py.
def IMP.EMageFit.domino_model.DominoModel.write_monte_carlo_solution | ( | self, | |
fn_database | |||
) |
Write the solution of a MonteCarlo run.
fn_database | Database file with the solution. The database will contain only one record |
Definition at line 972 of file domino_model.py.
def IMP.EMageFit.domino_model.DominoModel.write_pdb_for_assignment | ( | self, | |
assignment, | |||
fn_pdb | |||
) |
Write the solution in the assignment.
assignment | Assignment class with the states for the subset |
fn_pdb | File to write the model |
Definition at line 909 of file domino_model.py.
def IMP.EMageFit.domino_model.DominoModel.write_pdb_for_component | ( | self, | |
component_index, | |||
ref, | |||
fn_pdb | |||
) |
Write one component of the assembly.
component_index | Position of the component in the assembly |
ref | Reference frame of the component |
fn_pdb | Output PDB |
Definition at line 955 of file domino_model.py.
def IMP.EMageFit.domino_model.DominoModel.write_pdb_for_configuration | ( | self, | |
n, | |||
fn_pdb | |||
) |
Write a file with a configuration for the model (configuration here means a configuration in DOMINO)
n | Index of the configuration desired. |
fn_pdb |
Definition at line 921 of file domino_model.py.
def IMP.EMageFit.domino_model.DominoModel.write_pdb_for_reference_frames | ( | self, | |
RFs, | |||
fn_pdb | |||
) |
Write a PDB file with a solution given by a set of reference frames.
RFs | Reference frames for the elements of the complex |
fn_pdb | File to write the solution |
Definition at line 934 of file domino_model.py.
def IMP.EMageFit.domino_model.DominoModel.write_pdbs_for_reference_frames | ( | self, | |
RFs, | |||
fn_base | |||
) |
Write a separate PDB for each of the elements.
RFs | Reference frames for the elements of the complex |
fn_base | base string to build the names of the PDBs files |
Definition at line 944 of file domino_model.py.
def IMP.EMageFit.domino_model.DominoModel.write_solutions_database | ( | self, | |
fn_database, | |||
max_number = None |
|||
) |
Write the results of the DOMINO sampling to a SQLite database.
fn_database | |
max_number | Maximum number of results to write |
Definition at line 829 of file domino_model.py.
def IMP.EMageFit.domino_model.DominoModel.write_subset | ( | self, | |
v, | |||
w | |||
) |
Writes lines describing a subset (vertex of a merge tree)
w | A csv.writer |
v | Vertex index |
Definition at line 628 of file domino_model.py.