IMP
2.0.0
The Integrative Modeling Platform
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
kernel/base_types.h
Go to the documentation of this file.
1
/**
2
* \file IMP/kernel/base_types.h \brief Basic types used by IMP.
3
*
4
* Copyright 2007-2013 IMP Inventors. All rights reserved.
5
*
6
*/
7
8
#ifndef IMPKERNEL_BASE_TYPES_H
9
#define IMPKERNEL_BASE_TYPES_H
10
11
#include <IMP/kernel/kernel_config.h>
12
#include "
Key.h
"
13
#include "
key_macros.h
"
14
#include <
IMP/base/object_macros.h
>
15
#include <
IMP/base/Vector.h
>
16
#include <
IMP/base/Pointer.h
>
17
#include <
IMP/base/WeakPointer.h
>
18
#include <
IMP/base/types.h
>
19
#include <
IMP/base/Array.h
>
20
#include <
IMP/base/Index.h
>
21
22
IMPKERNEL_BEGIN_NAMESPACE
23
24
/** @name Attribute Keys
25
Each type of attribute has an associated type of key. The keys can
26
be constructed from a string. Such construction can be expensive
27
and so the resulting keys should be cached.
28
@{
29
*/
30
31
//! The type used to identify float attributes in the Particles
32
IMP_DECLARE_KEY_TYPE
(
FloatKey
, 0);
33
//! The type used to identify int attributes in the Particles
34
IMP_DECLARE_KEY_TYPE
(
IntKey
, 1);
35
//! The type used to identify string attributes in the Particles
36
IMP_DECLARE_KEY_TYPE
(
StringKey
, 2);
37
//! The type used to identify a particle attribute in the Particles
38
IMP_DECLARE_KEY_TYPE
(
ParticleIndexKey
, 3);
39
//! The type used to identify an Object attribute
40
IMP_DECLARE_KEY_TYPE
(
ObjectKey
, 4);
41
//! The type used to identify a non-ref counted Object attribute
42
IMP_DECLARE_KEY_TYPE
(
WeakObjectKey
, 9);
43
//! The type used to identify int attributes in the Particles
44
IMP_DECLARE_KEY_TYPE
(
IntsKey
, 5);
45
//! The type used to identify a particle attribute in the Particles
46
IMP_DECLARE_KEY_TYPE
(
ParticleIndexesKey
, 6);
47
48
#ifndef IMP_DOXYGEN
49
// for backwards compat, no way to provide a warning on this
50
typedef
ParticleIndexesKey
ParticlesKey;
51
typedef
ParticleIndexKey
ParticleKey;
52
#endif
53
54
//! The type used to identify a particle attribute in the Particles
55
IMP_DECLARE_KEY_TYPE
(
ObjectsKey
, 7);
56
57
//! The type used to identify data stored directly in the model.
58
IMP_DECLARE_KEY_TYPE
(
ModelKey
, 8);
59
60
/** @} */
61
62
63
class
Restraint
;
64
IMP_OBJECTS
(
Restraint
,
Restraints
);
65
class
ModelObject
;
66
IMP_OBJECTS
(
ModelObject
,
ModelObjects
);
67
typedef
base::Vector<ModelObjectsTemp>
ModelObjectsTemps
;
68
69
class
Model
;
70
IMP_OBJECTS
(
Model
,
Models
);
71
class
RestraintSet
;
72
IMP_OBJECTS
(
RestraintSet
,
RestraintSets
);
73
class
ScoreState
;
74
IMP_OBJECTS
(
ScoreState
,
ScoreStates
);
75
class
ScoringFunction
;
76
IMP_OBJECTS
(
ScoringFunction
,
ScoringFunctions
);
77
class
Container
;
78
IMP_OBJECTS
(
Container
,
Containers
);
79
class
Particle
;
80
typedef
base::Vector<base::Pointer<Particle>
>
Particles
;
81
typedef
base::Vector<base::WeakPointer<Particle>
>
ParticlesTemp
;
82
typedef
base::Vector<ParticlesTemp >
ParticlesTemps
;
83
class
OptimizerState
;
84
IMP_OBJECTS
(
OptimizerState
,
OptimizerStates
);
85
class
SingletonContainer
;
86
IMP_OBJECTS
(
SingletonContainer
,
SingletonContainers
);
87
class
PairContainer
;
88
IMP_OBJECTS
(
PairContainer
,
PairContainers
);
89
class
TripletContainer
;
90
IMP_OBJECTS
(
TripletContainer
,
TripletContainers
);
91
class
QuadContainer
;
92
IMP_OBJECTS
(
QuadContainer
,
QuadContainers
);
93
94
class
SingletonScore
;
95
IMP_OBJECTS
(
SingletonScore
,
SingletonScores
);
96
class
PairScore
;
97
IMP_OBJECTS
(
PairScore
,
PairScores
);
98
class
TripletScore
;
99
IMP_OBJECTS
(
TripletScore
,
TripletScores
);
100
class
QuadScore
;
101
IMP_OBJECTS
(
QuadScore
,
QuadScores
);
102
103
class
SingletonPredicate
;
104
IMP_OBJECTS
(
SingletonPredicate
,
SingletonPredicates
);
105
class
PairPredicate
;
106
IMP_OBJECTS
(
PairPredicate
,
PairPredicates
);
107
class
TripletPredicate
;
108
IMP_OBJECTS
(
TripletPredicate
,
TripletPredicates
);
109
class
QuadPredicate
;
110
IMP_OBJECTS
(
QuadPredicate
,
QuadPredicates
);
111
112
class
SingletonModifier
;
113
IMP_OBJECTS
(
SingletonModifier
,
SingletonModifiers
);
114
class
PairModifier
;
115
IMP_OBJECTS
(
PairModifier
,
PairModifiers
);
116
class
TripletModifier
;
117
IMP_OBJECTS
(
TripletModifier
,
TripletModifiers
);
118
class
QuadModifier
;
119
IMP_OBJECTS
(
QuadModifier
,
QuadModifiers
);
120
121
122
123
/** An ordered pair of particles.*/
124
typedef
base::Array<2, base::WeakPointer<Particle>
,
Particle
*>
125
ParticlePair
;
126
IMP_VALUES
(
ParticlePair
,
ParticlePairsTemp
);
127
/** An ordered triplet of particles.*/
128
typedef
base::Array<3, base::WeakPointer<Particle>
,
Particle
*>
129
ParticleTriplet
;
130
IMP_VALUES
(
ParticleTriplet
,
ParticleTripletsTemp
);
131
/** An ordered quad of particles.*/
132
typedef
base::Array<4, base::WeakPointer<Particle>
,
Particle
*>
133
ParticleQuad
;
134
IMP_VALUES
(
ParticleQuad
,
ParticleQuadsTemp
);
135
136
137
class
ParticleIndexTag{};
138
/** A unique identifier for a particle within a Model. Use it to get
139
attributes and do other operations.*/
140
typedef
base::Index<ParticleIndexTag>
ParticleIndex
;
141
typedef
base::Vector<ParticleIndex>
ParticleIndexes
;
142
143
typedef
base::Array<2, ParticleIndex>
ParticleIndexPair
;
144
typedef
base::Array<3, ParticleIndex>
ParticleIndexTriplet
;
145
typedef
base::Array<4, ParticleIndex>
ParticleIndexQuad
;
146
147
IMP_VALUES
(
ParticleIndexPair
,
ParticleIndexPairs
);
148
IMP_VALUES
(
ParticleIndexTriplet
,
ParticleIndexTriplets
);
149
IMP_VALUES
(
ParticleIndexQuad
,
ParticleIndexQuads
);
150
151
IMPKERNEL_END_NAMESPACE
152
153
#endif
/* IMPKERNEL_BASE_TYPES_H */