IMP  2.0.0
The Integrative Modeling Platform
LogicalORRestraint.h
Go to the documentation of this file.
1 /**
2  * \file IMP/isd/LogicalORRestraint.h
3  * \brief A lognormal restraint that uses the ISPA model to model NOE-derived
4  * distance fit.
5  *
6  * Copyright 2007-2013 IMP Inventors. All rights reserved.
7  *
8  */
9 
10 #ifndef IMPISD_LOGICAL_ORRESTRAINT_H
11 #define IMPISD_LOGICAL_ORRESTRAINT_H
12 
13 #include <IMP/isd/isd_config.h>
14 #include <IMP/Restraint.h>
15 #include <IMP/isd/ISDRestraint.h>
16 #include <IMP/restraint_macros.h>
17 
18 IMPISD_BEGIN_NAMESPACE
19 
20 //! Apply an NOE distance restraint between two particles.
21 class IMPISDEXPORT LogicalORRestraint : public Restraint
22 {
23  Pointer<ISDRestraint> r0_;
24  Pointer<ISDRestraint> r1_;
25 public:
26  //! Create the restraint.
27  /** Restraints should store the particles they are to act on,
28  preferably in a Singleton or PairContainer as appropriate.
29  */
31 
32  /* call for probability */
33  virtual double get_probability() const
34  {
35  return exp(-unprotected_evaluate(nullptr));
36  }
37 
38 
39  /** This macro declares the basic needed methods: evaluate and show
40  */
42 
43 };
44 
45 IMPISD_END_NAMESPACE
46 
47 #endif /* IMPISD_LOGICAL_ORRESTRAINT_H */