IMP  2.0.0
The Integrative Modeling Platform
kernel/Model.h
Go to the documentation of this file.
1 /**
2  * \file IMP/kernel/Model.h \brief Storage of a model, its restraints,
3  * constraints and particles.
4  *
5  * Copyright 2007-2013 IMP Inventors. All rights reserved.
6  *
7  */
8 
9 #ifndef IMPKERNEL_MODEL_H
10 #define IMPKERNEL_MODEL_H
11 
12 #include <IMP/kernel/kernel_config.h>
13 #include "declare_Model.h"
14 #include <IMP/base/log.h>
15 
16 IMPKERNEL_BEGIN_NAMESPACE
17 #ifndef IMP_DOXYGEN
18 inline bool Model::get_has_dependencies() const {
19  return !ModelObjectTracker::get_is_dirty()
20  && !dependencies_dirty_;
21 }
22 
23 
24 inline unsigned int Model::get_number_of_particles() const {
25  return get_particles().size();
26 }
27 inline Particle* Model::get_particle(ParticleIndex p) const {
28  IMP_USAGE_CHECK(particle_index_.size() > get_as_unsigned_int(p),
29  "Invalid particle requested");
30  IMP_USAGE_CHECK(particle_index_[p],
31  "Invalid particle requested");
32  return particle_index_[p];
33 }
34 #endif
35 
36 IMPKERNEL_END_NAMESPACE
37 #include "ScoringFunction.h"
38 #include "Restraint.h"
39 
40 #endif /* IMPKERNEL_MODEL_H */