IMP  2.1.0
The Integrative Modeling Platform
IMP::atom::Selection Class Reference

#include <IMP/atom/Selection.h>

+ Inheritance diagram for IMP::atom::Selection:

Public Types

enum  Terminus { NONE, C, N }
 

Public Member Functions

 Selection (Hierarchy hierarchy=None, Hierarchies hierarchies=[], Strings molecules=[], Ints residue_indexes=[], Strings chains=[], AtomTypes atom_types=[], ResidueTypes residue_types=[], Strings domains=[], double target_radius=0, std::string molecule=None, int residue_index=None, char chain=None, AtomType atom_type=None, ResidueType residue_type=None, HierarchyType hierarchy_type=None, Terminus terminus=None, std::string domain=None, core::ParticleType particle_type=None, core::ParticleTypes particle_types=[], int copy_index=-1, Ints copy_indexs=[])
 
 Selection (Hierarchy h)
 
 Selection (kernel::Particle *h)
 
 Selection (kernel::Model *m, const kernel::ParticleIndexes &pis)
 
 Selection (const Hierarchies &h)
 
 Selection (const kernel::ParticlesTemp &h)
 
Hierarchies get_hierarchies () const
 Return the hierarchies that the Selection was constructed with.
 
kernel::ParticleIndexes get_selected_particle_indexes () const
 Get the indexes of the selected particles.
 
kernel::ParticlesTemp get_selected_particles () const
 Get the selected particles.
 
 operator ParticleIndexes () const
 
 operator ParticlesTemp () const
 
void set_atom_type (AtomType types)
 
void set_atom_types (AtomTypes types)
 
void set_chain (char c)
 
void set_chains (std::string chains)
 
void set_copy_index (unsigned int copy)
 
void set_copy_indexes (Ints copies)
 
void set_domain (std::string name)
 
void set_domains (Strings names)
 
void set_hierarchy_types (Ints types)
 
void set_molecule (std::string mol)
 
void set_molecules (Strings mols)
 
void set_particle_type (core::ParticleType t)
 
void set_particle_types (core::ParticleTypes t)
 
void set_residue_index (int i)
 
void set_residue_indexes (Ints indexes)
 
void set_residue_type (ResidueType type)
 
void set_residue_types (ResidueTypes types)
 
void set_target_radius (double r)
 
void set_terminus (Terminus t)
 
void show (std::ostream &out=std::cout) const
 

Detailed Description

Select a part of an atom.Hiearchy or atom.Hierarchies that is identified by the biological name.

For example (in python)

Selection(hierarchy=h, molecule="myprotein", terminus=Selection.C)
Selection(hierarchy=h, molecule="myprotein", residue_index=133)
Selection(hierarchy=h, molecule="myprotein", residue_indexes=range(133,138))

each get the C-terminus of the protein "myprotein" (assuming the last residue index is 133).

Note
Only representational particles are selected. That is, ones with x,y,z coordinates. And the highest resolution representation that fits is returned. If you want lower resolution, use the target_radius parameter to select the desired radius (pass a very large number to get the coarsest representation).

Definition at line 43 of file Selection.h.

Constructor & Destructor Documentation

IMP::atom::Selection::Selection ( Hierarchy  hierarchy = None,
Hierarchies  hierarchies = [],
Strings  molecules = [],
Ints  residue_indexes = [],
Strings  chains = [],
AtomTypes  atom_types = [],
ResidueTypes  residue_types = [],
Strings  domains = [],
double  target_radius = 0,
std::string  molecule = None,
int  residue_index = None,
char  chain = None,
AtomType  atom_type = None,
ResidueType  residue_type = None,
HierarchyType  hierarchy_type = None,
Terminus  terminus = None,
std::string  domain = None,
core::ParticleType  particle_type = None,
core::ParticleTypes  particle_types = [],
int  copy_index = -1,
Ints  copy_indexs = [] 
)

When using python, you have much more control over construction due to the use of keyword arguments. You can provide any subset of the arguments (although one of hierarchy or hierarchies must be provided).

Member Function Documentation

void IMP::atom::Selection::set_atom_type ( AtomType  types)

Select atoms with only the passed type.

void IMP::atom::Selection::set_atom_types ( AtomTypes  types)

Select atoms whose types are in the list, eg AT_CA.

void IMP::atom::Selection::set_chain ( char  c)

Select a chain with the passed id

void IMP::atom::Selection::set_chains ( std::string  chains)

Select particles in chains whose id is in the passed string.

void IMP::atom::Selection::set_copy_index ( unsigned int  copy)

Select elements with Copy::get_copy_index() that match.

void IMP::atom::Selection::set_copy_indexes ( Ints  copies)

Select elements with Copy::get_copy_index() that are in the list.

void IMP::atom::Selection::set_domain ( std::string  name)

Select only the single domain with that name

void IMP::atom::Selection::set_domains ( Strings  names)

Select domains with the specificed names.

void IMP::atom::Selection::set_hierarchy_types ( Ints  types)

Select only particles whose type matches the passed type, eg Molecule, Fragment, Residue etc. See GetByType for how to specify the types. Ints are used to make swig happy.

void IMP::atom::Selection::set_molecule ( std::string  mol)

Select a molecule with the passed name.

void IMP::atom::Selection::set_molecules ( Strings  mols)

Select based on the molecule name.

void IMP::atom::Selection::set_particle_type ( core::ParticleType  t)

Select elements that match the core::ParticleType.

void IMP::atom::Selection::set_particle_types ( core::ParticleTypes  t)

Select elements that match the core::ParticleType.

void IMP::atom::Selection::set_residue_index ( int  i)

Select only residues with the passed index.

void IMP::atom::Selection::set_residue_indexes ( Ints  indexes)

Select residues whose indexes are in the passed list.

void IMP::atom::Selection::set_residue_type ( ResidueType  type)

Select only residues with the passed type.

void IMP::atom::Selection::set_residue_types ( ResidueTypes  types)

Select residues whose types are in the list. Not sure why you would do this.

void IMP::atom::Selection::set_target_radius ( double  r)

Select particles whose radii are close to r.

Definition at line 106 of file Selection.h.

void IMP::atom::Selection::set_terminus ( Terminus  t)

Select the n or c terminus.


The documentation for this class was generated from the following file: