IMP logo
IMP Reference Guide  develop.7482b7c7af, 2026/12/05
The Integrative Modeling Platform
RefinedPairsPairScore.h
Go to the documentation of this file.
1/**
2 * \file IMP/core/RefinedPairsPairScore.h
3 * \brief Generate pairs by applying a Refiner to the particles.
4 *
5 * Copyright 2007-2022 IMP Inventors. All rights reserved.
6 */
7
8#ifndef IMPCORE_REFINED_PAIRS_PAIR_SCORE_H
9#define IMPCORE_REFINED_PAIRS_PAIR_SCORE_H
10
11#include <IMP/core/core_config.h>
12#include <IMP/PairScore.h>
13#include <IMP/UnaryFunction.h>
14#include <IMP/Pointer.h>
15#include <IMP/Refiner.h>
16#include <IMP/pair_macros.h>
17
18IMPCORE_BEGIN_NAMESPACE
19
20//! Generate pairs to score by applying a Refiner.
21/** Each passed particle refined and then the PairScore applied
22 to all resulting pairs.
23 */
24class IMPCOREEXPORT RefinedPairsPairScore : public PairScore {
27
28 public:
29 /** \param[in] r The Refiner to call on each particle
30 \param[in] f The pair score to apply to the generated pairs
31 */
32 RefinedPairsPairScore(Refiner *r, PairScore *f);
34 DerivativeAccumulator *da) const override;
36 Model *m, const ParticleIndexes &pis) const override;
39 ;
40};
41
42IMPCORE_END_NAMESPACE
43
44#endif /* IMPCORE_REFINED_PAIRS_PAIR_SCORE_H */
Define PairScore.
A nullptr-initialized pointer to an IMP Object.
Refine a particle into a list of particles.
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 class to implement hierarchical methods.
Definition Refiner.h:36
ModelObjectsTemp do_get_inputs(Model *m, const ParticleIndexes &pis) const override
Overload this method to specify the inputs.
RefinedPairsPairScore(Refiner *r, PairScore *f)
double evaluate_index(Model *m, const ParticleIndexPair &p, DerivativeAccumulator *da) const override
Compute the score and the derivative if needed.
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