9 #ifndef IMPKERNEL_DECLARE_PARTICLE_H
10 #define IMPKERNEL_DECLARE_PARTICLE_H
12 #include <IMP/kernel/kernel_config.h>
17 #include "internal/AttributeTable.h"
24 IMPKERNEL_BEGIN_NAMESPACE
53 #define IMP_PARTICLE_ATTRIBUTE_TYPE_DECL(UCName, lcname, Value) \
54 void add_attribute(UCName##Key name, Value initial_value); \
55 void remove_attribute(UCName##Key name); \
56 bool has_attribute(UCName##Key name) const; \
57 Value get_value(UCName##Key name) const; \
58 void set_value(UCName##Key name, Value value); \
59 void add_cache_attribute(UCName##Key name, Value value); \
60 UCName##Keys get_##lcname##_keys() const
62 IMP_PARTICLE_ATTRIBUTE_TYPE_DECL(
Float,
float,
Float);
63 IMP_PARTICLE_ATTRIBUTE_TYPE_DECL(
Int,
int,
Int);
64 IMP_PARTICLE_ATTRIBUTE_TYPE_DECL(
String,
string,
String);
65 IMP_PARTICLE_ATTRIBUTE_TYPE_DECL(Object,
object, Object *);
66 IMP_PARTICLE_ATTRIBUTE_TYPE_DECL(WeakObject, weak_object, Object *);
78 void add_attribute(
FloatKey name,
const Float initial_value,
bool optimized);
83 void set_is_optimized(
FloatKey k,
bool tf);
85 bool get_is_optimized(
FloatKey k)
const;
102 void show(std::ostream &out = std::cout)
const;
109 bool get_is_active()
const;
114 #if !defined(IMP_DOXYGEN)
126 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.
virtual ModelObjectsTemp do_get_outputs() const
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.