IMP logo
IMP Reference Guide  2.14.0
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-2020 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();
34 
35  public:
36  double unprotected_evaluate(IMP::DerivativeAccumulator *accum) const
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:83
#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 void clear_caches()
Definition: Object.h:227
Various general useful macros for IMP.
Abstract base class for all restraints.
virtual ModelObjectsTemp do_get_inputs() const =0
#define IMP_OVERRIDE
Cause a compile error if this method does not override a parent method.
Class for adding derivatives from restraints to the model.
A restraint is a term in an IMP ScoringFunction.
Definition: Restraint.h:54
Various important functionality for implementing decorators.