IMP logo
IMP Reference Guide  develop.7482b7c7af, 2026/12/05
The Integrative Modeling Platform
TransformedDistancePairScore.h
Go to the documentation of this file.
1/**
2 * \file IMP/core/TransformedDistancePairScore.h
3 * \brief A score on the distance between a pair of particles
4 * after transforming one.
5 *
6 * Copyright 2007-2022 IMP Inventors. All rights reserved.
7 */
8
9#ifndef IMPCORE_TRANSFORMED_DISTANCE_PAIR_SCORE_H
10#define IMPCORE_TRANSFORMED_DISTANCE_PAIR_SCORE_H
11
12#include <IMP/core/core_config.h>
13#include <IMP/generic.h>
14#include <IMP/PairScore.h>
15#include <IMP/UnaryFunction.h>
16#include <IMP/Pointer.h>
17#include <IMP/pair_macros.h>
18
20
21IMPCORE_BEGIN_NAMESPACE
22
23/** \brief Apply a function to the distance between two particles
24 after transforming the second
25
26 Apply a transform to the second particle and then apply the unary
27 function to the distance between the transformed particle and the
28 second. This can be used to implement symmetry restraints.
29 */
30class IMPCOREEXPORT TransformedDistancePairScore : public PairScore {
34
35 public:
36 TransformedDistancePairScore(UnaryFunction *f,
37 const algebra::Transformation3D &transformation);
38
39 /** Set the transformation object.*/
41 virtual double evaluate_index(Model *m,
42 const ParticleIndexPair &p,
43 DerivativeAccumulator *da) const override;
45 Model *m, const ParticleIndexes &pis) const override;
46 IMP_PAIR_SCORE_METHODS(TransformedDistancePairScore);
47 IMP_OBJECT_METHODS(TransformedDistancePairScore);
48 ;
49};
50
51IMPCORE_END_NAMESPACE
52
53#endif /* IMPCORE_TRANSFORMED_DISTANCE_PAIR_SCORE_H */
Define PairScore.
A nullptr-initialized pointer to an IMP Object.
Simple 3D transformation class.
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.
3D rotation class.
Definition Rotation3D.h:52
Simple 3D transformation class.
virtual double evaluate_index(Model *m, const ParticleIndexPair &p, 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.
void set_transformation(const algebra::Transformation3D &rot)
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
Array< 2, ParticleIndex > ParticleIndexPair
An ordered pair of particles, each identified by its ParticleIndex.
Definition base_types.h:202
IMP::Vector< IMP::WeakPointer< ModelObject > > ModelObjectsTemp
Definition base_types.h:122
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Macros for various classes.
#define IMP_PAIR_SCORE_METHODS(Name)
Definition pair_macros.h:25
A smart pointer to a ref-counted Object that is a class member.
Definition Pointer.h:144