IMP  2.1.0
The Integrative Modeling Platform
VolumeRestraint.h
Go to the documentation of this file.
1 /**
2  * \file IMP/core/VolumeRestraint.h
3  * \brief A prevent spheres from inter-penetrating
4  *
5  * Copyright 2007-2013 IMP Inventors. All rights reserved.
6  */
7 
8 #ifndef IMPCORE_VOLUME_RESTRAINT_H
9 #define IMPCORE_VOLUME_RESTRAINT_H
10 
11 #include <IMP/core/core_config.h>
12 #include <IMP/SingletonContainer.h>
13 #include <IMP/kernel/Restraint.h>
14 #include <IMP/UnaryFunction.h>
15 #include <IMP/restraint_macros.h>
16 
17 IMPCORE_BEGIN_NAMESPACE
18 #if defined(IMP_CORE_USE_IMP_CGAL) || defined(IMP_DOXYGEN)
19 //! kernel::Restraint the volume of a set of spheres
20 /** \note This restraint does not support derivatives.
21  \note This restraint requires CGAL.*/
22 class IMPCOREEXPORT VolumeRestraint : public kernel::Restraint {
25  double volume_;
26 
27  public:
28  VolumeRestraint(UnaryFunction *f, SingletonContainer *sc, double volume);
29 
30  virtual double unprotected_evaluate(
31  IMP::kernel::DerivativeAccumulator *accum) const IMP_OVERRIDE;
32  virtual IMP::kernel::ModelObjectsTemp do_get_inputs() const IMP_OVERRIDE;
34 };
35 #endif
36 
37 IMPCORE_END_NAMESPACE
38 
39 #endif /* IMPCORE_VOLUME_RESTRAINT_H */
Class for adding derivatives from restraints to the model.
Import IMP/kernel/SingletonContainer.h in the namespace.
A smart pointer to a ref-counted Object that is a class memeber.
Definition: base/Pointer.h:146
Import IMP/kernel/UnaryFunction.h in the namespace.
Abstract single variable functor class for score functions.
Import IMP/kernel/restraint_macros.h in the namespace.
Abstract base class for all restraints.
kernel::Restraint the volume of a set of spheres
A restraint is a term in an IMP ScoringFunction.
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
virtual ModelObjectsTemp do_get_inputs() const =0
A shared container for Singletons.