IMP logo
Public Types | Public Member Functions | Related Functions
IMP::atom::Selection Class Reference

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=[(133,134)])

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).

Examples: dependency graph, displaying ensembles, markers, dock with crosslinks, rigid brownian dynamics, setup, nup84 cg, nup84 rb

List of all members.

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, 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 (Hierarchies h)
 Selection (Hierarchy h, std::string molname, int residue_index)
Hierarchies get_hierarchies () const
 Return the hierarchies that the Selection was constructed with.
ParticlesTemp get_selected_particles () const
 Get the selected particles.
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 (const Ints &copies)
void set_domain (std::string name)
void set_domains (Strings 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

Related Functions

(Note that these are not member functions.)

Restraintcreate_connectivity_restraint (const Selections &s, double k)
Restraintcreate_connectivity_restraint (const Selections &s, double x0, double k)
core::XYZR create_cover (Selection s, std::string name=std::string())
Restraintcreate_distance_restraint (const Selection &n0, const Selection &n1, double x0, double k)
Restraintcreate_internal_connectivity_restraint (const Selection &s, double k)
Restraintcreate_internal_connectivity_restraint (const Selection &s, double x0, double k)
double get_mass (Selection h)
double get_radius_of_gyration (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,
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

Hierarchies IMP::atom::Selection::get_hierarchies ( ) const

Return the hierarchies that the Selection was constructed with.

ParticlesTemp IMP::atom::Selection::get_selected_particles ( ) const

Get the selected particles.


Friends And Related Function Documentation

Restraint * create_connectivity_restraint ( const Selections &  s,
double  k 
)
related

Create a restraint connecting the selections.

If one or more of the selections is a rigid body, this will be used to accelerate the computation.

Restraint * create_connectivity_restraint ( const Selections &  s,
double  x0,
double  k 
)
related

Create a restraint connecting the selections. The particles are allowed to be appart by x0 and still count as connected.

If one or more of the selections is a rigid body, this will be used to accelerate the computation.

core::XYZR create_cover ( Selection  s,
std::string  name = std::string() 
)
related

Create an XYZR particle which always includes the particles in the selection in its bounding volume. If all the particles in the selection are part of the same rigid body, then the created particle is added as part of that rigid body. Otherwise it uses an IMP::core::Cover to maintain the cover property.

Doing this can be a useful way to accelerate computations when it is OK to replace a potential complicated set of geometry represented by the selection with a much simpler one.

Restraint * create_distance_restraint ( const Selection n0,
const Selection n1,
double  x0,
double  k 
)
related

Create a distance restraint between the selections.

If one or more of the selections is a rigid body, this will be used to accelerate the computation.

Restraint * create_internal_connectivity_restraint ( const Selection s,
double  k 
)
related

Create a restraint connecting the selection.

If one or more of the selections is a rigid body, this will be used to accelerate the computation.

Restraint * create_internal_connectivity_restraint ( const Selection s,
double  x0,
double  k 
)
related

Create a restraint connecting the selection. The particles are allowed to be appart by x0 and still count as connected.

If one or more of the selections is a rigid body, this will be used to accelerate the computation.

double get_mass ( Selection  h)
related

Get the total mass of a hierarchy. In daltons.


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

Generated on Tue May 22 2012 23:33:27 for IMP by doxygen 1.8.1