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

Miscellaneous utilities. More...

Detailed Description

Miscellaneous utilities.

Classes

class  HierarchyDatabase
 Store the representations for a system. More...
 
class  Stopwatch
 Collect timing information. 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_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 get_terminal_residue
 Get the particle of the terminal residue at the GIVEN resolution (NOTE: not the closest resolution!). More...
 
def get_terminal_residue_position
 Get XYZ coordinates of the terminal residue at the GIVEN resolution. 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 select_by_tuple_2
 New tuple format: molname OR (start,stop,molname,copynum,statenum) Copy and state are optional. More...
 

Function Documentation

def IMP.pmi.tools.add_restraint_to_model (   model,
  restraint,
  add_to_rmf = False 
)

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.

If add_to_rmf is True, also add the restraint to a separate list of restraints that will be written out to RMF files (by default, most PMI restraints are not).

Note
This function is only available in Python.

Definition at line 69 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 501 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 571 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 1043 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 394 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 655 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, Atom or Molecule or else returns an empty list

Note
This function is only available in Python.

Definition at line 1063 of file tools.py.

def IMP.pmi.tools.get_restraint_set (   model,
  rmf = False 
)

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

If rmf is True, return only the subset of these restraints that should be written out to RMF files.

Note
This function is only available in Python.

Definition at line 88 of file tools.py.

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

Get the particle of the terminal residue at the GIVEN resolution (NOTE: not the closest resolution!).

To get the terminal residue at the closest resolution use: particles=IMP.pmi.tools.select_by_tuple(representation,molecule_name) particles[0] and particles[-1] will be the first and last particles corresponding to the two termini. It is needed for instance to determine the last residue of a pdb.

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

Definition at line 602 of file tools.py.

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

Get XYZ coordinates of the terminal residue at the GIVEN resolution.

Note
This function is only available in Python.

Definition at line 643 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 1115 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 726 of file tools.py.

def IMP.pmi.tools.select_by_tuple_2 (   hier,
  tuple_selection,
  resolution 
)

New tuple format: molname OR (start,stop,molname,copynum,statenum) Copy and state are optional.

Can also use 'None' for them which will get all. You can also pass -1 for stop which will go to the end. Returns the particles

Note
This function is only available in Python.

Definition at line 845 of file tools.py.