IMP logo
IMP Reference Guide  develop.7482b7c7af, 2026/12/05
The Integrative Modeling Platform
CommonEndpointPairFilter.h
Go to the documentation of this file.
1/**
2 * \file IMP/misc/CommonEndpointPairFilter.h
3 * \brief Return true for any pair of bonds sharing an endpoint
4 *
5 * Copyright 2007-2022 IMP Inventors. All rights reserved.
6 */
7
8#ifndef IMPMISC_COMMON_ENDPOINT_PAIR_FILTER_H
9#define IMPMISC_COMMON_ENDPOINT_PAIR_FILTER_H
10
11#include <IMP/misc/misc_config.h>
12
13#include <IMP/PairPredicate.h>
14#include <IMP/pair_macros.h>
15IMPMISC_BEGIN_NAMESPACE
16
17//! Return true for any pair of bonds sharing an endpoint
18class IMPMISCEXPORT CommonEndpointPairFilter : public PairPredicate {
19 public:
20 CommonEndpointPairFilter();
21
22 virtual int get_value_index(Model *m,
23 const ParticleIndexPair &p) const
24 override;
26 Model *m, const ParticleIndexes &pis) const override;
27 IMP_PAIR_PREDICATE_METHODS(CommonEndpointPairFilter);
28 IMP_OBJECT_METHODS(CommonEndpointPairFilter);
29};
30
31IMPMISC_END_NAMESPACE
32
33#endif /* IMPMISC_COMMON_ENDPOINT_PAIR_FILTER_H */
Define PairPredicate.
Class for storing model, its restraints, constraints, and particles.
Definition Model.h:111
virtual int get_value_index(Model *m, const ParticleIndexPair &p) const override
Compute the predicate and the derivative if needed.
virtual ModelObjectsTemp do_get_inputs(Model *m, const ParticleIndexes &pis) const override
Overload this method to specify the inputs.
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_PREDICATE_METHODS(Name)
Define extra the functions needed for a PairPredicate.