IMP logo
IMP Reference Guide  develop.7482b7c7af, 2026/12/05
The Integrative Modeling Platform
DihedralQuadScore.h
Go to the documentation of this file.
1/**
2 * \file IMP/core/DihedralQuadScore.h
3 * \brief A Score on the dihedral angle between four particles.
4 *
5 * Copyright 2007-2026 IMP Inventors. All rights reserved.
6 */
7
8#ifndef IMPCORE_DIHEDRAL_QUAD_SCORE_H
9#define IMPCORE_DIHEDRAL_QUAD_SCORE_H
10
11#include <IMP/core/core_config.h>
12#include <IMP/generic.h>
13#include <IMP/QuadScore.h>
14#include <IMP/UnaryFunction.h>
15#include <IMP/Pointer.h>
16#include <IMP/quad_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 dihedral angle between four particles.
23/** */
24class IMPCOREEXPORT DihedralQuadScore : public QuadScore {
26
27 friend class cereal::access;
28
29 template<class Archive> void serialize(Archive &ar) {
30 ar(cereal::base_class<QuadScore>(this), f_);
31 }
33
34 public:
35 //! Score the dihedral angle (in radians) using f
38 virtual double evaluate_index(Model *m,
39 const ParticleIndexQuad &pi,
40 DerivativeAccumulator *da) const override;
42 Model *m, const ParticleIndexes &pis) const override;
45};
46
47IMPCORE_END_NAMESPACE
48
49#endif /* IMPCORE_DIHEDRAL_QUAD_SCORE_H */
A nullptr-initialized pointer to an IMP Object.
Define QuadScore.
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 double evaluate_index(Model *m, const ParticleIndexQuad &pi, DerivativeAccumulator *da) const override
Compute the score and the derivative if needed.
virtual ModelObjectsTemp do_get_inputs(Model *m, const ParticleIndexes &pis) const override
Overload this method to specify the inputs.
DihedralQuadScore(UnaryFunction *f)
Score the dihedral angle (in radians) using f.
Compile-time generic restraint and constraint support.
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
Array< 4, ParticleIndex > ParticleIndexQuad
An ordered quad of particles, each identified by its ParticleIndex.
Definition base_types.h:206
#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.
Macros for various classes.
#define IMP_QUAD_SCORE_METHODS(Name)
Definition quad_macros.h:25
A smart pointer to a ref-counted Object that is a class member.
Definition Pointer.h:144