9#ifndef IMPCORE_CENTROID_OF_REFINED_H
10#define IMPCORE_CENTROID_OF_REFINED_H
12#include <IMP/core/core_config.h>
20#include <cereal/access.hpp>
21#include <cereal/types/base_class.hpp>
24IMPCORE_BEGIN_NAMESPACE
42 friend class cereal::access;
43 template<
class Archive>
void serialize(Archive &ar) {
44 ar(cereal::base_class<SingletonModifier>(
this), refiner_, ks_, w_);
64 Refiner *get_refiner()
const {
return refiner_; }
65 FloatKey get_weight()
const {
return w_; }
66 FloatKeys get_keys()
const {
return ks_; }
68 bool get_is_weight_null()
const {
return w_ ==
FloatKey(); }
102 Centroid is computed before each evaluation);
The base class for decorators.
Accumulate the derivatives of the refined particles.
A nullptr-initialized pointer to an IMP Object.
Refine a particle into a list of particles.
A Modifier on ParticlesTemp.
Class for storing model, its restraints, constraints, and particles.
Abstract class to implement hierarchical methods.
virtual ModelObjectsTemp do_get_inputs(Model *m, const ParticleIndexes &pis) const override
Overload this method to specify the inputs.
virtual void apply_index(Model *m, ParticleIndex pi) const override
CentroidOfRefined(Refiner *r, FloatKey weight=FloatKey(), FloatKeys ks=XYZ::get_xyz_keys())
Set the keys ks to be the average of the refined particles.
virtual ModelObjectsTemp do_get_outputs(Model *m, const ParticleIndexes &pis) const override
Overload this method to specify the outputs.
A particle that is the geometric centroid of other particles.
A decorator for a particle with x,y,z coordinates.
static const FloatKeys & get_xyz_keys()
Get a vector containing the keys for x,y,z.
#define IMP_SUMMARIZE_DECORATOR_DECL(Name, Parent, Members, SetupDoc)
Create a decorator that computes some sort of summary info on a set.
Various general useful macros for IMP.
Index< ParticleIndexTag > ParticleIndex
Vector< ParticleIndex, std::allocator< ParticleIndex > > ParticleIndexes
A list of particles, each identified by its ParticleIndex.
Key< 0 > FloatKey
The type used to identify float attributes in the Particles.
IMP::Vector< FloatKey > FloatKeys
IMP::Vector< IMP::WeakPointer< ModelObject > > ModelObjectsTemp
#define IMP_OBJECT_SERIALIZE_DECL(Name)
Declare methods needed for serialization of Object pointers.
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
#define IMP_SINGLETON_MODIFIER_METHODS(Name)
A smart pointer to a ref-counted Object that is a class member.