IMP logo
IMP Reference Guide  2.14.0
The Integrative Modeling Platform
Transform.h
Go to the documentation of this file.
1 /**
2  * \file IMP/core/Transform.h \brief Transform a particle
3  *
4  * Copyright 2007-2020 IMP Inventors. All rights reserved.
5  *
6  */
7 
8 #ifndef IMPCORE_TRANSFORM_H
9 #define IMPCORE_TRANSFORM_H
10 #include <IMP/core/core_config.h>
12 #include <IMP/SingletonModifier.h>
13 #include <IMP/singleton_macros.h>
14 IMPCORE_BEGIN_NAMESPACE
15 
16 //! Apply a transformation to a passed particle
17 /**
18  \see algebra::Transformation3D
19  */
20 class IMPCOREEXPORT Transform : public SingletonModifier {
21  public:
22  //! Initialize
23  /**
24  \param[in] t a 3d transformation to be applied on a particle
25  \param[in] ignore_non_xyz if false then applying the transformation
26  on a non XYZ particle will result in an exception.
27  */
28  Transform(const algebra::Transformation3D &t, bool ignore_non_xyz = false);
29 
30  virtual void apply_index(Model *m, ParticleIndex p) const
33  Model *m, const ParticleIndexes &pis) const IMP_OVERRIDE;
35  Model *m, const ParticleIndexes &pis) const IMP_OVERRIDE;
38  ;
39 
40  private:
42  bool ignore_non_xyz_;
43 };
44 
45 IMPCORE_END_NAMESPACE
46 #endif /* IMPCORE_TRANSFORM_H */
A base class for modifiers of ParticlesTemp.
A Modifier on ParticlesTemp.
Simple 3D transformation class.
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition: object_macros.h:25
Macros for various classes.
virtual ModelObjectsTemp do_get_outputs(Model *m, const ParticleIndexes &pis) const =0
Overload this method to specify the outputs.
A more IMP-like version of the std::vector.
Definition: Vector.h:39
Class for storing model, its restraints, constraints, and particles.
Definition: Model.h:72
#define IMP_SINGLETON_MODIFIER_METHODS(Name)
virtual ModelObjectsTemp do_get_inputs(Model *m, const ParticleIndexes &pis) const =0
Overload this method to specify the inputs.
Apply a transformation to a passed particle.
Definition: Transform.h:20
Simple 3D transformation class.
virtual void apply_index(Model *m, ParticleIndex v) const =0
#define IMP_OVERRIDE
Cause a compile error if this method does not override a parent method.