/
VolumeRestraint.h
38 lines (31 loc) · 1.11 KB
/
VolumeRestraint.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/**
* \file IMP/core/VolumeRestraint.h
* \brief A restraint that prevents spheres from inter-penetrating
*
* Copyright 2007-2022 IMP Inventors. All rights reserved.
*/
#ifndef IMPCORE_VOLUME_RESTRAINT_H
#define IMPCORE_VOLUME_RESTRAINT_H
#include <IMP/core/core_config.h>
#include <IMP/SingletonContainer.h>
#include <IMP/Restraint.h>
#include <IMP/UnaryFunction.h>
IMPCORE_BEGIN_NAMESPACE
#if defined(IMP_CORE_USE_IMP_CGAL) || defined(IMP_DOXYGEN)
//! A restraint that prevents spheres from inter-penetrating
/** \note This restraint does not support derivatives.
\note This restraint requires CGAL.*/
class IMPCOREEXPORT VolumeRestraint : public Restraint {
IMP::PointerMember<SingletonContainer> sc_;
IMP::PointerMember<UnaryFunction> f_;
double volume_;
public:
VolumeRestraint(UnaryFunction *f, SingletonContainer *sc, double volume);
virtual double unprotected_evaluate(IMP::DerivativeAccumulator *accum)
const override;
virtual IMP::ModelObjectsTemp do_get_inputs() const override;
IMP_OBJECT_METHODS(VolumeRestraint);
};
#endif
IMPCORE_END_NAMESPACE
#endif /* IMPCORE_VOLUME_RESTRAINT_H */