home
about
news
download
doc
source
systems
tests
bugs
contact
IMP Reference Guide
2.6.2
The Integrative Modeling Platform
IMP Manual
Reference Guide
Modules
Classes
Examples
include
IMP
example
ExampleConstraint.h
Go to the documentation of this file.
1
/**
2
* \file IMP/example/ExampleConstraint.h
3
* \brief A restraint on a list of particle pairs.
4
*
5
* Copyright 2007-2016 IMP Inventors. All rights reserved.
6
*
7
*/
8
9
#ifndef IMPEXAMPLE_EXAMPLE_CONSTRAINT_H
10
#define IMPEXAMPLE_EXAMPLE_CONSTRAINT_H
11
12
#include <IMP/example/example_config.h>
13
#include <
IMP/SingletonScore.h
>
14
#include <
IMP/Constraint.h
>
15
#include <
IMP/PairContainer.h
>
16
#include <
IMP/PairScore.h
>
17
18
IMPEXAMPLE_BEGIN_NAMESPACE
19
20
//! A trivial constraint that just increments a counter
21
/**
22
*/
23
class
IMPEXAMPLEEXPORT
ExampleConstraint
:
public
Constraint
{
24
Pointer<Particle>
p_;
25
IntKey
k_;
26
27
public
:
28
ExampleConstraint
(
Particle
*p);
29
30
virtual
void
do_update_attributes()
IMP_OVERRIDE
;
31
virtual
void
do_update_derivatives(
DerivativeAccumulator
*da)
IMP_OVERRIDE
;
32
virtual
ModelObjectsTemp
do_get_inputs
()
const
IMP_OVERRIDE
;
33
virtual
ModelObjectsTemp
do_get_outputs
()
const
IMP_OVERRIDE
;
34
35
static
IntKey
get_key();
36
IMP_OBJECT_METHODS
(
ExampleConstraint
);
37
};
38
39
IMPEXAMPLE_END_NAMESPACE
40
41
#endif
/* IMPEXAMPLE_EXAMPLE_CONSTRAINT_H */
IMP_OBJECT_METHODS
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition:
object_macros.h:25
IMP::Vector
Definition:
Vector.h:42
IMP::Pointer
A smart pointer to a reference counted object.
Definition:
Pointer.h:87
IMP::Constraint
Implement a constraint on the Model.
Definition:
Constraint.h:49
PairContainer.h
A container for Pairs.
PairScore.h
Define PairScore.
IMP::Key< 1, true >
Constraint.h
A base class for constraints.
SingletonScore.h
Define SingletonScore.
IMP::ModelObject::do_get_outputs
virtual ModelObjectsTemp do_get_outputs() const =0
IMP::Particle
Class to handle individual model particles.
Definition:
Particle.h:37
IMP::example::ExampleConstraint
A trivial constraint that just increments a counter.
Definition:
ExampleConstraint.h:23
IMP::ModelObject::do_get_inputs
virtual ModelObjectsTemp do_get_inputs() const =0
IMP_OVERRIDE
#define IMP_OVERRIDE
Cause a compile error if this method does not override a parent method.
Definition:
compiler_macros.h:80
IMP::DerivativeAccumulator
Class for adding derivatives from restraints to the model.
Definition:
DerivativeAccumulator.h:25