IMP  2.3.1
The Integrative Modeling Platform
MinimumQuadRestraint.h
Go to the documentation of this file.
1 /**
2  * \file IMP/container/MinimumQuadRestraint.h
3  * \brief Score based on the minimum score over a set of Quads
4  *
5  * WARNING This file was generated from MinimumQuadRestraint.h
6  * in /tmp/nightly-build-29065/imp-2.3.1/tools/build/container_templates/container
7  * by tools/build/make_containers.py.
8  *
9  * Copyright 2007-2014 IMP Inventors. All rights reserved.
10  */
11 
12 #ifndef IMPCONTAINER_MINIMUM_QUAD_RESTRAINT_H
13 #define IMPCONTAINER_MINIMUM_QUAD_RESTRAINT_H
14 
15 #include <IMP/container/container_config.h>
16 #include <IMP/Restraint.h>
17 #include <IMP/QuadScore.h>
18 #include <IMP/QuadContainer.h>
19 
20 IMPCONTAINER_BEGIN_NAMESPACE
21 
22 //! Score based on the min or max QuadScore 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 MinimumQuadRestraint : public Restraint {
31  unsigned int n_;
32 
33  public:
34  /** n is the number of LCMinimum scores to use.
35  */
36  MinimumQuadRestraint(QuadScore *f, QuadContainerAdaptor c,
37  unsigned int n = 1,
38  std::string name = "MinimumQuadRestraint %1%");
39 
40  public:
41  double unprotected_evaluate(IMP::DerivativeAccumulator *accum) const
45  ;
46 
47  //! Set the number of lowest scores to use.
48  void set_n(unsigned int n) { n_ = n; }
49 #ifndef IMP_DOXYGEN
51  double unprotected_evaluate_if_good(DerivativeAccumulator *da,
52  double max) const IMP_OVERRIDE;
53 #endif
54 };
55 
56 IMPCONTAINER_END_NAMESPACE
57 
58 #endif /* IMPCONTAINER_MINIMUM_QUAD_RESTRAINT_H */
Abstract class for scoring object(s) of type ParticleQuad.
Class for adding derivatives from restraints to the model.
A smart pointer to a ref-counted Object that is a class member.
Definition: Pointer.h:147
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition: object_macros.h:25
Import IMP/kernel/QuadContainer.h in the namespace.
IMP::base::Vector< IMP::base::Pointer< Restraint > > Restraints
void set_n(unsigned int n)
Set the number of lowest scores to use.
Score based on the min or max QuadScore over a set.
A restraint is a term in an IMP ScoringFunction.
virtual Restraints do_create_current_decomposition() const
Import IMP/kernel/QuadScore.h in the namespace.
virtual ModelObjectsTemp do_get_inputs() const =0
Import IMP/kernel/Restraint.h in the namespace.
#define IMP_OVERRIDE
Cause a compile error if this method does not override a parent method.