IMP logo
IMP Reference Guide  develop.7482b7c7af, 2026/12/05
The Integrative Modeling Platform
AngleTripletScore.h
Go to the documentation of this file.
1/**
2 * \file IMP/core/AngleTripletScore.h
3 * \brief A Score on the angle between three particles.
4 *
5 * Copyright 2007-2022 IMP Inventors. All rights reserved.
6 */
7
8#ifndef IMPCORE_ANGLE_TRIPLET_SCORE_H
9#define IMPCORE_ANGLE_TRIPLET_SCORE_H
10
11#include <IMP/core/core_config.h>
12#include <IMP/generic.h>
13#include <IMP/TripletScore.h>
14#include <IMP/UnaryFunction.h>
15#include <IMP/Pointer.h>
16#include <IMP/triplet_macros.h>
17#include <cereal/access.hpp>
18#include <cereal/types/base_class.hpp>
19
20IMPCORE_BEGIN_NAMESPACE
21
22//! Apply a function to the angle between three particles.
23/** */
24class IMPCOREEXPORT AngleTripletScore : public TripletScore {
26
27 friend class cereal::access;
28
29 template<class Archive> void serialize(Archive &ar) {
30 ar(cereal::base_class<TripletScore>(this), f_);
31 }
33
34 public:
35 //! Score the angle (in radians) using f
38 virtual double evaluate_index(Model *m,
39 const ParticleIndexTriplet &pi,
40 DerivativeAccumulator *da) const override;
42 Model *m, const ParticleIndexes &pis) const override;
45};
46
47IMPCORE_END_NAMESPACE
48
49#endif /* IMPCORE_ANGLE_TRIPLET_SCORE_H */
A nullptr-initialized pointer to an IMP Object.
Define TripletScore.
Single variable function.
Class for adding derivatives from restraints to the model.
Class for storing model, its restraints, constraints, and particles.
Definition Model.h:111
Abstract single variable functor class for score functions.
virtual ModelObjectsTemp do_get_inputs(Model *m, const ParticleIndexes &pis) const override
Overload this method to specify the inputs.
virtual double evaluate_index(Model *m, const ParticleIndexTriplet &pi, DerivativeAccumulator *da) const override
Compute the score and the derivative if needed.
AngleTripletScore(UnaryFunction *f)
Score the angle (in radians) using f.
Compile-time generic restraint and constraint support.
Array< 3, ParticleIndex > ParticleIndexTriplet
An ordered triplet of particles, each identified by its ParticleIndex.
Definition base_types.h:204
Vector< ParticleIndex, std::allocator< ParticleIndex > > ParticleIndexes
A list of particles, each identified by its ParticleIndex.
Definition base_types.h:199
IMP::Vector< IMP::WeakPointer< ModelObject > > ModelObjectsTemp
Definition base_types.h:122
#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.
A smart pointer to a ref-counted Object that is a class member.
Definition Pointer.h:144
Macros for various classes.
#define IMP_TRIPLET_SCORE_METHODS(Name)