home
about
news
download
doc
source
systems
tests
bugs
contact
IMP Reference Guide
2.20.1
The Integrative Modeling Platform
IMP Manual
Reference Guide
Tutorial Index
Modules
Classes
Examples
include
IMP
core
version 2.20.1
Transform.h
Go to the documentation of this file.
1
/**
2
* \file IMP/core/Transform.h \brief Transform a particle
3
*
4
* Copyright 2007-2022 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>
11
#include <
IMP/algebra/Transformation3D.h
>
12
#include <
IMP/SingletonModifier.h
>
13
#include <
IMP/singleton_macros.h
>
14
#include <cereal/access.hpp>
15
#include <cereal/types/base_class.hpp>
16
17
IMPCORE_BEGIN_NAMESPACE
18
19
//! Apply a transformation to a passed particle
20
/**
21
\see algebra::Transformation3D
22
*/
23
class
IMPCOREEXPORT
Transform
:
public
SingletonModifier
{
24
public
:
25
//! Initialize
26
/**
27
\param[in] t a 3d transformation to be applied on a particle
28
\param[in] ignore_non_xyz if false then applying the transformation
29
on a non XYZ particle will result in an exception.
30
*/
31
Transform
(
const
algebra::Transformation3D
&t,
bool
ignore_non_xyz =
false
);
32
33
Transform
() {}
34
35
virtual
void
apply_index
(
Model
*m,
ParticleIndex
p)
const
36
override
;
37
virtual
ModelObjectsTemp
do_get_inputs
(
38
Model
*m,
const
ParticleIndexes
&pis)
const override
;
39
virtual
ModelObjectsTemp
do_get_outputs
(
40
Model
*m,
const
ParticleIndexes
&pis)
const override
;
41
IMP_SINGLETON_MODIFIER_METHODS
(
Transform
);
42
IMP_OBJECT_METHODS
(
Transform
);
43
;
44
45
private
:
46
algebra::Transformation3D
t_;
47
bool
ignore_non_xyz_;
48
49
friend
class
cereal::access;
50
template
<
class
Archive>
void
serialize(Archive &ar) {
51
ar(cereal::base_class<SingletonModifier>(
this
), t_, ignore_non_xyz_);
52
}
53
IMP_OBJECT_SERIALIZE_DECL
(
Transform
);
54
55
};
56
57
IMPCORE_END_NAMESPACE
58
#endif
/* IMPCORE_TRANSFORM_H */
IMP::SingletonModifier
A base class for modifiers of ParticlesTemp.
Definition:
SingletonModifier.h:32
SingletonModifier.h
A Modifier on ParticlesTemp.
IMP::algebra::Transformation3D
Simple 3D transformation class.
Definition:
Transformation3D.h:37
IMP_OBJECT_METHODS
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition:
object_macros.h:25
IMP::Index< ParticleIndexTag >
singleton_macros.h
Macros for various classes.
IMP::ParticleOutputs::do_get_outputs
virtual ModelObjectsTemp do_get_outputs(Model *m, const ParticleIndexes &pis) const =0
Overload this method to specify the outputs.
IMP::Vector
A more IMP-like version of the std::vector.
Definition:
Vector.h:42
IMP::Model
Class for storing model, its restraints, constraints, and particles.
Definition:
Model.h:86
IMP_SINGLETON_MODIFIER_METHODS
#define IMP_SINGLETON_MODIFIER_METHODS(Name)
Definition:
singleton_macros.h:124
IMP_OBJECT_SERIALIZE_DECL
#define IMP_OBJECT_SERIALIZE_DECL(Name)
Declare methods needed for serialization of Object pointers.
Definition:
object_macros.h:95
IMP::ParticleInputs::do_get_inputs
virtual ModelObjectsTemp do_get_inputs(Model *m, const ParticleIndexes &pis) const =0
Overload this method to specify the inputs.
IMP::core::Transform
Apply a transformation to a passed particle.
Definition:
Transform.h:23
Transformation3D.h
Simple 3D transformation class.
IMP::SingletonModifier::apply_index
virtual void apply_index(Model *m, ParticleIndex v) const =0