/
SitesGeometry.h
57 lines (46 loc) · 1.58 KB
/
SitesGeometry.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/**
* \file SitesGeometry.h
* \brief Geometry of sites on particle surfaces
*
* Copyright 2007-2022 IMP Inventors. All rights reserved.
*/
#ifndef IMPNPCTRANSPORT_SITES_GEOMETRY_H
#define IMPNPCTRANSPORT_SITES_GEOMETRY_H
#include "npctransport_config.h"
#include <IMP/Pointer.h>
#include <IMP/core/XYZR.h>
#include <IMP/core/Typed.h>
#include <IMP/display/particle_geometry.h>
#include <IMP/generic.h>
#include <IMP/algebra/vector_search.h>
#include <IMP/algebra/Sphere3D.h>
#include <IMP/atom/estimates.h>
#include <boost/unordered_set.hpp>
#include "internal/sites.h"
#include <boost/array.hpp>
IMPNPCTRANSPORT_BEGIN_NAMESPACE
/** Show the sites. */
class IMPNPCTRANSPORTEXPORT SitesGeometry : public core::XYZRGeometry {
algebra::Sphere3Ds sites_;
public:
SitesGeometry(Particle *p, algebra::Sphere3Ds sites)
: core::XYZRGeometry(p), sites_(sites) {}
virtual IMP::display::Geometries get_components() const override;
IMP_OBJECT_METHODS(SitesGeometry);
};
/** Show the sites. */
class IMPNPCTRANSPORTEXPORT TypedSitesGeometry
: public display::SingletonsGeometry {
boost::unordered_map<core::ParticleType, algebra::Sphere3Ds> sites_;
public:
TypedSitesGeometry(SingletonContainerAdaptor sc)
: display::SingletonsGeometry(sc) {}
void set_sites(core::ParticleType t, algebra::Sphere3Ds s) {
// std::cout << t << " gets " << s.size() << std::endl;
sites_[t] = s;
}
virtual IMP::display::Geometries get_components() const override;
IMP_OBJECT_METHODS(TypedSitesGeometry);
};
IMPNPCTRANSPORT_END_NAMESPACE
#endif /* IMPNPCTRANSPORT_SITES_GEOMETRY_H */