7#ifndef IMPEM2D_PROJECTION_PARAMETERS_H
8#define IMPEM2D_PROJECTION_PARAMETERS_H
10#include <IMP/em2d/em2d_config.h>
18IMPEM2D_BEGIN_NAMESPACE
23class IMPEM2DEXPORT ProjectionParameters :
public Decorator {
30 ~ProjectionParameters() {};
49 for (
int i = 0; i < 6; ++i) {
62 set_translation_x(v[0]);
63 set_translation_y(v[1]);
66 algebra::Rotation3D get_rotation()
const {
67 algebra::Vector4D v(get_quaternion_1(), get_quaternion_2(),
68 get_quaternion_3(), get_quaternion_4());
71 algebra::Vector4D unit = v.get_unit_vector();
72 return algebra::Rotation3D(unit[0], unit[1], unit[2], unit[3]);
75 void set_rotation(
const algebra::Rotation3D &R) {
76 set_quaternion_1(R.get_quaternion()[0]);
77 set_quaternion_2(R.get_quaternion()[1]);
78 set_quaternion_3(R.get_quaternion()[2]);
79 set_quaternion_4(R.get_quaternion()[3]);
84 for (
int i = 0; i < 6; ++i) {
107class IMPEM2DEXPORT ProjectionParametersScoreState :
public ScoreState {
109 ProjectionParametersScoreState(
Particle *p)
110 : ScoreState(p->get_model(),
"ProjectionParametersScoreState%1%") {
The base class for decorators.
Simple 3D rotation class.
Particle * get_particle() const
Returns the particle decorated by this decorator.
Class for adding derivatives from restraints to the model.
Class for storing model, its restraints, constraints, and particles.
Class to handle individual particles of a Model object.
bool get_parameters_optimized() const
Get whether the parameters are optimized.
void set_parameters_optimized(bool tf) const
Set whether the parameters are optimized.
static const FloatKeys & get_keys()
Keys of the decorator.
void set_proper_ranges_for_keys(Model *m, const algebra::Vector3D &min_translation_values, const algebra::Vector3D &max_translation_values)
static bool get_is_setup(Model *m, ParticleIndex pi)
Return true if the particle is a set of projection parameters.
Helper macros for implementing Decorators.
#define IMP_DECORATOR_GET_SET(name, AttributeKey, Type, ReturnType)
Define methods for getting and setting a particular simple field.
#define IMP_DECORATOR_SETUP_0(Name)
#define IMP_DECORATORS(Name, PluralName, Parent)
Define the types for storing sets of decorators.
#define IMP_DECORATOR_METHODS(Name, Parent)
Index< ParticleIndexTag > ParticleIndex
Vector< Pointer< Particle > > Particles
A list of reference-counted Particle objects.
double Float
Basic floating-point value (could be float, double...).
IMP::Vector< FloatKey > FloatKeys
IMP::Vector< IMP::WeakPointer< ModelObject > > ModelObjectsTemp
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
A smart pointer to a reference counted object.