IMP  2.4.0
The Integrative Modeling Platform
TripletRestraint.h
Go to the documentation of this file.
1 /**
2  * \file IMP/core/TripletRestraint.h
3  * \brief Apply a TripletScore to a Triplet.
4  *
5  * WARNING This file was generated from TripletRestraint.h
6  * in /tmp/nightly-build-65532/imp-2.4.0/tools/build/container_templates/core
7  * by tools/build/make_containers.py.
8  *
9  * Copyright 2007-2015 IMP Inventors. All rights reserved.
10  *
11  */
12 
13 #ifndef IMPCORE_TRIPLET_RESTRAINT_H
14 #define IMPCORE_TRIPLET_RESTRAINT_H
15 
16 #include <IMP/core/core_config.h>
17 
18 #include <IMP/kernel/internal/TupleRestraint.h>
19 #include <IMP/TripletScore.h>
20 
21 #include <iostream>
22 
23 IMPCORE_BEGIN_NAMESPACE
24 
25 //! Applies a TripletScore to a Triplet.
26 /** This restraint stores a Triplet.
27  \see TripletRestraint
28  */
30 #if defined(SWIG) || defined(IMP_DOXYGEN)
31  public Restraint
32 #else
33  public IMP::kernel::internal::TupleRestraint<TripletScore>
34 #endif
35  {
36  public:
37  //! Create the restraint.
38  /** This function takes the function to apply to the
39  stored Triplet and the Triplet.
40  */
42  std::string name = "TripletRestraint %1%")
43  : IMP::kernel::internal::TupleRestraint<TripletScore>(
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 Triplet and the Triplet.
50  */
52  std::string name = "TripletRestraint %1%")
53  : IMP::kernel::internal::TupleRestraint<TripletScore>(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_TRIPLET_RESTRAINT_H */
Class for adding derivatives from restraints to the model.
Ints get_index(const kernel::ParticlesTemp &particles, const Subset &subset, const Subsets &excluded)
TripletRestraint(kernel::Model *m, TripletScore *ss, const kernel::ParticleIndexTriplet &vt, std::string name="TripletRestraint %1%")
Create the restraint.
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition: object_macros.h:25
A class to store an fixed array of same-typed values.
Definition: Array.h:33
Applies a TripletScore to a Triplet.
Import IMP/kernel/TripletScore.h in the namespace.
A restraint is a term in an IMP ScoringFunction.
TripletRestraint(TripletScore *ss, const kernel::ParticleTriplet &vt, std::string name="TripletRestraint %1%")
Create the restraint.
Abstract class for scoring object(s) of type ParticleTriplet.
Class for storing model, its restraints, constraints, and particles.
Definition: kernel/Model.h:73