IMP Reference Guide
develop.63b38c487d,2024/12/22
The Integrative Modeling Platform
|
Utility functions to handle representation. More...
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... | |
def IMP.EMageFit.imp_general.representation.apply_rotation_around_centroid | ( | rb, | |
rot | |||
) |
Rotates the reference frame of a rigid body around the centroid.
Definition at line 297 of file 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.
rb | A IMP.core.RigidBody object |
T | a IMP.algebra.Transformation3D object |
Definition at line 310 of file 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.
Definition at line 41 of file 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.
Definition at line 24 of file 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.
Definition at line 71 of file 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.
Definition at line 172 of file 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.
Definition at line 116 of file representation.py.
def IMP.EMageFit.imp_general.representation.get_all_chains | ( | hierarchies | ) |
Gets all the chains in a set of hierarchies.
hierarchies | A set of IMP.atom.Hierarchy objects |
Definition at line 366 of file 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
Definition at line 440 of file 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
Definition at line 423 of file 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
Definition at line 275 of file representation.py.
def IMP.EMageFit.imp_general.representation.get_component | ( | assembly, | |
name | |||
) |
Select a component of the assembly using the name.
Definition at line 222 of file 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'
Definition at line 383 of file representation.py.
def IMP.EMageFit.imp_general.representation.get_rb_name | ( | name | ) |
Name to use for the rigid body of a hierarch.
Definition at line 240 of file 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)
h | Hierarchy |
chain_id | See help for get_residue_particle() |
res | See help for get_residue_particle() |
Definition at line 337 of file 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.
h | The hierarchy |
chain_id | If chain_id == False, just search for the residue |
res | Number of residue in the chain |
Definition at line 322 of file 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()
hierarchy1 | |
chain_id1 | |
residue1 | |
hierarchy2 | |
chain_id2 | |
residue2 |
Definition at line 349 of file 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.
Definition at line 232 of file 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
Definition at line 263 of file 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.
Definition at line 245 of file 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.
Definition at line 55 of file 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.
Definition at line 97 of file representation.py.