IMP logo
IMP Reference Guide  develop.27926d84dc,2024/04/19
The Integrative Modeling Platform
MinimumPairRestraint.h
Go to the documentation of this file.
1 // Autogenerated by ../../../../tmp/nightly-build-49060/imp-20240419.develop.27926d84dc/tools/build/make_containers.py
2 // from ../../../../tmp/nightly-build-49060/imp-20240419.develop.27926d84dc/tools/build/container_templates/container/MinimumClassnameRestraint.h
3 // Do not edit - any changes will be lost!
4 
5 /**
6  * \file IMP/container/MinimumPairRestraint.h
7  * \brief Score based on the minimum score over a set of Pairs
8  *
9  * Copyright 2007-2022 IMP Inventors. All rights reserved.
10  */
11 
12 #ifndef IMPCONTAINER_MINIMUM_PAIR_RESTRAINT_H
13 #define IMPCONTAINER_MINIMUM_PAIR_RESTRAINT_H
14 
15 #include <IMP/container/container_config.h>
16 #include <IMP/Restraint.h>
17 #include <IMP/PairScore.h>
18 #include <IMP/PairContainer.h>
19 
20 IMPCONTAINER_BEGIN_NAMESPACE
21 
22 //! Score based on the min or max PairScore over a set
23 /** The score is evaluated for each of the VALUETYPE in the container
24  and the value of the min or max n scores is used. That is,
25  if n is 1, the value of the restraint is the value of the min or max
26  score over the container.
27  */
28 class IMPCONTAINEREXPORT MinimumPairRestraint : public Restraint {
31  unsigned int n_;
32 
33  public:
34  /** n is the number of LCMinimum scores to use.
35  */
37  unsigned int n = 1,
38  std::string name = "MinimumPairRestraint %1%");
39 
40  public:
42  override;
43  IMP::ModelObjectsTemp do_get_inputs() const override;
45  ;
46 
47  //! Set the number of lowest scores to use.
48  void set_n(unsigned int n) { n_ = n; }
49 #ifndef IMP_DOXYGEN
52  double max) const override;
53 #endif
54 };
55 
56 IMPCONTAINER_END_NAMESPACE
57 
58 #endif /* IMPCONTAINER_MINIMUM_PAIR_RESTRAINT_H */
Abstract class for scoring object(s) of type ParticleIndexPair.
Definition: PairScore.h:44
Score based on the min or max PairScore over a set.
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition: object_macros.h:25
virtual double unprotected_evaluate(DerivativeAccumulator *da) const
Return the unweighted score for the restraint.
A more IMP-like version of the std::vector.
Definition: Vector.h:50
A container for Pairs.
virtual Restraints do_create_current_decomposition() const
Definition: Restraint.h:315
virtual double unprotected_evaluate_if_good(DerivativeAccumulator *da, double max) const
Definition: Restraint.h:139
Define PairScore.
void set_n(unsigned int n)
Set the number of lowest scores to use.
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