IMP logo
IMP Reference Guide  2.20.2
The Integrative Modeling Platform
PairRestraint.h
Go to the documentation of this file.
1 // Autogenerated by ../../../../tmp/nightly-build-36632/imp-2.20.2/tools/build/make_containers.py
2 // from ../../../../tmp/nightly-build-36632/imp-2.20.2/tools/build/container_templates/core/ClassnameRestraint.h
3 // Do not edit - any changes will be lost!
4 
5 /**
6  * \file IMP/core/PairRestraint.h
7  * \brief Apply a PairScore to a Pair.
8  *
9  * Copyright 2007-2023 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/internal/TupleRestraint.h>
19 #include <IMP/PairScore.h>
20 
21 #include <iostream>
22 #include <cereal/access.hpp>
23 #include <cereal/types/base_class.hpp>
24 
25 IMPCORE_BEGIN_NAMESPACE
26 
27 //! Applies a PairScore to a Pair.
28 /** This restraint stores a Pair.
29  \see PairRestraint
30  */
32 #if defined(SWIG) || defined(IMP_DOXYGEN)
33  public Restraint
34 #else
35  public IMP::internal::TupleRestraint<PairScore>
36 #endif
37  {
38  friend class cereal::access;
39 
40  template<class Archive> void serialize(Archive &ar) {
41  ar(cereal::base_class<
42  IMP::internal::TupleRestraint<PairScore> >(this));
43  }
45  public:
46  //! Create the restraint.
47  /** This function takes the function to apply to the
48  stored Pair and the Pair.
49  */
51  std::string name = "PairRestraint %1%")
52  : IMP::internal::TupleRestraint<PairScore>(ss, m, vt, name) {
53  }
54  PairRestraint() {}
55 
56 #if defined(SWIG) || defined(IMP_DOXYGEN)
57  protected:
58  double unprotected_evaluate(IMP::DerivativeAccumulator *accum) const;
59  IMP::ModelObjectsTemp do_get_inputs() const;
61 #endif
62 };
63 
64 IMPCORE_END_NAMESPACE
65 
66 #endif /* IMPCORE_PAIR_RESTRAINT_H */
Abstract class for scoring object(s) of type ParticleIndexPair.
Definition: PairScore.h:44
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition: object_macros.h:25
A more IMP-like version of the std::vector.
Definition: Vector.h:42
Class for storing model, its restraints, constraints, and particles.
Definition: Model.h:86
PairRestraint(Model *m, PairScore *ss, const ParticleIndexPair &vt, std::string name="PairRestraint %1%")
Create the restraint.
Definition: PairRestraint.h:50
Define PairScore.
#define IMP_OBJECT_SERIALIZE_DECL(Name)
Declare methods needed for serialization of Object pointers.
Definition: object_macros.h:95
Applies a PairScore to a Pair.
Definition: PairRestraint.h:31
Class for adding derivatives from restraints to the model.
A restraint is a term in an IMP ScoringFunction.
Definition: Restraint.h:56