IMP logo
IMP Reference Guide  develop.7482b7c7af, 2026/12/05
The Integrative Modeling Platform
SitesGeometry.h
Go to the documentation of this file.
1/**
2 * \file SitesGeometry.h
3 * \brief Geometry of sites on particle surfaces
4 *
5 * Copyright 2007-2022 IMP Inventors. All rights reserved.
6 */
7
8#ifndef IMPNPCTRANSPORT_SITES_GEOMETRY_H
9#define IMPNPCTRANSPORT_SITES_GEOMETRY_H
10
11#include "npctransport_config.h"
12#include <IMP/Pointer.h>
13#include <IMP/core/XYZR.h>
14#include <IMP/core/Typed.h>
16#include <IMP/generic.h>
19#include <IMP/atom/estimates.h>
20#include <boost/unordered_set.hpp>
21#include "internal/sites.h"
22
23#include <boost/array.hpp>
24
25IMPNPCTRANSPORT_BEGIN_NAMESPACE
26
27
28/** Show the sites. */
29class IMPNPCTRANSPORTEXPORT SitesGeometry : public core::XYZRGeometry {
30 algebra::Sphere3Ds sites_;
31
32 public:
33 SitesGeometry(Particle *p, algebra::Sphere3Ds sites)
34 : core::XYZRGeometry(p), sites_(sites) {}
35 virtual IMP::display::Geometries get_components() const override;
36 IMP_OBJECT_METHODS(SitesGeometry);
37};
38
39/** Show the sites. */
40class IMPNPCTRANSPORTEXPORT TypedSitesGeometry
42 boost::unordered_map<core::ParticleType, algebra::Sphere3Ds> sites_;
43
44 public:
45 TypedSitesGeometry(SingletonContainerAdaptor sc)
47 void set_sites(core::ParticleType t, algebra::Sphere3Ds s) {
48 // std::cout << t << " gets " << s.size() << std::endl;
49 sites_[t] = s;
50 }
51 virtual IMP::display::Geometries get_components() const override;
52 IMP_OBJECT_METHODS(TypedSitesGeometry);
53};
54
55IMPNPCTRANSPORT_END_NAMESPACE
56
57#endif /* IMPNPCTRANSPORT_SITES_GEOMETRY_H */
A nullptr-initialized pointer to an IMP Object.
Simple 3D sphere class.
A particle with a user-defined type.
Decorator for a sphere-like particle.
Class to handle individual particles of a Model object.
Definition Particle.h:45
Display an IMP::core::XYZR particle as a ball.
Definition XYZR.h:151
A base class for geometry from a set of particles.
virtual IMP::display::Geometries get_components() const override
Return a set of geometry composing this one.
virtual IMP::display::Geometries get_components() const override
Return a set of geometry composing this one.
Estimates of various physical quantities.
Compile-time generic restraint and constraint support.
IMP::Vector< Sphere3D > Sphere3Ds
Definition SphereD.h:103
Key< 34897493 > ParticleType
An IMP::Key object for identifying types of particles by strings.
Definition Typed.h:28
IMP::Vector< IMP::Pointer< Geometry > > Geometries
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Represent an XYZR particle with a sphere.
Functions to search over vectors.