IMP logo
IMP Reference Guide  2.20.0
The Integrative Modeling Platform
base_types.h
Go to the documentation of this file.
1 /**
2  * \file IMP/base_types.h \brief Basic types used by IMP.
3  *
4  * Copyright 2007-2022 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_config.h>
12 #include "Key.h"
13 #include <IMP/object_macros.h>
14 #include <IMP/value_macros.h>
15 #include <IMP/Vector.h>
16 #include <IMP/Pointer.h>
17 #include <IMP/WeakPointer.h>
18 #include <IMP/types.h>
19 #include <IMP/Array.h>
20 #include <IMP/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 typedef Key<0> FloatKey;
34 
35 //! The type used to identify int attributes in the Particles
36 typedef Key<1> IntKey;
38 
39 //! The type used to identify string attributes in the Particles
40 typedef Key<2> StringKey;
42 
43 //! The type used to identify a particle attribute in the Particles
46 
47 //! The type used to identify an Object attribute
48 typedef Key<4> ObjectKey;
50 
51 //! The type used to identify a non-ref counted Object attribute
54 
55 //! The type used to identify int attributes in the Particles
56 typedef Key<5> IntsKey;
58 
59 //! The type used to identify float vector attributes in the Particles
62 
63 //! The type used to identify a particle attribute in the Particles
66 
67 #ifndef IMP_DOXYGEN
68 // for backwards compat, no way to provide a warning on this
69 typedef ParticleIndexesKey ParticlesKey;
70 typedef ParticleIndexKey ParticleKey;
71 #endif
72 
73 //! The type used to identify a particle attribute in the Particles
76 
77 //! The type used to identify data stored directly in the model.
78 typedef Key<8> ModelKey;
80 
81 //! The type used to identify changed model properties
84 
85 //! The type used to identify sparse string attributes in the Particles
88 
89 //! The type used to identify sparse int attributes in the Particles
92 
93 //! The type used to identify sparse float attributes in the Particles
96 
97 //! The type used to identify sparse particle attributes in the Particles
100 
101 /** @} */
102 
103 class Restraint;
108 
109 class Model;
117 class Container;
119 class Particle;
133 
136 class PairScore;
140 class QuadScore;
142 
151 
160 
161 /** An ordered pair of particles.*/
164 /** An ordered triplet of particles.*/
167 /** An ordered quad of particles.*/
170 
171 class ParticleIndexTag {};
172 /** A unique identifier for a particle within a Model. Use it to identify
173  particles when getting and setting attributes and constructing decorators.
174 
175  See for example, \ref model_attributes "Model attributes", Decorator, and
176  Model::get_particle().
177 */
180 
184 
188 
189 IMPKERNEL_END_NAMESPACE
190 
191 #endif /* IMPKERNEL_BASE_TYPES_H */
A base class for modifiers of ParticlesTemp.
Abstract class for scoring object(s) of type ParticleIndexPair.
Definition: PairScore.h:44
A shared container for Pairs.
Definition: PairContainer.h:39
Helper macros for implementing IMP Objects.
Basic types used by IMP.
Key< 11 > TriggerKey
The type used to identify changed model properties.
Definition: base_types.h:82
Abstract predicate function.
Definition: QuadPredicate.h:31
Key< 0 > FloatKey
The type used to identify float attributes in the Particles.
Definition: base_types.h:32
Utility types to refer to various types of indices.
Key< 13 > SparseIntKey
The type used to identify sparse int attributes in the Particles.
Definition: base_types.h:90
Key< 15 > SparseParticleIndexKey
The type used to identify sparse particle attributes in the Particles.
Definition: base_types.h:98
A class to store a fixed array of same-typed values.
Definition: Array.h:35
Array< 4, WeakPointer< Particle >, Particle * > ParticleQuad
Definition: base_types.h:168
Index< ParticleIndexTag > ParticleIndex
Definition: base_types.h:178
Keys to cache lookup of attribute strings.
Key< 6 > ParticleIndexesKey
The type used to identify a particle attribute in the Particles.
Definition: base_types.h:64
Array< 3, WeakPointer< Particle >, Particle * > ParticleTriplet
Definition: base_types.h:165
Classes to handle static sized arrays of things.
A base class for modifiers of ParticlePairsTemp.
Definition: PairModifier.h:32
Object used to hold a set of restraints.
Definition: RestraintSet.h:41
Class for storing model, its restraints, constraints, and particles.
Definition: Model.h:86
Key< 2 > StringKey
The type used to identify string attributes in the Particles.
Definition: base_types.h:40
Key< 10 > FloatsKey
The type used to identify float vector attributes in the Particles.
Definition: base_types.h:60
Abstract class for scoring object(s) of type ParticleIndexQuad.
Definition: QuadScore.h:44
#define IMP_VALUES(Name, PluralName)
Define the type for storing sets of values.
Definition: value_macros.h:23
Base class for objects in a Model that depend on other objects.
Definition: ModelObject.h:28
Abstract predicate function.
Key< 3 > ParticleIndexKey
The type used to identify a particle attribute in the Particles.
Definition: base_types.h:44
Abstract class for scoring object(s) of type ParticleIndex.
ScoreStates maintain invariants in the Model.
Definition: ScoreState.h:56
Key< 1 > IntKey
The type used to identify int attributes in the Particles.
Definition: base_types.h:36
A shared container for Quads.
Definition: QuadContainer.h:39
A weak pointer to an Object or RefCountedObject.
A shared container for Singletons.
A class for storing lists of IMP items.
Key< 9 > WeakObjectKey
The type used to identify a non-ref counted Object attribute.
Definition: base_types.h:52
Key< 4 > ObjectKey
The type used to identify an Object attribute.
Definition: base_types.h:48
Key< 7 > ObjectsKey
The type used to identify a particle attribute in the Particles.
Definition: base_types.h:74
#define IMP_OBJECTS(Name, PluralName)
Define the types for storing lists of object pointers.
Definition: object_macros.h:44
A nullptr-initialized pointer to an IMP Object.
Abstract predicate function.
Definition: PairPredicate.h:31
Represents a scoring function on the model.
Array< 2, WeakPointer< Particle >, Particle * > ParticlePair
Definition: base_types.h:159
Key< 5 > IntsKey
The type used to identify int attributes in the Particles.
Definition: base_types.h:56
Shared optimizer state that is invoked upon commitment of new coordinates.
Abstract predicate function.
Class to handle individual particles of a Model object.
Definition: Particle.h:43
A base class for modifiers of ParticleTripletsTemp.
Macros to help in implementing Value objects.
Key< 8 > ModelKey
The type used to identify data stored directly in the model.
Definition: base_types.h:78
A base class for modifiers of ParticleQuadsTemp.
Definition: QuadModifier.h:32
Key< 14 > SparseFloatKey
The type used to identify sparse float attributes in the Particles.
Definition: base_types.h:94
A shared container for Triplets.
Abstract class for scoring object(s) of type ParticleIndexTriplet.
Definition: TripletScore.h:44
Abstract class for containers of particles.
A restraint is a term in an IMP ScoringFunction.
Definition: Restraint.h:56
Key< 12 > SparseStringKey
The type used to identify sparse string attributes in the Particles.
Definition: base_types.h:86