IMP logo
IMP Reference Guide  2.10.0
The Integrative Modeling Platform
IMP.EMageFit.imp_general.representation Namespace Reference

Utility functions to handle representation. More...

Detailed Description

Utility functions to handle representation.

Functions

def apply_rotation_around_centroid
 Rotates the reference frame of a rigid body around the centroid. More...
 
def apply_transformation_around_centroid
 Applies a transformation around the centroid of a rigid body. More...
 
def create_assembly
 Read all the PDBs given in the list of names fn_pdbs and adds the hierarchies to the model. More...
 
def create_assembly_from_pdb
 Builds the assembly setting the chains in the PDB file as components. More...
 
def create_rigid_bodies
 set the children of a molecule type hierarchy as rigid bodies In this case, all the children are the components of the complex. More...
 
def create_simplified_assembly
 Simplifies an assembly, by creating a hierarchy with one ball per n_res residues. More...
 
def create_simplified_dna
 Gets a hierarchy containing a molecule of DNA and simplifies it, generating a coarse representation of spheres. More...
 
def get_all_chains
 Gets all the chains in a set of hierarchies. More...
 
def get_all_members
 Gets all the members of a set of rigid bodies, removing the subrigid bodies. More...
 
def get_backbone
 Get the backbone atoms for a hierarchy. More...
 
def get_coarse_selection
 The function returns the particles (fragments) in the coarse hierarchy that were created by summarizing the residues_numbers. More...
 
def get_component
 Select a component of the assembly using the name. More...
 
def get_nucleic_acid_backbone
 Returns the atoms in the backbone of the nucleic acid contained in the hierarchy. More...
 
def get_rb_name
 Name to use for the rigid body of a hierarch. More...
 
def get_residue_coordinates
 Get the coordinates of a residue (the coordinates of the first particle) More...
 
def get_residue_particle
 Get the particle for a residue in a hierarchy. More...
 
def get_residues_distance
 Distance between two residues. More...
 
def get_rigid_body
 Select a rigid body from the rigid_bodies using the name. More...
 
def get_selection_as_atom_hierarchy
 Gets a selection of particles and decorates them as Atoms. More...
 
def get_selection_rigid_body
 Build the rigid body for all the particles in the selection S. More...
 
def read_component
 Read a PDB molecule, add atoms, and set a name. More...
 
def rename_chains
 Rename all the chains of an assembly so there are no conflicts with the ids. More...
 

Function Documentation

def IMP.EMageFit.imp_general.representation.apply_rotation_around_centroid (   rb,
  rot 
)

Rotates the reference frame of a rigid body around the centroid.

Note
This function is only available in Python.

Definition at line 300 of file EMageFit/imp_general/representation.py.

def IMP.EMageFit.imp_general.representation.apply_transformation_around_centroid (   rb,
  T 
)

Applies a transformation around the centroid of a rigid body.

First does the rotation around the centroid and then applies the transformation.

Parameters
rbA IMP.core.RigidBody object
Ta IMP.algebra.Transformation3D object
Note
This function is only available in Python.

Definition at line 313 of file EMageFit/imp_general/representation.py.

def IMP.EMageFit.imp_general.representation.create_assembly (   model,
  fn_pdbs,
  names = False 
)

Read all the PDBs given in the list of names fn_pdbs and adds the hierarchies to the model.

Note
This function is only available in Python.

Definition at line 41 of file EMageFit/imp_general/representation.py.

def IMP.EMageFit.imp_general.representation.create_assembly_from_pdb (   model,
  fn_pdb,
  names = False 
)

Builds the assembly setting the chains in the PDB file as components.

Note
This function is only available in Python.

Definition at line 24 of file EMageFit/imp_general/representation.py.

def IMP.EMageFit.imp_general.representation.create_rigid_bodies (   assembly)

set the children of a molecule type hierarchy as rigid bodies In this case, all the children are the components of the complex.

I use the function create_rigid_body(), that creates a lot of sub-rigid bodies.

I have changed the function and now build the rigid body directly from the leaves of each of the components. With this I guarantee that the number of rigid members is going to be the same if the components have the same number of atoms.

Note
This function is only available in Python.

Definition at line 71 of file EMageFit/imp_general/representation.py.

def IMP.EMageFit.imp_general.representation.create_simplified_assembly (   assembly,
  components_rbs,
  n_res 
)

Simplifies an assembly, by creating a hierarchy with one ball per n_res residues.

Each of the chains in the new hierarchy are added to the rigid bodies for each of the components. There must be correspondence between the children of the assembly (components) and the rigid bodies. I check for the ids.

Note
This function is only available in Python.

Definition at line 173 of file EMageFit/imp_general/representation.py.

def IMP.EMageFit.imp_general.representation.create_simplified_dna (   dna_hierarchy,
  n_res 
)

Gets a hierarchy containing a molecule of DNA and simplifies it, generating a coarse representation of spheres.

The function returns a hierarchy with the spheres. n_res - Number of residues to use per sphere.

Note
This function is only available in Python.

