IMP  2.3.0
The Integrative Modeling Platform
IMP.pmi.tools Namespace Reference

Miscellaneous utilities. More...

Detailed Description

Miscellaneous utilities.

Classes

class  ColorChange
 a class to change color code to hexadecimal to rgb More...
 

Functions

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
 this function get the xyz position of the C or N terminal residue of a hierarchy, given the resolution. More...
 
def get_prot_name_from_particle
 this function returns the component name provided a particle and a list of names More...
 
def get_random_cross_link_dataset
 returns a random cross-link dataset into a string were every line is a residue pair, together with UniqueIdentifier and XL score More...
 
def get_residue_gaps_in_hierarchy
 returns the residue index gaps and contiguous segments as tuples given the hierarchy, the first residue and the last residue indexes. More...
 
def get_residue_indexes
 This "overloaded" function retrieves the residue indexes for each particle which is an instance of Fragmen,Residue or Atom. More...
 
def list_chunks_iterator
 Yield successive length-sized chunks from a list. More...
 
def parse_dssp
 read dssp file, get SSEs. More...
 
def scatter_and_gather
 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
 this iterator yields all sublists of length >= lmin and <= lmax More...
 
def translate_hierarchy
 this will apply a translation to a hierarchy along the input vector More...
 

Function Documentation

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%"'

Definition at line 425 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

Definition at line 493 of file tools.py.

def IMP.pmi.tools.get_position_terminal_residue (   hier,
  terminus = 'C',
  resolution = 1 
)

this function get the xyz position of the C or N terminal residue of a hierarchy, given the resolution.

the argument of terminus can be either N or C

Definition at line 527 of file tools.py.

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

this function returns the component name provided a particle and a list of names

Definition at line 909 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 
)

returns a random cross-link dataset into a string were every line is a residue pair, together with UniqueIdentifier and XL score

Definition at line 315 of file tools.py.

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

returns the residue index gaps and contiguous segments as tuples given the hierarchy, the first residue and the last residue indexes.

The list is organized as [[1,100,"cont"],[101,120,"gap"],[121,200,"cont"]]

Definition at line 559 of file tools.py.

def IMP.pmi.tools.get_residue_indexes (   hier)

This "overloaded" function retrieves the residue indexes for each particle which is an instance of Fragmen,Residue or Atom.

Definition at line 929 of file tools.py.

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

Yield successive length-sized chunks from a list.

Definition at line 1023 of file tools.py.

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

read dssp file, get SSEs.

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

Definition at line 1246 of file tools.py.

def IMP.pmi.tools.scatter_and_gather (   data)

Synchronize data over a parallel run.

Definition at line 970 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"

Definition at line 632 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

Definition at line 1333 of file tools.py.

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

this iterator yields all sublists of length >= lmin and <= lmax

Definition at line 1003 of file tools.py.

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

this will apply a translation to a hierarchy along the input vector

Definition at line 1046 of file tools.py.