IMP Reference Guide
2.6.1
The Integrative Modeling Platform
|
Miscellaneous utilities. More...
Miscellaneous utilities.
Classes | |
class | ColorChange |
Change color code to hexadecimal to rgb. More... | |
class | HierarchyDatabase |
Store the representations for a system. More... | |
class | OrderedDefaultDict |
Store objects in order they were added, but with default type. More... | |
Functions | |
def | add_restraint_to_model |
Add a PMI restraint to the model. More... | |
def | cross_link_db_filter_parser |
example '"{ID_Score}" > 28 AND "{Sample}" == "%10_1%" OR ":Sample}" == "%10_2%" OR ":Sample}" == "%10_3%" OR ":Sample}" == "%8_1%" OR ":Sample}" == "%8_2%"' More... | |
def | get_all_leaves |
Just get the leaves from a list of hierarchies. More... | |
def | get_closest_residue_position |
this function works with plain hierarchies, as read from the pdb, no multi-scale hierarchies More... | |
def | get_particles_within_zone |
Utility to retrieve particles from a hierarchy within a zone around a set of ps. More... | |
def | get_position_terminal_residue |
Get the xyz position of the terminal residue at the given resolution. More... | |
def | get_prot_name_from_particle |
Return the component name provided a particle and a list of names. More... | |
def | get_random_cross_link_dataset |
Return a random cross-link dataset as a string. More... | |
def | get_rbs_and_beads |
Returns unique objects in original order. More... | |
def | get_residue_gaps_in_hierarchy |
Return the residue index gaps and contiguous segments in the hierarchy. More... | |
def | get_residue_indexes |
Retrieve the residue indexes for the given particle. More... | |
def | get_restraint_set |
Get a RestraintSet containing all PMI restraints added to the model. More... | |
def | get_terminal_residue_position |
Get the xyz position of the terminal residue at the given resolution. More... | |
def | input_adaptor |
Adapt things for PMI (degrees of freedom, restraints, ...) Returns list of list of hierarchies, separated into Molecules if possible. More... | |
def | list_chunks_iterator |
Yield successive length-sized chunks from a list. More... | |
def | scatter_and_gather |
Synchronize data over a parallel run. More... | |
def | scatter_and_gather_dict_append |
Synchronize data over a parallel run. More... | |
def | select |
this function uses representation=SimplifiedModel it returns the corresponding selected particles representation_type="Beads", "Res:X", "Densities", "Representation", "Molecule" More... | |
def | select_at_all_resolutions |
Perform selection using the usual keywords but return ALL resolutions (BEADS and GAUSSIANS). More... | |
def | set_coordinates_from_rmf |
Extract frame from RMF file and fill coordinates. More... | |
def | shuffle_configuration |
Shuffle particles. More... | |
def | sublist_iterator |
Yield all sublists of length >= lmin and <= lmax. More... | |
def | translate_hierarchy |
Apply a translation to a hierarchy along the input vector. More... | |
def IMP.pmi.tools.add_restraint_to_model | ( | model, | |
restraint | |||
) |
Add a PMI restraint to the model.
Since Model.add_restraint() no longer exists (in modern IMP restraints should be added to a ScoringFunction instead) store them instead in a RestraintSet, and keep a reference to it in the Model.
def IMP.pmi.tools.cross_link_db_filter_parser | ( | inputstring | ) |
def IMP.pmi.tools.get_all_leaves | ( | list_of_hs | ) |
def IMP.pmi.tools.get_closest_residue_position | ( | hier, | |
resindex, | |||
terminus = 'N' |
|||
) |
def IMP.pmi.tools.get_particles_within_zone | ( | hier, | |
target_ps, | |||
sel_zone, | |||
entire_residues, | |||
exclude_backbone | |||
) |
Utility to retrieve particles from a hierarchy within a zone around a set of ps.
hier | The hierarchy in which to look for neighbors |
target_ps | The particles for zoning |
sel_zone | The maximum distance |
entire_residues | If True, will grab entire residues |
exclude_backbone | If True, will only return sidechain particles |
def IMP.pmi.tools.get_position_terminal_residue | ( | hier, | |
terminus = 'C' , |
|||
resolution = 1 |
|||
) |
Get the xyz position of the terminal residue at the given resolution.
hier | hierarchy containing the terminal residue |
terminus | either 'N' or 'C' |
resolution | resolution to use. |
def IMP.pmi.tools.get_prot_name_from_particle | ( | p, | |
list_of_names | |||
) |
def IMP.pmi.tools.get_random_cross_link_dataset | ( | representation, | |
resolution = 1.0 , |
|||
number_of_cross_links = 10 , |
|||
ambiguity_probability = 0.1 , |
|||
confidence_score_range = [0 , |
|||
avoid_same_particles = False |
|||
) |
def IMP.pmi.tools.get_rbs_and_beads | ( | hiers | ) |
def IMP.pmi.tools.get_residue_gaps_in_hierarchy | ( | hierarchy, | |
start, | |||
end | |||
) |
Return the residue index gaps and contiguous segments in the hierarchy.
hierarchy | hierarchy to examine |
start | first residue index |
end | last residue index |
def IMP.pmi.tools.get_residue_indexes | ( | hier | ) |
def IMP.pmi.tools.get_restraint_set | ( | model | ) |
Get a RestraintSet containing all PMI restraints added to the model.
def IMP.pmi.tools.get_terminal_residue_position | ( | representation, | |
hier, | |||
terminus = 'C' , |
|||
resolution = 1 |
|||
) |
def IMP.pmi.tools.input_adaptor | ( | stuff, | |
pmi_resolution = 0 , |
|||
flatten = False , |
|||
selection_tuple = None |
|||
) |
Adapt things for PMI (degrees of freedom, restraints, ...) Returns list of list of hierarchies, separated into Molecules if possible.
(iterable of ^2) hierarchy -> returns input as list of list of hierarchies, only one entry. (iterable of ^2) PMI::System/State/Molecule/TempResidue -> returns residue hierarchies, grouped in molecules, at requested resolution
stuff | Can be one of the following inputs: IMP Hierarchy, PMI System/State/Molecule/TempResidue, or a list/set (of list/set) of them. Must be uniform input, however. No mixing object types. |
pmi_resolution | For selecting, only does it if you pass PMI objects. Set it to "all" if you want all resolutions! |
flatten | Set to True if you just want all hierarchies in one list. |
ote since this relies on IMP::atom::Selection, this will not return any objects if they weren't built! But there should be no problem if you request unbuilt residues, they should be ignored.
def IMP.pmi.tools.list_chunks_iterator | ( | list, | |
length | |||
) |
def IMP.pmi.tools.scatter_and_gather | ( | data | ) |
def IMP.pmi.tools.scatter_and_gather_dict_append | ( | data | ) |
def IMP.pmi.tools.select | ( | representation, | |
resolution = None , |
|||
hierarchies = None , |
|||
selection_arguments = None , |
|||
name = None , |
|||
name_is_ambiguous = False , |
|||
first_residue = None , |
|||
last_residue = None , |
|||
residue = None , |
|||
representation_type = None |
|||
) |
def IMP.pmi.tools.select_at_all_resolutions | ( | hier = None , |
|
hiers = None , |
|||
kwargs | |||
) |
def IMP.pmi.tools.set_coordinates_from_rmf | ( | hier, | |
rmf_fn, | |||
frame_num = 0 |
|||
) |
Extract frame from RMF file and fill coordinates.
Must be identical topology.
hier | The (System) hierarchy to fill (e.g. after you've built it) |
rmf_fn | The file to extract from |
frame_num | The frame number to extract |
def IMP.pmi.tools.shuffle_configuration | ( | root_hier, | |
max_translation = 300.0 , |
|||
max_rotation = 2.0 * pi , |
|||
avoidcollision_rb = True , |
|||
avoidcollision_fb = False , |
|||
cutoff = 10.0 , |
|||
niterations = 100 , |
|||
bounding_box = None , |
|||
excluded_rigid_bodies = [] , |
|||
hierarchies_excluded_from_collision = [] , |
|||
verbose = False |
|||
) |
Shuffle particles.
Used to restart the optimization. The configuration of the system is initialized by placing each rigid body and each bead randomly in a box with a side of max_translation angstroms, and far enough from each other to prevent any steric clashes. The rigid bodies are also randomly rotated.
root_hier | The hierarchy to shuffle. Will find rigid bodies and flexible beads. |
max_translation | Max translation (rbs and flexible beads) |
max_rotation | Max rotation (rbs only) |
avoidcollision_rb | check if the particle/rigid body was placed close to another particle; uses the optional arguments cutoff and niterations |
avoidcollision_fb | Advanced. Generally you want this False because it's hard to shuffle beads. |
cutoff | Distance less than this is a collision |
niterations | How many times to try avoiding collision |
bounding_box | Only shuffle particles within this box. Defined by ((x1,y1,z1),(x2,y2,z2)). |
excluded_rigid_bodies | Don't shuffle these rigid body objects |
hierarchies_excluded_from_collision | Don't count collision with these bodies |
verbose | Give more output |
ote Best to only call this function after you've set up degrees of freedom
def IMP.pmi.tools.sublist_iterator | ( | l, | |
lmin = None , |
|||
lmax = None |
|||
) |