IMP logo
IMP Reference Guide  2.5.0
The Integrative Modeling Platform
IMP.pmi.tools Namespace Reference

Miscellaneous utilities. More...

Detailed Description

Miscellaneous utilities.

Classes

class  ColorChange
 Change color code to hexadecimal to rgb. More...
 
class  HierarchyDatabase
 Store the representations for a system. 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_closest_residue_position
 this function works with plain hierarchies, as read from the pdb, no multi-scale hierarchies 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_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 list_chunks_iterator
 Yield successive length-sized chunks from a list. More...
 
def parse_dssp
 Read dssp file and get secondary structure information. 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 sse_selections_to_chimera_colors
 get chimera command to check if you've correctly made the dssp dictionary colors each helix and beta sheet 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...
 

Function Documentation

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.

Note
This function is only available in Python.

Definition at line 22 of file tools.py.

def IMP.pmi.tools.cross_link_db_filter_parser (   inputstring)

example '"{ID_Score}" > 28 AND "{Sample}" == "%10_1%" OR ":Sample}" == "%10_2%" OR ":Sample}" == "%10_3%" OR ":Sample}" == "%8_1%" OR ":Sample}" == "%8_2%"'

Note
This function is only available in Python.

Definition at line 454 of file tools.py.

def IMP.pmi.tools.get_closest_residue_position (   hier,
  resindex,
  terminus = 'N' 
)

this function works with plain hierarchies, as read from the pdb, no multi-scale hierarchies

Note
This function is only available in Python.

Definition at line 522 of file tools.py.

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.

Parameters
hierhierarchy containing the terminal residue
terminuseither 'N' or 'C'
resolutionresolution to use.
Note
This function is only available in Python.

Definition at line 553 of file tools.py.

def IMP.pmi.tools.get_prot_name_from_particle (   p,
  list_of_names 
)

Return the component name provided a particle and a list of names.

Note
This function is only available in Python.

Definition at line 939 of file tools.py.

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 
)

Return a random cross-link dataset as a string.

Every line is a residue pair, together with UniqueIdentifier and XL score.

Note
This function is only available in Python.

Definition at line 342 of file tools.py.

def IMP.pmi.tools.get_residue_gaps_in_hierarchy (   hierarchy,
  start,
  end 
)

Return the residue index gaps and contiguous segments in the hierarchy.

Parameters
hierarchyhierarchy to examine
startfirst residue index
endlast residue index
Returns
A list of lists of the form [[1,100,"cont"],[101,120,"gap"],[121,200,"cont"]]
Note
This function is only available in Python.

Definition at line 585 of file tools.py.

def IMP.pmi.tools.get_residue_indexes (   hier)

Retrieve the residue indexes for the given particle.

The particle must be an instance of Fragment,Residue or Atom

Note
This function is only available in Python.

Definition at line 959 of file tools.py.

def IMP.pmi.tools.get_restraint_set (   model)

Get a RestraintSet containing all PMI restraints added to the model.

Note
This function is only available in Python.

Definition at line 34 of file tools.py.

def IMP.pmi.tools.list_chunks_iterator (   list,
  length 
)

Yield successive length-sized chunks from a list.

Note
This function is only available in Python.

Definition at line 1074 of file tools.py.

def IMP.pmi.tools.parse_dssp (   dssp_fn,
  limit_to_chains = '' 
)

Read dssp file and get secondary structure information.

Values are all PDB residue numbering.

Returns
dict of sel tuples helix : [ [ ['A',5,7] ] , [['B',15,17]] , ...] two helices A:5-7,B:15-17 beta : [ [ ['A',1,3] , ['A',100,102] ] , ...] one sheet: A:1-3 & A:100-102 loop : same format as helix, it's the contiguous loops
Note
This function is only available in Python.

Definition at line 1298 of file tools.py.

def IMP.pmi.tools.scatter_and_gather (   data)

Synchronize data over a parallel run.

Note
This function is only available in Python.

Definition at line 1001 of file tools.py.

def IMP.pmi.tools.scatter_and_gather_dict_append (   data)

Synchronize data over a parallel run.

Note
This function is only available in Python.

Definition at line 1028 of file tools.py.

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 
)

this function uses representation=SimplifiedModel it returns the corresponding selected particles representation_type="Beads", "Res:X", "Densities", "Representation", "Molecule"

Note
This function is only available in Python.

Definition at line 662 of file tools.py.

def IMP.pmi.tools.sse_selections_to_chimera_colors (   dssp_dict,
  chimera_model_num = 0 
)

get chimera command to check if you've correctly made the dssp dictionary colors each helix and beta sheet

Note
This function is only available in Python.

Definition at line 1387 of file tools.py.

def IMP.pmi.tools.sublist_iterator (   l,
  lmin = None,
  lmax = None 
)

Yield all sublists of length >= lmin and <= lmax.

Note
This function is only available in Python.

Definition at line 1055 of file tools.py.

def IMP.pmi.tools.translate_hierarchy (   hierarchy,
  translation_vector 
)

Apply a translation to a hierarchy along the input vector.

Note
This function is only available in Python.

Definition at line 1098 of file tools.py.