IMP  2.2.0
The Integrative Modeling Platform
PairRestraint.h
Go to the documentation of this file.
1 /**
2  * \file IMP/core/PairRestraint.h
3  * \brief Apply a PairScore to a Pair.
4  *
5  * WARNING This file was generated from PairRestraint.h
6  * in /tmp/nightly-build-28832/imp-2.2.0/tools/build/container_templates/core
7  * by tools/maintenance/setup_containers.py.
8  *
9  * Copyright 2007-2014 IMP Inventors. All rights reserved.
10  *
11  */
12 
13 #ifndef IMPCORE_PAIR_RESTRAINT_H
14 #define IMPCORE_PAIR_RESTRAINT_H
15 
16 #include <IMP/core/core_config.h>
17 
18 #include <IMP/kernel/internal/TupleRestraint.h>
19 #include <IMP/PairScore.h>
20 
21 #include <iostream>
22 
23 IMPCORE_BEGIN_NAMESPACE
24 
25 //! Applies a PairScore to a Pair.
26 /** This restraint stores a Pair.
27  \see PairRestraint
28  */
30 #if defined(SWIG) || defined(IMP_DOXYGEN)
31  public Restraint
32 #else
33  public IMP::kernel::internal::TupleRestraint<PairScore>
34 #endif
35  {
36  public:
37  //! Create the restraint.
38  /** This function takes the function to apply to the
39  stored Pair and the Pair.
40  */
42  std::string name = "PairRestraint %1%")
43  : IMP::kernel::internal::TupleRestraint<PairScore>(
44  ss, IMP::kernel::internal::get_model(vt),
45  IMP::kernel::internal::get_index(vt), name) {}
46 
47  //! Create the restraint.
48  /** This function takes the function to apply to the
49  stored Pair and the Pair.
50  */
52  std::string name = "PairRestraint %1%")
53  : IMP::kernel::internal::TupleRestraint<PairScore>(ss, m, vt, name) {
54  }
55 
56 #if defined(SWIG) || defined(IMP_DOXYGEN)
57  protected:
58  double unprotected_evaluate(IMP::DerivativeAccumulator *accum) const;
59  IMP::kernel::ModelObjectsTemp do_get_inputs() const;
61 #endif
62 };
63 
64 IMPCORE_END_NAMESPACE
65 
66 #endif /* IMPCORE_PAIR_RESTRAINT_H */
Class for adding derivatives from restraints to the model.
Ints get_index(const kernel::ParticlesTemp &particles, const Subset &subset, const Subsets &excluded)
PairRestraint(kernel::Model *m, PairScore *ss, const kernel::ParticleIndexPair &vt, std::string name="PairRestraint %1%")
Create the restraint.
Definition: PairRestraint.h:51
PairRestraint(PairScore *ss, const kernel::ParticlePair &vt, std::string name="PairRestraint %1%")
Create the restraint.
Definition: PairRestraint.h:41
A class to store an fixed array of same-typed values.
Definition: base/Array.h:33
Abstract score function.
Import IMP/kernel/PairScore.h in the namespace.
A restraint is a term in an IMP ScoringFunction.
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Applies a PairScore to a Pair.
Definition: PairRestraint.h:29
Class for storing model, its restraints, constraints, and particles.
Definition: kernel/Model.h:72