8 #ifndef IMPATOM_SELECTION_H
9 #define IMPATOM_SELECTION_H
11 #include <IMP/atom/atom_config.h>
12 #include <IMP/atom/internal/SelectionPredicate.h>
18 #include <IMP/algebra/algebra_config.h>
23 #include <boost/unordered_map.hpp>
25 IMPATOM_BEGIN_NAMESPACE
90 boost::dynamic_bitset<> parent,
91 bool include_children,
92 bool found_rep_node=
false)
const;
94 void add_predicate(internal::SelectionPredicate *p);
95 void init_predicate();
108 double resolution = 0,
110 std::string molecule = None,
111 int residue_index = None, std::string chain_id = None,
113 Ints hierarchy_types = None,
Element element = None,
114 Terminus terminus = None,
117 Ints copy_indexes = [],
int state_index = -1,
118 Ints state_indexes = []);
129 #if !defined(IMP_DOXYGEN) && !defined(SWIG)
143 void set_molecules(
Strings mols);
149 { representation_type_ = t; }
153 void set_state_indexes(
Ints states);
158 void set_terminus(Terminus t);
162 void set_chain_ids(
Strings chains);
164 void set_chains(
Strings chains) { set_chain_ids(chains); }
167 void set_residue_indexes(
Ints indexes);
173 void set_domains(
Strings names);
175 void set_molecule(std::string mol);
177 void set_chain_id(std::string c);
180 void set_chain(std::string c) { set_chain_id(c); }
183 void set_residue_index(
int i);
185 void set_atom_type(AtomType types);
187 void set_residue_type(ResidueType type);
189 void set_domain(std::string name);
191 void set_copy_index(
unsigned int copy);
193 void set_copy_indexes(
Ints copies);
201 void set_hierarchy_types(
Ints types);
204 void set_intersection(
const Selection &s);
207 void set_union(
const Selection &s);
210 void set_symmetric_difference(
const Selection &s);
213 void set_difference(
const Selection &s);
217 ParticlesTemp get_selected_particles(
bool with_representation=
true)
const;
231 get_selected_particle_indexes(
bool with_representation=
true)
const;
234 operator ParticleIndexes()
const {
return get_selected_particle_indexes(); }
235 operator ParticlesTemp()
const {
return get_selected_particles(); }
265 const Selections &s,
double k, std::string name =
"Connectivity%1%");
276 std::string name =
"Connectivity%1%");
285 const Selection &s,
double k, std::string name =
"Connectivity%1%");
297 std::string name =
"Connectivity%1%");
313 std::string name = std::string());
320 #ifdef IMP_ALGEBRA_USE_IMP_CGAL
350 mutable boost::unordered_map<Particle *, Pointer<Geometry> >
360 IMPATOM_END_NAMESPACE
A decorator for Representations.
Define the elements used in IMP.
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.
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
double get_volume(const Cone3D &g)
Provenance create_clone(Provenance p)
Clone provenance (including previous provenance)
void set_resolution(double r)
Select at a Representation node with a resolution close to r.
IMP::Vector< AtomType > AtomTypes
#define IMP_SHOWABLE(Name)
Key< 34897493 > ParticleType
An IMP::Key object for identifying types of particles by strings.
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.
Take Decorator, Particle or ParticleIndex.
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
virtual Geometries get_components() const
Return a set of geometry composing this one.
Class to handle individual particles of a Model object.
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(Hierarchy h)
Element
The various elements currently supported/known.
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.