home
about
news
download
doc
source
systems
tests
bugs
contact
IMP Reference Guide
2.20.0
The Integrative Modeling Platform
IMP Manual
Reference Guide
Tutorial Index
Modules
Classes
Examples
include
IMP
npctransport
version 2.20.0
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
>
15
#include <
IMP/display/particle_geometry.h
>
16
#include <
IMP/generic.h
>
17
#include <
IMP/algebra/vector_search.h
>
18
#include <
IMP/algebra/Sphere3D.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
25
IMPNPCTRANSPORT_BEGIN_NAMESPACE
26
27
28
/** Show the sites. */
29
class
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. */
40
class
IMPNPCTRANSPORTEXPORT
TypedSitesGeometry
41
:
public
display::SingletonsGeometry
{
42
boost::unordered_map<core::ParticleType, algebra::Sphere3Ds> sites_;
43
44
public
:
45
TypedSitesGeometry
(
SingletonContainerAdaptor
sc)
46
:
display::SingletonsGeometry
(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
55
IMPNPCTRANSPORT_END_NAMESPACE
56
57
#endif
/* IMPNPCTRANSPORT_SITES_GEOMETRY_H */
IMP_OBJECT_METHODS
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition:
object_macros.h:25
IMP::display::SingletonsGeometry
A base class for geometry from a set of particles.
Definition:
particle_geometry.h:50
IMP::Vector< Sphere3D >
Typed.h
A particle with a user-defined type.
particle_geometry.h
Represent an XYZR particle with a sphere.
IMP::npctransport::TypedSitesGeometry
Definition:
SitesGeometry.h:40
IMP::Key< 34897493 >
IMP::SingletonContainerAdaptor
Definition:
SingletonContainer.h:172
Pointer.h
A nullptr-initialized pointer to an IMP Object.
IMP::display::Geometry::get_components
virtual Geometries get_components() const
Return a set of geometry composing this one.
Definition:
declare_Geometry.h:48
IMP::Particle
Class to handle individual particles of a Model object.
Definition:
Particle.h:43
vector_search.h
Functions to search over vectors.
IMP::npctransport::SitesGeometry
Definition:
SitesGeometry.h:29
Sphere3D.h
Simple 3D sphere class.
XYZR.h
Decorator for a sphere-like particle.
estimates.h
Estimates of various physical quantities.
IMP::core::XYZRGeometry
Display an IMP::core::XYZR particle as a ball.
Definition:
XYZR.h:151
generic.h
Compile-time generic restraint and constraint support.