IMP logo
IMP Reference Guide  develop.63b38c487d,2024/12/21
The Integrative Modeling Platform
MinimumRestraint.h
Go to the documentation of this file.
1 /**
2  * \file IMP/core/MinimumRestraint.h
3  * \brief Score based on the k minimum restraints.
4  *
5  * Copyright 2007-2022 IMP Inventors. All rights reserved.
6  *
7  */
8 
9 #ifndef IMPCORE_MINIMUM_RESTRAINT_H
10 #define IMPCORE_MINIMUM_RESTRAINT_H
11 
12 #include <IMP/core/core_config.h>
13 #include <IMP/Restraint.h>
14 #include <IMP/Model.h>
15 #include <IMP/macros.h>
16 #include <IMP/generic.h>
17 
18 IMPCORE_BEGIN_NAMESPACE
19 
20 //! Score based on the minimum scoring members of a set of restraints
21 /**
22  */
23 class IMPCOREEXPORT MinimumRestraint : public Restraint {
24  unsigned int k_;
25 
26  public:
27  /** Score based on the num minimum restraints from rs.
28  */
29  MinimumRestraint(unsigned int num,
30  const Restraints &rs = Restraints(),
31  std::string name = "MinimumRestraint %1%");
32 
33  void clear_caches() override;
34 
35  public:
37  override;
38  IMP::ModelObjectsTemp do_get_inputs() const override;
40  ;
41 
42  IMP_LIST_ACTION(public, Restraint, Restraints, restraint, restraints,
43  Restraint *, Restraints, , {}, {});
44 };
45 
46 IMPCORE_END_NAMESPACE
47 
48 #endif /* IMPCORE_MINIMUM_RESTRAINT_H */
Score based on the minimum scoring members of a set of restraints.
IMP::Vector< IMP::Pointer< Restraint > > Restraints
Definition: base_types.h:103
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition: object_macros.h:25
Storage of a model, its restraints, constraints and particles.
virtual double unprotected_evaluate(DerivativeAccumulator *da) const
Return the unweighted score for the restraint.
virtual void clear_caches()
Definition: Object.h:270
Various general useful macros for IMP.
Abstract base class for all restraints.
virtual ModelObjectsTemp do_get_inputs() const =0
Class for adding derivatives from restraints to the model.
A restraint is a term in an IMP ScoringFunction.
Definition: Restraint.h:56
Compile-time generic restraint and constraint support.