8 #ifndef IMPATOM_SELECTION_H
9 #define IMPATOM_SELECTION_H
11 #include <IMP/atom/atom_config.h>
12 #include <IMP/atom/internal/SelectionPredicate.h>
16 #include <IMP/algebra/algebra_config.h>
21 #include <boost/unordered_map.hpp>
23 IMPATOM_BEGIN_NAMESPACE
85 boost::dynamic_bitset<> parent)
const;
87 void add_predicate(internal::SelectionPredicate *p);
88 void init_predicate();
101 double resolution = 0, std::string molecule = None,
102 int residue_index = None, std::string chain = None,
104 HierarchyType hierarchy_type = None, Terminus terminus = None,
107 Ints copy_indexs = [],
int state_index = -1,
108 Ints state_indexes = []);
119 #if !defined(IMP_DOXYGEN) && !defined(SWIG)
133 void set_molecules(
Strings mols);
140 void set_state_indexes(
Ints states);
145 void set_terminus(Terminus t);
147 void set_chain_ids(
Strings chains);
149 void set_chains(
Strings chains) { set_chain_ids(chains); }
152 void set_residue_indexes(
Ints indexes);
158 void set_domains(
Strings names);
160 void set_molecule(std::string mol);
162 void set_chain_id(std::string c);
165 void set_chain(std::string c) { set_chain_id(c); }
169 IMPATOM_DEPRECATED_FUNCTION_DECL(2.2)
170 void set_chain(
char c) {
set_chain(std::string(1, c)); }
173 void set_residue_index(
int i);
179 void set_domain(std::string name);
181 void set_copy_index(
unsigned int copy);
183 void set_copy_indexes(
Ints copies);
191 void set_hierarchy_types(
Ints types);
194 void set_intersection(
const Selection &s);
200 void set_symmetric_difference(
const Selection &s);
210 operator ParticleIndexes()
const {
return get_selected_particle_indexes(); }
211 operator ParticlesTemp()
const {
return get_selected_particles(); }
241 const Selections &s,
double k, std::string name =
"Connectivity%1%");
252 std::string name =
"Connectivity%1%");
261 const Selection &s,
double k, std::string name =
"Connectivity%1%");
273 std::string name =
"Connectivity%1%");
289 std::string name = std::string());
296 #ifdef IMP_ALGEBRA_USE_IMP_CGAL
326 mutable boost::unordered_map<kernel::Particle *, base::Pointer<Geometry> >
336 IMPATOM_END_NAMESPACE
double get_mass(const Selection &s)
Get the total mass of a hierarchy, in Daltons.
IMP::kernel::ParticleIndexes ParticleIndexes
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.
IMP::base::Vector< AtomType > AtomTypes
double get_volume(const Cone3D &g)
void set_resolution(double r)
Select at a Representation node with a resolution close to r.
#define IMP_SHOWABLE(Name)
double get_radius_of_gyration(const Selection &s)
kernel::Restraint * create_distance_restraint(const Selection &n0, const Selection &n1, double x0, double k, std::string name="Distance%1%")
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.
kernel::Restraint * create_excluded_volume_restraint(const Selections &s)
Create an excluded volume restraint for a list of selections.
Decorator for helping deal with a hierarchy of molecules.
#define IMP_VALUES(Name, PluralName)
Define the type for storing sets of values.
core::XYZR create_cover(const Selection &s, std::string name=std::string())
The standard decorator for manipulating molecular structures.
A decorator for Residues.
A restraint is a term in an IMP ScoringFunction.
double get_surface_area(const Cone3D &g)
kernel::Restraint * create_connectivity_restraint(const Selections &s, double x0, double k, std::string name="Connectivity%1%")
Create a restraint connecting the selections.
Class to handle individual model particles.
Key< 34897493, true > ParticleType
virtual Geometries get_components() const
Return a set of geometry composing this one.
IMP::base::Vector< ResidueType > ResidueTypes
kernel::Restraint * create_internal_connectivity_restraint(const Selection &s, double x0, double k, std::string name="Connectivity%1%")
Create a restraint connecting the selection.
Hierarchies get_leaves(const Selection &h)
Select hierarchy particles identified by the biological name.
Decorator for a sphere-like particle.
Class for storing model, its restraints, constraints, and particles.
IMP::base::Vector< Int > Ints
Standard way to pass a bunch of Int values.
A decorator for a particle with x,y,z coordinates and a radius.