-
Notifications
You must be signed in to change notification settings - Fork 11
/
SigmoidRestraintSphere.h
63 lines (47 loc) · 1.71 KB
/
SigmoidRestraintSphere.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/**
* \file IMP/pmi/SigmoidRestraintSphere.h
* \brief Simple Sigmoidal score calculated between sphere surfaces.
*
* Copyright 2007-2014 IMP Inventors. All rights reserved.
*
*/
#ifndef IMPPMI_SIGMOID_RESTRAINT_SPHERE_H
#define IMPPMI_SIGMOID_RESTRAINT_SPHERE_H
#include "pmi_config.h"
#include <IMP/Restraint.h>
#include <IMP/kernel/particle_index.h>
IMPPMI_BEGIN_NAMESPACE
/** Blah blah.
*/
class IMPPMIEXPORT SigmoidRestraintSphere : public Restraint
{
IMP::kernel::ParticleIndex p1_;
IMP::kernel::ParticleIndex p2_;
double inflection_;
double slope_;
double amplitude_;
double line_slope_;
public:
//! Create the restraint.
/** Restraints should store the particles they are to act on,
preferably in a Singleton or PairContainer as appropriate.
*/
SigmoidRestraintSphere(IMP::kernel::Model *m,
IMP::kernel::ParticleIndexAdaptor p1,
IMP::kernel::ParticleIndexAdaptor p2,
double inflection, double slope,
double amplitude, double line_slope_=0,
std::string name="SigmoidRestraintSphere%1%");
void set_amplitude(double amplitude){amplitude_=amplitude;}
void increment_amplitude(double amplitude){amplitude_=amplitude_+amplitude;}
double get_amplitude(){return amplitude_;}
/** This macro declares the basic needed methods: evaluate and show
*/
virtual double
unprotected_evaluate(IMP::kernel::DerivativeAccumulator *accum)
const IMP_OVERRIDE;
virtual IMP::kernel::ModelObjectsTemp do_get_inputs() const IMP_OVERRIDE;
IMP_OBJECT_METHODS(SigmoidRestraintSphere);
};
IMPPMI_END_NAMESPACE
#endif /* IMPPMI_SIGMOID_RESTRAINT_SPHERE_H */