IMP
2.2.0
The Integrative Modeling Platform
|
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... | |
Definition at line 34 of file DominoModel.py.
def IMP.em2d.DominoModel.DominoModel.add_restraint | ( | self, | |
r, | |||
name, | |||
weight, | |||
max_score = False |
|||
) |
r | An IMP.kernel.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 55 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.
Definition at line 76 of file DominoModel.py.
def IMP.em2d.DominoModel.DominoModel.create_coarse_assembly | ( | self, | |
n_residues, | |||
write = False |
|||
) |
n_residues | Number of residues used for a coarse particle |
write | If True, write the coarse assembly to a format that Chimera can display |
Definition at line 215 of file DominoModel.py.
def IMP.em2d.DominoModel.DominoModel.do_sampling | ( | self, | |
mode = 'assignments_heap_container' , |
|||
params = None |
|||
) |
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 ecah merging in DOMINO, discarding the rest. In practice I used the mode "assignments_heap_container" |
params |
Definition at line 231 of file DominoModel.py.
def IMP.em2d.DominoModel.DominoModel.get_assignment_and_RFs | ( | self, | |
assignment, | |||
subset | |||
) |
subset | Subset of components of the assembly |
assignment | Assignment class with the states for the subset |
Definition at line 300 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
subset | Subset of components of the assembly |
assignment | Assignment class with the states for the subset |
Definition at line 323 of file DominoModel.py.
def IMP.em2d.DominoModel.DominoModel.get_assignment_scores | ( | self, | |
assignment, | |||
subset | |||
) |
subset | Subset of components of the assembly |
assignment | Assignment class with the states for the subset |
Definition at line 335 of file DominoModel.py.
def IMP.em2d.DominoModel.DominoModel.get_assignment_text | ( | self, | |
assignment, | |||
subset | |||
) |
subset | Subset of components of the assembly |
assignment | Assignment class with the states for the subset |
Definition at line 283 of file DominoModel.py.
def IMP.em2d.DominoModel.DominoModel.get_assignments_with_heap | ( | self, | |
vertex, | |||
k = 0 |
|||
) |
[in] | vertex | Vertex with the root of the current merge tree. This function is recursive. |
[in] | k |
Definition at line 357 of file DominoModel.py.
def IMP.em2d.DominoModel.DominoModel.get_restraint_value_for_assignment | ( | self, | |
assignment, | |||
name | |||
) |
name | of the restraint |
assignment | Assignment class containing the assignment for the solution desired |
Definition at line 398 of file DominoModel.py.
def IMP.em2d.DominoModel.DominoModel.get_restraints_for_native | ( | self, | |
restraints_names | |||
) |
restraints_names | Names of the restraints requested |
Definition at line 877 of file DominoModel.py.
def IMP.em2d.DominoModel.DominoModel.get_restraints_names_used | ( | self, | |
subset | |||
) |
subset | Subset of components of the assembly |
Definition at line 870 of file DominoModel.py.
def IMP.em2d.DominoModel.DominoModel.load_state | ( | self, | |
assignment | |||
) |
assignment | Assignment class |
Definition at line 349 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()
fn | File containing the merge tree |
Definition at line 538 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.
fn_pdb | PDB with the file for the asembly |
names | Names for each of the components (chains) of the asembly |
Definition at line 486 of file DominoModel.py.
def IMP.em2d.DominoModel.DominoModel.set_assembly_components | ( | self, | |
fn_pdbs, | |||
names | |||
) |
fn_pdbs | List with the names of the pdb files |
names | List with the names of the components of the assembly. |
Definition at line 471 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 |
|||
) |
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 729 of file DominoModel.py.
def IMP.em2d.DominoModel.DominoModel.set_complementarity_restraint | ( | self, | |
name1, | |||
name2, | |||
rname, | |||
max_sep_distance, | |||
max_penetration, | |||
weight, | |||
max_score = 10000000000.0 |
|||
) |
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 allowd (angstrom) |
weight | |
max_score |
Definition at line 189 of file DominoModel.py.
def IMP.em2d.DominoModel.DominoModel.set_connectivity_restraint | ( | self, | |
names, | |||
rname, | |||
distance = 10 , |
|||
weight = 1.0 , |
|||
max_score = None , |
|||
n_pairs = 1 , |
|||
stddev = 2 |
|||
) |
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 connecitivity restraint |
stddev | Standard deviation used to approximate the HarmonicUpperBound function to a Gaussian |
Definition at line 654 of file DominoModel.py.
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 |
|||
) |
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 683 of file DominoModel.py.
def IMP.em2d.DominoModel.DominoModel.set_native_assembly_for_benchmark | ( | self, | |
params | |||
) |
Definition at line 416 of file DominoModel.py.
def IMP.em2d.DominoModel.DominoModel.set_not_optimized | ( | self, | |
name | |||
) |
name | of the component to optimized |
Definition at line 713 of file DominoModel.py.
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 |
|||
) |
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 778 of file DominoModel.py.
def IMP.em2d.DominoModel.DominoModel.set_rb_states | ( | self, | |
rb, | |||
transformations | |||
) |
rb | The rigid body |
transformations | Transformations are used to build the reference frames for the rigid body. |
Definition at line 439 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 |
|||
) |
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 137 of file DominoModel.py.
def IMP.em2d.DominoModel.DominoModel.write_merge_tree | ( | self, | |
fn | |||
) |
The format is: parent | child_left | child_right | labels
fn | File for storing the merge tree |
Definition at line 612 of file DominoModel.py.
def IMP.em2d.DominoModel.DominoModel.write_monte_carlo_solution | ( | self, | |
fn_database | |||
) |
fn_database | Database file with the solution. The database will contain only one record |
Definition at line 970 of file DominoModel.py.
def IMP.em2d.DominoModel.DominoModel.write_pdb_for_assignment | ( | self, | |
assignment, | |||
fn_pdb | |||
) |
assignment | Assignment class with the states for the subset |
fn_pdb | File to write the model |
Definition at line 912 of file DominoModel.py.
def IMP.em2d.DominoModel.DominoModel.write_pdb_for_component | ( | self, | |
component_index, | |||
ref, | |||
fn_pdb | |||
) |
component_index | Position of the component in the assembly |
ref | Reference frame of the component |
fn_pdb | Output PDB |
Definition at line 958 of file DominoModel.py.
def IMP.em2d.DominoModel.DominoModel.write_pdb_for_configuration | ( | self, | |
n, | |||
fn_pdb | |||
) |
n | Index of the configuration desired. |
fn_pdb |
Definition at line 924 of file DominoModel.py.
def IMP.em2d.DominoModel.DominoModel.write_pdb_for_reference_frames | ( | self, | |
RFs, | |||
fn_pdb | |||
) |
RFs | Reference frames for the elements of the complex |
fn_pdb | File to write the solution |
Definition at line 937 of file DominoModel.py.
def IMP.em2d.DominoModel.DominoModel.write_pdbs_for_reference_frames | ( | self, | |
RFs, | |||
fn_base | |||
) |
RFs | Reference frames for the elements of the complex |
fn_base | base string to buid the names of the PDBs files |
Definition at line 947 of file DominoModel.py.
def IMP.em2d.DominoModel.DominoModel.write_solutions_database | ( | self, | |
fn_database, | |||
max_number = None |
|||
) |
fn_database | |
max_number | Maximum number of results to write |
Definition at line 830 of file DominoModel.py.
def IMP.em2d.DominoModel.DominoModel.write_subset | ( | self, | |
v, | |||
w | |||
) |
w | A csv.writer |
v | Vertex index |
Definition at line 629 of file DominoModel.py.