8 #ifndef IMPATOM_SELECTION_H
9 #define IMPATOM_SELECTION_H
11 #include <IMP/atom/atom_config.h>
12 #include <IMP/atom/internal/SelectionPredicate.h>
17 #include <IMP/algebra/algebra_config.h>
22 #include <boost/unordered_map.hpp>
24 IMPATOM_BEGIN_NAMESPACE
89 boost::dynamic_bitset<> parent,
90 bool include_children)
const;
92 void add_predicate(internal::SelectionPredicate *p);
93 void init_predicate();
106 double resolution = 0,
108 std::string molecule = None,
109 int residue_index = None, std::string chain_id = None,
111 Ints hierarchy_types = None, Terminus terminus = None,
114 Ints copy_indexes = [],
int state_index = -1,
115 Ints state_indexes = []);
126 #if !defined(IMP_DOXYGEN) && !defined(SWIG)
140 void set_molecules(
Strings mols);
146 { representation_type_ = t; }
150 void set_state_indexes(
Ints states);
155 void set_terminus(Terminus t);
157 void set_chain_ids(
Strings chains);
159 void set_chains(
Strings chains) { set_chain_ids(chains); }
162 void set_residue_indexes(
Ints indexes);
168 void set_domains(
Strings names);
170 void set_molecule(std::string mol);
172 void set_chain_id(std::string c);
175 void set_chain(std::string c) { set_chain_id(c); }
178 void set_residue_index(
int i);
180 void set_atom_type(AtomType types);
182 void set_residue_type(ResidueType type);
184 void set_domain(std::string name);
186 void set_copy_index(
unsigned int copy);
188 void set_copy_indexes(
Ints copies);
196 void set_hierarchy_types(
Ints types);
199 void set_intersection(
const Selection &s);
202 void set_union(
const Selection &s);
205 void set_symmetric_difference(
const Selection &s);
208 void set_difference(
const Selection &s);
212 ParticlesTemp get_selected_particles(
bool with_representation=
true)
const;
226 get_selected_particle_indexes(
bool with_representation=
true)
const;
229 operator ParticleIndexes()
const {
return get_selected_particle_indexes(); }
230 operator ParticlesTemp()
const {
return get_selected_particles(); }
260 const Selections &s,
double k, std::string name =
"Connectivity%1%");
271 std::string name =
"Connectivity%1%");
280 const Selection &s,
double k, std::string name =
"Connectivity%1%");
292 std::string name =
"Connectivity%1%");
308 std::string name = std::string());
315 #ifdef IMP_ALGEBRA_USE_IMP_CGAL
345 mutable boost::unordered_map<Particle *, Pointer<Geometry> >
355 IMPATOM_END_NAMESPACE
A decorator for Representations.
IMP::Vector< ParticleType > ParticleTypes
void set_representation_type(RepresentationType t)
Try to find this representation type.
double get_mass(const Selection &s)
Get the total mass of a hierarchy, in Daltons.
The base class for geometry.
Hierarchy create_clone(Hierarchy d)
Clone the Hierarchy.
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
double get_volume(const Cone3D &g)
void set_resolution(double r)
Select at a Representation node with a resolution close to r.
IMP::Vector< AtomType > AtomTypes
#define IMP_SHOWABLE(Name)
double get_radius_of_gyration(const Selection &s)
Implement geometry for the basic shapes from IMP.algebra.
void set_state_index(int state)
Select State with the passed index.
A particle with a user-defined type.
Class for storing model, its restraints, constraints, and particles.
Decorator for helping deal with a hierarchy of molecules.
#define IMP_VALUES(Name, PluralName)
Define the type for storing sets of values.
Restraint * create_internal_connectivity_restraint(const Selection &s, double x0, double k, std::string name="Connectivity%1%")
Create a restraint connecting the selection.
core::XYZR create_cover(const Selection &s, std::string name=std::string())
The standard decorator for manipulating molecular structures.
A decorator for Residues.
double get_surface_area(const Cone3D &g)
IMP::Vector< ResidueType > ResidueTypes
Key< 34897493, true > ParticleType
virtual Geometries get_components() const
Return a set of geometry composing this one.
Class to handle individual model particles.
Restraint * create_distance_restraint(const Selection &n0, const Selection &n1, double x0, double k, std::string name="Distance%1%")
IMP::Vector< Int > Ints
Standard way to pass a bunch of Int values.
Restraint * create_connectivity_restraint(const Selections &s, double x0, double k, std::string name="Connectivity%1%")
Create a restraint connecting the selections.
Hierarchies get_leaves(const Selection &h)
Restraint * create_excluded_volume_restraint(const Selections &s)
Create an excluded volume restraint for a list of selections.
Select hierarchy particles identified by the biological name.
Decorator for a sphere-like particle.
A restraint is a term in an IMP ScoringFunction.
A decorator for a particle with x,y,z coordinates and a radius.