IMP  2.0.1
The Integrative Modeling Platform
RestraintsScoringFunction.h
Go to the documentation of this file.
1 /**
2  * \file IMP/core/RestraintsScoringFunction.h
3  * \brief Storage of a model, its restraints,
4  * constraints and particles.
5  *
6  * Copyright 2007-2013 IMP Inventors. All rights reserved.
7  *
8  */
9 
10 #ifndef IMPCORE_RESTRAINTS_SCORING_FUNCTION_H
11 #define IMPCORE_RESTRAINTS_SCORING_FUNCTION_H
12 
13 #include <IMP/core/core_config.h>
14 #include <IMP/ScoringFunction.h>
15 #include <IMP/internal/RestraintsScoringFunction.h>
16 
17 
18 IMPCORE_BEGIN_NAMESPACE
19 
20 /** Create a scoring function on a list of restraints.
21 */
23 #if defined(IMP_DOXYGEN) || defined(SWIG)
24 public ScoringFunction
25 #else
26 public IMP::internal::RestraintsScoringFunction
27 #endif
28  {
29  public:
30  RestraintsScoringFunction(const RestraintsTemp &rs,
31  double weight=1.0,
32  double max=NO_MAX,
33  std::string name= "RestraintsScoringFunction%1%"):
34  IMP::internal::RestraintsScoringFunction(rs, weight, max, name)
35  {
36  }
37  RestraintsScoringFunction(const RestraintsTemp &rs,
38  std::string name):
39  IMP::internal::RestraintsScoringFunction(rs, 1.0, NO_MAX, name)
40  {
41  }
42 #if defined(SWIG)
43  void do_add_score_and_derivatives(IMP::ScoreAccumulator sa,
44  const ScoreStatesTemp &ss) IMP_OVERRIDE;
45  Restraints create_restraints() const IMP_OVERRIDE;
46  virtual ScoreStatesTemp get_required_score_states() const IMP_OVERRIDE;
48 #endif
49 };
50 
51 
52 IMPCORE_END_NAMESPACE
53 
54 #endif /* IMPCORE_RESTRAINTS_SCORING_FUNCTION_H */