9 #ifndef IMPCORE_GAUSSIAN_H
10 #define IMPCORE_GAUSSIAN_H
13 #include <IMP/core/core_config.h>
21 #include "internal/rigid_bodies.h"
22 #include <IMP/algebra/eigen3/Eigen/Dense>
24 IMPCORE_BEGIN_NAMESPACE
26 #if !defined(SWIG) && !defined(IMP_DOXYGEN)
30 IMP_Eigen::Matrix3d mat_;
32 Matrix3D(IMP_Eigen::Matrix3d mat,
33 std::string name=
"Matrix3DDensityMap%1%"):Object(name),mat_(mat){ }
34 IMP_Eigen::Matrix3d get_mat()
const {
return mat_;}
51 static ObjectKey get_local_covariance_key();
52 static ObjectKey get_global_covariance_key();
54 return m->get_has_attribute(get_local_covariance_key(), pi);
65 return local->get_mat();
71 get_local_covariance().diagonal()[1],
72 get_local_covariance().diagonal()[2]);
77 ObjectKey k = get_global_covariance_key();
79 if (!
get_model()->get_has_attribute(k, pi)) {
80 update_global_covariance();
83 return global->get_mat();
93 IMP_NEW(Matrix3D,local,(covar.asDiagonal()));
97 local->set_was_used(
true);
104 set_local_covariance(IMP_Eigen::Vector3d(v.get_data()));
109 IMP_NEW(Matrix3D,global,(covar));
110 ObjectKey k = get_global_covariance_key();
112 if (!
get_model()->get_has_attribute(k, pi)) {
117 global->set_was_used(
true);
121 void update_global_covariance();
129 IMPCORE_END_NAMESPACE
Import IMP/kernel/Decorator.h in the namespace.
ParticleIndex get_particle_index() const
Returns the particle index decorated by this decorator.
void set_global_covariance(IMP_Eigen::Matrix3d covar)
set the global-frame covariance. does NOT update local frame!
#define IMP_DECORATOR_METHODS(Name, Parent)
Model * get_model() const
Returns the Model containing the particle.
Exception definitions and assertions.
Type get_attribute(TypeKey attribute_key, ParticleIndex particle)
#define IMP_NEW(Typename, varname, args)
Declare a ref counted pointer to a new object.
A Gaussian distribution in 3D.
void set_local_covariance(const IMP_Eigen::Vector3d covar)
set the local-frame covariance.
IMP_Eigen::Matrix3d get_local_covariance() const
retrieve local covariance (as diagonal matrix)
#define IMP_DECORATOR_SETUP_0(Name)
functionality for defining rigid bodies
Import IMP/kernel/decorator_macros.h in the namespace.
void set_attribute(TypeKey attribute_key, ParticleIndex particle, Type value)
Storage of a model, its restraints, constraints and particles.
Common base class for heavy weight IMP objects.
Classes to handle individual model particles. (Note that implementation of inline functions in in int...
A shared base class to help in debugging and things.
IMP_Eigen::Matrix3d get_global_covariance()
retrieve global covariance
void add_cache_attribute(TypeKey attribute_key, ParticleIndex particle, Type value)
algebra::Gaussian3D get_gaussian() const
create Gaussian3D from these attributes
void clear_particle_caches(ParticleIndex pi)
A decorator for a rigid body.
void set_variances(const algebra::Vector3D v)
equivalent to set_local_covariance, used for backwards compatibility
#define IMP_DECORATOR_SETUP_1(Name, FirstArgumentType, first_argument_name)
algebra::Vector3D get_variances() const
retrieve local variances as Vector3D
#define IMP_DECORATORS(Name, PluralName, Parent)
Define the types for storing sets of decorators.
Class for storing model, its restraints, constraints, and particles.
IMP::algebra::ReferenceFrame3D get_reference_frame() const
Get the reference frame for the local coordinates.