9 #ifndef IMPKERNEL_PARTICLE_H
10 #define IMPKERNEL_PARTICLE_H
12 #include <IMP/kernel/kernel_config.h>
17 #include "internal/AttributeTable.h"
24 IMPKERNEL_BEGIN_NAMESPACE
52 #define IMP_KERNEL_PARTICLE_ATTRIBUTE_TYPE_DECL(UCName, lcname, Value) \
53 void add_attribute(UCName##Key name, Value initial_value); \
54 void remove_attribute(UCName##Key name); \
55 bool has_attribute(UCName##Key name) const; \
56 Value get_value(UCName##Key name) const; \
57 void set_value(UCName##Key name, Value value); \
58 void add_cache_attribute(UCName##Key name, Value value); \
59 UCName##Keys get_##lcname##_keys() const
61 IMP_KERNEL_PARTICLE_ATTRIBUTE_TYPE_DECL(
Float,
float,
Float);
62 IMP_KERNEL_PARTICLE_ATTRIBUTE_TYPE_DECL(
Int,
int,
Int);
63 IMP_KERNEL_PARTICLE_ATTRIBUTE_TYPE_DECL(
String,
string,
String);
64 IMP_KERNEL_PARTICLE_ATTRIBUTE_TYPE_DECL(Object,
object, Object *);
65 IMP_KERNEL_PARTICLE_ATTRIBUTE_TYPE_DECL(WeakObject, weak_object, Object *);
77 void add_attribute(
FloatKey name,
const Float initial_value,
bool optimized);
82 void set_is_optimized(
FloatKey k,
bool tf);
84 bool get_is_optimized(
FloatKey k)
const;
101 void show(std::ostream &out = std::cout)
const;
108 bool get_is_active()
const;
113 #if !defined(IMP_DOXYGEN)
139 : m_(p->get_model()), pi_(p->get_index()) {}
141 : m_(p->get_model()), pi_(p->get_index()) {}
143 : m_(p->get_model()), pi_(p->get_index()) {}
145 Model *get_model()
const {
return m_; }
149 IMPKERNEL_END_NAMESPACE
Various general useful functions for IMP.
Class for adding derivatives from restraints to the model.
Class for adding derivatives from restraints to the model.
Ints get_index(const kernel::ParticlesTemp &particles, const Subset &subset, const Subsets &excluded)
IMP::base::Vector< IMP::base::WeakPointer< kernel::ModelObject > > ModelObjectsTemp
A nullptr-initialized pointer to an IMP Object.
A smart pointer to a ref-counted Object that is a class memeber.
virtual ModelObjectsTemp do_get_outputs() const
A smart pointer to a reference counted object.
virtual void clear_caches()
virtual ModelObjectsTemp do_get_inputs() const
Single variable function.
Various general useful functions for IMP.
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Class to handle individual model particles.
void show(Hierarchy h, std::ostream &out=std::cout)
Print out a molecular hierarchy.
IMP::kernel::Particle Particle
double Float
Basic floating-point value (could be float, double...)
int Int
Basic integer value.
A shared base class to help in debugging and things.
Keys to cache lookup of attribute strings.
std::string String
Basic string value.
Class for storing model, its restraints, constraints, and particles.