8 #ifndef IMPATOM_HIERARCHY_TOOLS_H
9 #define IMPATOM_HIERARCHY_TOOLS_H
11 #include <IMP/atom/atom_config.h>
12 #include <IMP/algebra/algebra_config.h>
19 #include <boost/graph/adjacency_list.hpp>
20 #include <boost/unordered_map.hpp>
22 IMPATOM_BEGIN_NAMESPACE
44 IMPATOMEXPORT Hierarchy
46 int number_of_residues,
int first_residue_index = 0,
60 const Ints domain_boundaries);
80 IMPATOMEXPORT Hierarchy
82 bool keep_detailed =
false);
84 IMPATOMEXPORT Hierarchy
87 bool keep_detailed =
false);
102 IMPATOMEXPORT Hierarchy
111 IMPATOMEXPORT Hierarchy
120 IMPATOMEXPORT
Ints get_residue_indexes(Hierarchy h);
121 IMPATOMEXPORT ResidueType get_residue_type(Hierarchy h);
122 IMPATOMEXPORT AtomType get_atom_type(Hierarchy h);
123 IMPATOMEXPORT std::string get_domain_name(Hierarchy h);
135 const Hierarchies &hs,
double resolution = -1);
141 const ParticlesTemp &other
144 double resolution = -1
155 double resolution = -1
160 IMPATOMEXPORT
void transform(Hierarchy h,
const algebra::Transformation3D &tr);
164 vertex.show(out,
"\\n"));
182 mutable boost::unordered_map<
Particle *,
187 : SingletonGeometry(d), res_(resolution) {}
194 for (
unsigned int i = 0; i < ps.size(); ++i) {
195 if (components_.find(ps[i]) == components_.end()) {
197 components_[ps[i]] = g;
199 ret.push_back(components_.find(ps[i])->second);
212 : SingletonsGeometry(sc), res_(resolution) {}
215 IMP_FOREACH(
ParticleIndex pi, get_container()->get_contents()) {
216 Model *m = get_container()->get_model();
217 if (components_.find(pi) == components_.end()) {
221 ret.push_back(components_.find(pi)->second);
235 IMPATOM_END_NAMESPACE
A base class for geometry contained in particles.
display::Geometries get_components() const
Return a set of geometry composing this one.
Hierarchy create_simplified_from_volume(Hierarchy h, double resolution)
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
#define IMP_GRAPH(Name, directionality, VertexData, EdgeData, ShowVertex)
Define a graph object in IMP.
A base class for geometry from a set of particles.
void setup_as_approximation(Hierarchy h)
void set_resolution(double r)
Select at a Representation node with a resolution close to r.
Index< ParticleIndexTag > ParticleIndex
HierarchyTree get_hierarchy_tree(Hierarchy h)
Get a graph for the passed Hierarchy.
A particle with a user-defined type.
A smart pointer to a reference counted object.
#define IMP_NEW(Typename, varname, args)
Declare a ref counted pointer to a new object.
Restraint * create_excluded_volume_restraint(const Hierarchies &hs, double resolution=-1)
Class for storing model, its restraints, constraints, and particles.
Decorator for helping deal with a hierarchy of molecules.
ParticlesTemp get_selected_particles(bool with_representation=true) const
Get the selected particles.
Hierarchy create_protein(Model *m, std::string name, double target_radius, const Ints domain_boundaries)
void transform(Hierarchy h, const algebra::Transformation3D &tr)
Transform a hierarchy. This is aware of rigid bodies.
The standard decorator for manipulating molecular structures.
Display an IMP::SingletonContainer of IMP::atom::Hierarchy particles as balls.
A decorator for Residues.
boost::graph HierarchyTree
A graph for representing a Hierarchy so you can view it nicely.
A shared container for Singletons.
IMP::Vector< IntRange > IntRanges
Hierarchy create_simplified_along_backbone(Chain input, const IntRanges &residue_segments, bool keep_detailed=false)
Class to handle individual model particles.
IMP::Vector< Int > Ints
Standard way to pass a bunch of Int values.
A decorator for helping deal with a hierarchy.
Hierarchy create_simplified_assembly_from_volume(Hierarchy h, double resolution)
Select hierarchy particles identified by the biological name.
Decorator for a sphere-like particle.
Select a subset of a hierarchy.
display::Geometries get_components() const
Return a set of geometry composing this one.
Display an IMP::atom::Hierarchy particle as balls.
Display an IMP::core::XYZR particle as a ball.
A decorator for a particle with x,y,z coordinates and a radius.