IMP  2.0.1
The Integrative Modeling Platform
MinimumTripletRestraint.h
Go to the documentation of this file.
1 /**
2  * \file IMP/container/MinimumTripletRestraint.h
3  * \brief Score based on the minimum score over a set of Triplets
4  *
5  * WARNING This file was generated from MinimumTripletRestraint.h
6  * in /tmp/nightly-build-36540/imp-2.0.1/tools/build/container_templates/container
7  * by tools/maintenance/setup_containers.py.
8  *
9  * Copyright 2007-2013 IMP Inventors. All rights reserved.
10  */
11 
12 #ifndef IMPCONTAINER_MINIMUM_TRIPLET_RESTRAINT_H
13 #define IMPCONTAINER_MINIMUM_TRIPLET_RESTRAINT_H
14 
15 #include <IMP/container/container_config.h>
16 #include <IMP/Restraint.h>
17 #include <IMP/TripletScore.h>
18 #include <IMP/TripletContainer.h>
19 #include <IMP/restraint_macros.h>
20 
21 IMPCONTAINER_BEGIN_NAMESPACE
22 
23 //! Score based on the min or max TripletScore over a set
24 /** The score is evaluated for each of the VALUETYPE in the container
25  and the value of the min or max n scores is used. That is,
26  if n is 1, the value of the restraint is the value of the min or max
27  score over the container.
28  */
29 class IMPCONTAINEREXPORT MinimumTripletRestraint
30 : public Restraint
31 {
34  unsigned int n_;
35 public:
36  /** n is the number of LCMinimum scores to use.
37  */
39  TripletContainerAdaptor c,
40  unsigned int n=1,
41  std::string name
42  ="MinimumTripletRestraint %1%");
43 
44  public:
45  double unprotected_evaluate(IMP::DerivativeAccumulator *accum)
46  const IMP_OVERRIDE;
47  IMP::ModelObjectsTemp do_get_inputs() const IMP_OVERRIDE;
49 
50  //! Set the number of lowest scores to use.
51  void set_n(unsigned int n) { n_=n;}
52 #ifndef IMP_DOXYGEN
53  Restraints do_create_current_decomposition() const IMP_OVERRIDE;
54  double unprotected_evaluate_if_good(DerivativeAccumulator *da,
55  double max) const IMP_OVERRIDE;
56 #endif
57 };
58 
59 
60 IMPCONTAINER_END_NAMESPACE
61 
62 #endif /* IMPCONTAINER_MINIMUM_TRIPLET_RESTRAINT_H */