9 #ifndef IMPPMI_TRANSFORM_MOVER_H
10 #define IMPPMI_TRANSFORM_MOVER_H
12 #include <IMP/pmi/pmi_config.h>
20 #include <cereal/access.hpp>
21 #include <cereal/types/base_class.hpp>
23 IMPPMI_BEGIN_NAMESPACE
32 Float max_translation_;
46 unsigned int not_accepted_;
49 friend class cereal::access;
50 template<
class Archive>
void serialize(Archive &ar) {
51 ar(cereal::base_class<core::MonteCarloMover>(
this),
52 last_transformation_, max_translation_, max_angle_, p1i_, p2i_,
53 pixyzs_, pirbs_, pis_, t_, c_, rbts_, xyzs_, axis_, tt_, called_,
54 not_accepted_, constr_);
62 unsigned int nelements=0;
63 for (
unsigned int i=0;i<pixyzs_.size();i++) {
72 for (
unsigned int i=0;i<pirbs_.size();i++){
75 unsigned int nparticles=rb.get_number_of_members();
76 x=x+xyz[0]*float(nparticles);
77 y=y+xyz[1]*float(nparticles);
78 z=z+xyz[2]*float(nparticles);
79 nelements=nelements+nparticles;
83 center[0]=x/float(nelements);
84 center[1]=y/float(nelements);
85 center[2]=z/float(nelements);
102 if (core::RigidBody::get_is_setup(get_model(), pi)) {
103 pirbs_.push_back(pi);
106 pixyzs_.push_back(pi);
112 pirbs_.push_back(pi);
116 void set_maximum_translation(
Float mt) {
118 max_translation_ = mt;
121 void set_maximum_rotation(
Float mr) {
126 Float get_maximum_translation()
const {
return max_translation_; }
128 Float get_maximum_rotation()
const {
return max_angle_; }
A container for Singletons.
Simple Monte Carlo optimizer.
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Take Decorator, Particle or ParticleIndex.
virtual void do_reject()=0
Implement reset_proposed_move()
Return value of the MonteCarloMover::propose() function.
Class for storing model, its restraints, constraints, and particles.
A base class for classes which perturb particles.
functionality for defining rigid bodies
The base class for movers for Monte Carlo optimization.
#define IMP_OBJECT_SERIALIZE_DECL(Name)
Declare methods needed for serialization of Object pointers.
A decorator for a particle with x,y,z coordinates.
virtual MonteCarloMoverResult do_propose()=0
Implement propose_move()
const algebra::Vector3D & get_coordinates() const
Convert it to a vector.
double Float
Basic floating-point value (could be float, double...)
#define IMP_USAGE_CHECK(expr, message)
A runtime test for incorrect usage of a class or method.
A decorator for a rigid body.
virtual ModelObjectsTemp do_get_inputs() const =0