Definition at line 116 of file EMageFit/imp_general/representation.py.

def IMP.EMageFit.imp_general.representation.get_all_chains (   hierarchies)

Gets all the chains in a set of hierarchies.

Parameters
hierarchiesA set of IMP.atom.Hierarchy objects
Note
This function is only available in Python.

Definition at line 368 of file EMageFit/imp_general/representation.py.

def IMP.EMageFit.imp_general.representation.get_all_members (   rigid_bodies)

Gets all the members of a set of rigid bodies, removing the subrigid bodies.

Returns all the plain atom or bead members

Note
This function is only available in Python.

Definition at line 441 of file EMageFit/imp_general/representation.py.

def IMP.EMageFit.imp_general.representation.get_backbone (   hierarchy)

Get the backbone atoms for a hierarchy.

It can be a protein or a nucleic acid

Note
This function is only available in Python.

Definition at line 424 of file EMageFit/imp_general/representation.py.

def IMP.EMageFit.imp_general.representation.get_coarse_selection (   coarse_h,
  residues_numbers 
)

The function returns the particles (fragments) in the coarse hierarchy that were created by summarizing the residues_numbers.

Coarse hierarchy - Hierarchy formed by a bunch of fragments. Each fragment must have the residue numbers that it contains residue_numbers - list with the number of the residues that need to be recovered. The function returns the set of particles that are IMP.atom.Fragments

Note
This function is only available in Python.

Definition at line 278 of file EMageFit/imp_general/representation.py.

def IMP.EMageFit.imp_general.representation.get_component (   assembly,
  name 
)

Select a component of the assembly using the name.

Note
This function is only available in Python.

Definition at line 225 of file EMageFit/imp_general/representation.py.

def IMP.EMageFit.imp_general.representation.get_nucleic_acid_backbone (   hierarchy,
  backbone = 'minimal' 
)

Returns the atoms in the backbone of the nucleic acid contained in the hierarchy.

backbone 'minimal' returns the atoms: ["P", "O5'", "C5'", "C4'", "C3'", "O3'"] backbone 'trace' returns the atoms C4'

Note
This function is only available in Python.

Definition at line 385 of file EMageFit/imp_general/representation.py.

def IMP.EMageFit.imp_general.representation.get_rb_name (   name)

Name to use for the rigid body of a hierarch.

Note
This function is only available in Python.

Definition at line 243 of file EMageFit/imp_general/representation.py.

def IMP.EMageFit.imp_general.representation.get_residue_coordinates (   h,
  chain_id = False,
  res = 1 
)

Get the coordinates of a residue (the coordinates of the first particle)

Parameters
hHierarchy
chain_idSee help for get_residue_particle()
resSee help for get_residue_particle()
Note
This function is only available in Python.

Definition at line 340 of file EMageFit/imp_general/representation.py.

def IMP.EMageFit.imp_general.representation.get_residue_particle (   h,
  chain_id = False,
  res = 1 
)

Get the particle for a residue in a hierarchy.

Parameters
hThe hierarchy
chain_idIf chain_id == False, just search for the residue
resNumber of residue in the chain
Note
This function is only available in Python.

Definition at line 325 of file EMageFit/imp_general/representation.py.

def IMP.EMageFit.imp_general.representation.get_residues_distance (   hierarchy1,
  chain_id1,
  residue1,
  hierarchy2,
  chain_id2,
  residue2 
)

Distance between two residues.

See the help for get_residue_particle()

Parameters
hierarchy1
chain_id1
residue1
hierarchy2
chain_id2
residue2
Note
This function is only available in Python.

Definition at line 351 of file EMageFit/imp_general/representation.py.

def IMP.EMageFit.imp_general.representation.get_rigid_body (   rigid_bodies,
  name 
)

Select a rigid body from the rigid_bodies using the name.

Note
This function is only available in Python.

Definition at line 235 of file EMageFit/imp_general/representation.py.

def IMP.EMageFit.imp_general.representation.get_selection_as_atom_hierarchy (   model,
  S 
)

Gets a selection of particles and decorates them as Atoms.

Then all of them are put into a big residue. I have this to use with the multifit.create_coarse_molecule_from_molecule() function

Note
This function is only available in Python.

Definition at line 266 of file EMageFit/imp_general/representation.py.

def IMP.EMageFit.imp_general.representation.get_selection_rigid_body (   model,
  S 
)

Build the rigid body for all the particles in the selection S.

Note
This function is only available in Python.

Definition at line 248 of file EMageFit/imp_general/representation.py.

def IMP.EMageFit.imp_general.representation.read_component (   model,
  fn_pdb,
  name = False 
)

Read a PDB molecule, add atoms, and set a name.

Note
This function is only available in Python.

Definition at line 55 of file EMageFit/imp_general/representation.py.

def IMP.EMageFit.imp_general.representation.rename_chains (   assembly)

Rename all the chains of an assembly so there are no conflicts with the ids.

The names are added sequentially.

Note
This function is only available in Python.

Definition at line 97 of file EMageFit/imp_general/representation.py.